Close method: 1. Temporarily shut down, just execute the "setenforce 0" command. 2. To close permanently, you need to execute the "vi /etc/selinux/config" command to open the config file, change the value of the "SELINUX" item to "disabled", save the file and exit.
#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
SELinux (Security-Enhanced Linux) is the implementation of mandatory access control by the US National Security Agency (NSA) and is the most outstanding new security subsystem in the history of Linux. NSA developed an access control system with the help of the Linux community. Under the restrictions of this access control system, a process can only access those files required for its task. SELinux is installed by default on Fedora and Red Hat Enterprise Linux, and is also available as an easily installable package on other distributions.
linux There are two situations for closing selinux:
1. Temporary shutdown:
Enter The commandsetenforce 0
is enough, but it will still be enabled after restarting the system.
2. Permanent shutdown:
Enter the commandvi /etc/selinux/config
Open the config file
ChangeSELINUX=enforcing
toSELINUX=disabled
then save and exit.
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of How to turn off selinux in linux. For more information, please follow other related articles on the PHP Chinese website!