Linux命令 -- Selinux关闭

时间:2020-10-26 12:00:01   收藏:0   阅读:43
关闭centos 7 selinux
查看selinux当前状态
[root@localhost ~]# getenforce
Enforcing #Enforcing开启状态 Permissive 关闭状态

永久关闭selinux
vim /etc/selinux/config
修改:SELINUX=enforcing 为 SELINUX=disabled
source /etc/selinux/config #使配置生效

临时关闭selinux
[root@localhost ~]# setenforce 0#设置
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
1 开启状态
0 关闭状态

修改完毕,在查看一下状态
[root@localhost ~]# getenforce
Permissive

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!