SELinux处理命令

Posted 巴黎河畔

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SELinux处理命令相关的知识,希望对你有一定的参考价值。

 

1 查看SELinux状态

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

[[email protected] /]# getenforce

Enforcing

 

2 临时关闭SELinux

[[email protected] /]# setenforce 0

[[email protected] /]# getenforce

Permissive

 

3 永久关闭SELinux

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

vi /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled

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

以上是关于SELinux处理命令的主要内容,如果未能解决你的问题,请参考以下文章