How to Disable Selinux in Fedora Linux
In this tutorial we are going to learn how disable Selinux in Fedora Linux. Selinux is there to make your fedora server or workstation more secure. But Selinux some applications may not work properly with Selinux is Enabled.
I am using Fedora Server 24, But you can use this method on Fedora 24 Workstation and any previous Fedora Release.
In Fedora we can disable Selinux permanently or Temporarily.
Disable Selinux Temporarily on Fedora
We can disable selinux on Fedora Temporarily, using the setenforce command.
setenforce 0
The value 0 put the selinux mode to permissive mode, To re enable Selinux change the value to 1.
setenforce 1
Disable Selinux Permanently in Fedora Linux
To disable Selinux permanently we need to edit the /etc/sysconfig/selinux file and change Selinux mode to disabled.
Open the /etc/sysconfig/selinux file with a Text editor, and find the line that reads,
SELINUX=enforcing
To turn off Selinux, And Change it to,
SELINUX=disabled
Then, Save the /etc/sysconfig/selinux file and restart your Fedora Machine.
sudo systemctl reboot
Now when the system boot, the Selinux on your fedora operating system will be disabled. You can verify this by using the sestatus command.
sestatus
To re enable the Selinux, you need to set SELINUX=enforcing in the /etc/sysconfig/selinux file.
So that is how we can disable Selinux on Fedora Linux, This also works on any redhat based Linux distribution, Including Red Hat Enterprise Linux(RHEL), CentOS, Scientific Linux and Oracle Linux.