Linux命令 -- Selinux关闭

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

猜你喜欢

转载自blog.51cto.com/paitoubing/2543746