查看、關閉SELinux

查看SELinux狀態:linux


  方法1bash

/usr/sbin/sestatus -v | grep "SELinux status:"

#輸出結果是enabled爲開啓,disabled爲關閉。ide


  方法2spa

 getenforce

   #輸出結果是permissive爲關閉,enforcing爲開啓。orm


關閉SELinux:ci


    一、臨時關閉(不重啓系統便可生效):get


    setenforce 0it

       ##設置SELinux爲permissive模式,即關閉SELinux;若是數字爲1則設置SELinux爲enforcing模式,即開         啓SELinux  class


    二、永久生效(修改後須要重啓系統才能生效)grep


       修改/etc/selinux/config 文件,將SELINUX=enforcing改成SELINUX=disabled

相關文章
相關標籤/搜索