Home >Operation and Maintenance >Linux Operation and Maintenance >How to turn off SELinux in Linux system
The method to turn off SELinux in Linux system is: 1. Open the config configuration file; 2. Find the configuration [SELINUX=enforcing] and change it to [SELINUX=disabled]; 3. Save the file and exit.
There are usually two ways to shut down SELinux, one is to shut down temporarily and the other is to shut down permanently. Let's introduce these two methods respectively.
(Recommended tutorial: linux tutorial)
1. Temporarily close
and execute the command setenforce 0. After shutting down in this way, SELinux will still be turned on after restarting the system.
2. Permanently close
First open the configuration file, the command is as follows;
vi /etc/selinux/config
Then change SELINUX=enforcing to SELINUX=disabled ;
Finally save the file and exit.
The above is the detailed content of How to turn off SELinux in Linux system. For more information, please follow other related articles on the PHP Chinese website!