How to disable SELinux?

How do I disable SELinux in various Linux distributions?

You can disable SELinux permanently by changing ‘SELINUX=’ from enabled to disabled the /etc/selinux/config file. After this, save the file and reboot your server to disable SELinux permanently.

You check if it’s disabled by running the following command:

selinuxenabled && echo enabled || echo disabled

If it returns disabled, it is permanently disabled.


Comments are closed.