For the complete documentation index, see llms.txt. This page is also available as Markdown.

SELinux management

How to get SELinux status

The following command will retreive the SELinux status of your system (output may vary):

 sestatus 

exemple from CentOS 5.3

 SELinux status: enabled
 SELinuxfs mount: /selinux
 Current mode: permissive
 Mode from config file: permissive
 Policy version: 21
 Policy from config file: targeted

How to disable SELinux

Set SELinux to permissive (not truly disabled)

 setenforce 0

Disable SELinux entirely

Edit the file:

Set the line to SELINUX=disabled

Reboot or use the setenforce command:

Last updated

Was this helpful?