查看SELinux状态及关闭SELinux

查看SELinux状态

  1. /usr/sbin/sestatus -v
  2. getenforce

关闭SELinux

  1. 临时关闭(不用重启机器):

    设置 permissive 模式

    setenforce 0

    设置 enforcing 模式

    setenforce 1

  2. 修改配置文件并重启机器:

    修改 /etc/selinux/config 文件

    SELINUX=enforcing 改为 SELINUX=disabled

如果觉得我的文章对你有用,请随意赞赏