Linux Administrator

Easy Steps to Disable SELinux on CentOS 6.9

Security-Enhanced Linux (SELinux) is a security module specifically made for the Linux kernel, which enables features that support security policies for access control, including mandatory access control (MAC).Released in January 1998, it is written in the C programming language and has been a part of the Linux mainline since 2003, when version 2.6 which was released.

In this article I will show how to disable SELinux on CentOS 6.9 machine. Sometime you may hit a problem when try to install software on Linux machine if SELinux is enable.

Steps to Disable SELinux on CentOS 6.9

Follow the below steps to disable SELinux.

1. First of all check the SELinux status:

# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted

2. Now disable SELinux immediately without reboot.

# setenforce 0

3. Disable SELinux on CentOS 6.9 permanently editing below file.

# vi /etc/sysconfig/selinux

Change “SELINUX=enforcing” to “SELINUX=disabled”.

# 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 these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.

4. Now finally reboot your system.

# reboot
Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author


Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment