setenforce命令 – 设置SELinux状态

setenforce命令是用来开启和关闭SELinux的。

语法格式: setenforce [参数]

常用参数:

1 开启
0 关闭

参考实例

开启SELinux:

[root@uziwp ~]# setenforce 1

关闭SELinux:

[root@uziwp ~]# setenforce 0