Centos7关闭SeLinux

查询SeLinux状态

方法一:

getenforce

默认显示Enforcing,如果是关闭则显示Disabled

方法二:

/usr/sbin/sestatus -v

第一行默认显示SELinux status: enabled

临时关闭

setenforce 0

永久关闭

vi /etc/selinux/config

将文件中的SELINUX=enforcing改为SELINUX=disabled
然后重启机器生效

你可能感兴趣的:(Centos7关闭SeLinux)