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

  • TOP 50 LINUX COMMANDS

    Linux can be extremely scary. However, it is always great to have your hands on these nifty commands since you will have to use them all the time as a...
  • 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 ?...
  • Purging and Loading assets onto your CDN

    Step 1: Login to the Webair EZPanel (https://ezpanel.webair.com) Step 2: On the left side menu, click on CDN.   Step 3: Click on the “Webair CDN” button. This will open up...
  • Add IP to CentOS 5/6

    If you recently got a secondary IP block for your server but you do not know how to bind the secondary IP address, please follow the steps below:   First, run...