How To Disable SELinux Temporarily or Permanently in CentOS, RHEL, Fedora

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/disable-selinux-temporarily-permanently-centos-rhel-fedora/
PINTEREST
PINTEREST
INSTAGRAM

SELinux is very powerful security mechanism for Linux distributions. Distributions like CentOS, RHEL or Fedora comes SELinux enabled by default. In some situations we do not need SELinux protection especially in end user systems. In this tutorial we will look how to disable SELinux temporarily or Permanently.

List SELinux Status

First step is getting information about SELinux status. We can get and list SELinux status with the sestatus command.

List SELinux Status
List SELinux Status

We can see from first line of output that the SELinux status is enabled

Disable SELinux Temporarily

There is different ways to disable SELinux. Disabling SELinux temporarily work only for current run. After the system is rebooted SELinux configuration will revert to the persistent one and the SELinux will be enabled. We can disable with the following ways. All of them requires root privileges.

OR

OR

Disable SELinux Permanently

The best way to get rid of from SELinux is disabling it permanently. We should save configuration. This will make configuration effective between reboots. We have  different ways to accomplish this. All of them requires root privileges.

Change SELINUX=enforcing line in /etc/sysconfig/selinux to the following.

Disable SELinux Permanently
Disable SELinux Permanently
RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/disable-selinux-temporarily-permanently-centos-rhel-fedora/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Linux stat Command Tutorial With Examples

Leave a Reply

Your email address will not be published.