Most people who use SELinux use SELinux-ready distributions, such as Fedora, Red Hat Enterprise Linux (RHEL), Debian, or Centos. They all enable selinux in the kernel, provide a customizable security policy, and provide many libraries and tools at the user level, all of which can use SELinux functionality. So how does the SELinux state look at it? How can SELinux be closed?
To view the SELinux status:
1,/usr/sbin/sestatus-v # #如果SELinux The status parameter is enabled is turned on
SELinux status:enabled
2. Getenforce # #也可以用这个命令检查
To turn off SELinux:
1, temporarily shut down (do not restart the machine):
Setenforce 0 # #设置SELinux become permissive mode
# #setenforce 1 set SELinux to become enforcing mode
2. Modify the configuration file to restart the machine:
Modify the/etc/selinux/config file
Change Selinux=enforcing to Selinux=disabled
Restart the machine
View selinux status Tips and SELinux shutdown method