How to enable SELinux in Redhat?

  1. Verify that SELinux is running, # getenforce.
  2. If not running, # setenforce Enforcing to start.

This will put SELinux in active mode until the machine is rebooted.

To permanently change its state in SElinux, edit the SELINUX= line in /etc/sysconfig/selinux to use the desired option:

  • Enforcing. SELinux security policy is enforced.
  • Permissive. SELinux prints warnings instead of enforcing.
  • Disabled. SELinux is fully disabled.