Disable Selinux: How to Disable Selinux in CentOS 7/RHEL 7/Fedora

By default Selinux is enabled on Redhat based Linux distributions, including CentOS 7, Fedora and Redhat Enterprise Linux.

Do the following steps to disable Selinux on CentOS 7.

Open the "/etc/sysconfig/selinux" File:

vim /etc/sysconfig/selinux

Find the line that reads,


And Change it to:


Then restart the Linux system:

systemctl reboot

To view the current selinux status, Type:


Following is a sample selinux configuration file.

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.