Linux Centos7 查看SELinux状态| 关闭 | 开启

1.查看SELinux的状态

[root@localhost ~]# sestatus

SELinux status:                 enabled  为开启

暂时关闭 sudo setenforce 0

2.永久关闭SELinux

修改配置文件/etc/selinux/config,将其中的SELINUX=enforcing改为SELINUX=disabled

[root@localhost ~]# vi /etc/selinux/config

《Linux Centos7 查看SELinux状态| 关闭 | 开启》

3.重启系统,再执行sestatus查看状态

reboot

 

    原文作者:掰下一块月亮下酒
    原文地址: https://blog.csdn.net/weixin_43345365/article/details/107483635
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞