Software >> OS >> Unix >> Linux >> Oracle Linux >> How to enable or disable SELINUX

To disable

# sudo setenforce 0

# sudo sed -e 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

reboot

if status of SELINUX still shown as permissive, edit /etc/grub.conf and add the selinux=0 to the end of kernel .... line

/etc/grub.conf

...
kernel ....... kernel=0

 

To enable

# sudo setenforce 0

# sudo sed -e 's/SELINUX=disabled/SELINUX=enforcing/' /etc/selinux/config