Linux command - Selinux shutdown

Turn off centos 7 selinux to
view the current status of selinux
[root@localhost ~]# getenforce
Enforcing #Enforcing is turned on Permissive is turned off

Permanently close selinux
vim /etc/selinux/config
modify: SELINUX=enforcing is SELINUX=disabled
source /etc/selinux/config #make the configuration take effect

Temporarily disable selinux
[root@localhost ~]# setenforce 0#Set
usage: setenforce [Enforcing | Permissive | 1 | 0]
1 On state
0 Off state

After modification, check the status
[root@localhost ~]# getenforce
Permissive

Guess you like

Origin blog.51cto.com/paitoubing/2543746