Guide on How to Disable SELinux

SELinux is an access control program that is installed and activated by default on Linux distributions such as RHEL (Red Hat Enterprise Linux), CentOS, and Fedora.

If you installed a new system or installed a new application and it did not work, then you need to test SELinux, as it is likely that it could be the cause of this problem.

From this article, you will learn how to check the current status of SELinux, how to disable or enable SELinux temporarily or permanently.

Check SELinux Status

Run the following command to see if SELinux is running :

getenforceinforms in what standing is SELinux: Enforcing (on), Permissive (included in notification mode), or Disabled (disabled).

Temporarily Disable SELinux

The following changes are temporary and will be lost after the reboot.

Temporarily Disable SELinux

Use the following command to temporarily disable SElinux.

Temporarily Enable SELinux

Use the following command to temporarily enable SElinux.

Permanently Disable SELinux

Open the file to edit /etc/selinux/config.

Permanently Disable SELinux

Edit strobe SELINUX = in a file /etc/selinux/configof:

Permanently Enable SELinux

Edit strobe SELINUX = in a file /etc/selinux/configof:

Authored By Imran Yousaf

I am Imran Yousaf, a computer geek, founder of the site Smashinglab.com. I am a die hard fond of open-source software and Linux operating system. In addition to Linux, I am interested in everything related to information technology and modern science.

Leave a Reply

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