How to Disable SELinux on CentOS without Rebooting

I have a lot of programs that crash by Selinux Policy and don’t have that much time to make rules for each program so that it perform properly, above all I want to disable the SELinux without rebooting the server.

Note: But one thing keep in mind that by disabling SELinux you will be removing a security mechanism on your system.

First verify the status of SELinux:

cat /etc/selinux/config

Disable SELinux without rebooting:

Run this command with root privileges:

sudo setenforce 0

Verify the status of SELinux after executing the above command:


Disable SELinux permanently:

Edit this file with root privileges:

sudo nano /etc/selinux/config

Replace the line from:




Reboot the System!!!

Hope this will help you!