SELinux处理命令

1 查看SELinux状态

    Enforcing为开启状态;Disabled为关闭状态。

[root@localhost /]# getenforce

Enforcing

2 临时关闭SELinux

[root@localhost /]# setenforce 0

[root@localhost /]# getenforce

Permissive

3 永久关闭SELinux

使用文本编辑工具打开 /etc/selinux/config

vi /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled

设置后需要重启才能生效。

原文地址:https://www.cnblogs.com/robinex/p/7631374.html