Linux命令 -- Selinux关闭

[亡魂溺海] 提交于 2020-10-27 15:57:40

关闭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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!