[root@localhost ~]# getenforce
#查询SELinux的运行模式
Enforcing
#当前的SELinux是强制模式
[root@localhost ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@localhost ~]# setenforce 选项
选项:
[root@localhost ~]# setenforce 0
#切换成宽容模式
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]# setenforce 1
#切换成强制模式
[root@localhost ~]# getenforce
Enforcing
本文链接:http://task.lmcjl.com/news/12337.html