Linux – CentOS – disable/enable SELinux

From  CentOS 7 SELinux is enabled and set to enforcing by default.

To disable it pernamently open and edit /etc/selinux/config
and set the SELINUX=enforcing to permissive or disabled

After that change is made it is necessary to restart the system.

There is another way to disable it right away by running this command:

#setenforce 0

than to check the status run:

SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28

Leave a Reply

Your email address will not be published. Required fields are marked *

five × 5 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.