文档:Changing SELinux states and modes
1.查看状态和模式
getenforce 命令可以查看模式,返回Enforcing、Permissive或Disabled。
$ getenforce
Enforcing
sestatus命令返回 SELinux 状态和正在使用的 SELinux 策略
$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing