Administration CentOS Fedora Linux

Disable SELinux

Security-Enhanced Linux (SELinux) is a mandatory access control (MAC) security mechanism implemented in the Linux kernel. This mechanism adds an extra layer of access security to your files,directories,devices, ports and even processes.

I strongly recommend that you implement SELinux in your environment. But, in some cases, you may want to disable it to avoid some unnecessary issues.

To disable SELinux in CentOS boxes on the fly, simply type the following command as root:

setenforce 0 

To disable it permanently and remain in effect even after reboots, simply edit the file “/etc/selinux/config” and change the following

SELINUX=enforcing

to

SELINUX=disabled

Related Articles

  • Vi Commands 101

    Cursor movement h – move left j – move down k – move up l – move right w – jump by start of words (punctuation considered words) W –...
  • Basic Linux commands

              In recent years, more people have begun to look into , explore, and try out the many features of Linux based operating System has to offer. One of the...
  • How to get rid of ^M characters.

    When you edit a file in Windows and then open in UNIX, you must have seen ^M characters getting appended in the content. How to get rid of it ?...
  • Setting files as immutable.

    Wouldn’t it be nice if we can set files so that even root cannot modify or delete it ? Both FreeBSD and Linux come with commands that allows us to...