HostOnNet Blog

How to disable SELinux

Looking for Linux Server Admin or WordPress Expert? We can help.


We can use the setenforce command to disable SELinux

# setenforce 0

The ‘setenforce’ command may be used to switch between Enforcing and Permissive modes

To make it permanant, edit /etc/selinux/config file, run:

# vi /etc/selinux/config

Update the configuration file as follows:


To quickly check SELinux status by running following commands.

root@serverxx [~]# cat /etc/sysconfig/selinux


root@serverxx [~]# getenforce
root@serverxx [~]#


root@serverxx [~]# sestatus
SELinux status:                 disabled
root@serverxx [~]#

About Annie

I've been working in Technical Section for over 10 years in a wide range of tech jobs from Tech Support to Software Testing. I started writing blog for my future reference and useful for all.
Posted in Linux

One Response to How to disable SELinux

Leave a Reply

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

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