SELinux 简介
# 查看selinux命令
# 查看selinux的允许状态
$ getenforce
Enforcing
$ /usr/sbin/sestatus
# 查看进程具体的标签
$ ps -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 3882 pts/0 00:00:00 bash
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 3965 pts/0 00:00:00 ps
# 文件的标签
$ ls -Z
-rw-r--r--. root root system_u:object_r:vmtools_unit_file_t:s0 vmtoolsd.service
-rw-r--r--. root root system_u:object_r:systemd_unit_file_t:s0 wpa_supplicant.service
# 当前用户的标签
$ id -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
# 临时修改enforce的状态,重启会丢失修改的状态
$ setenforce 0
# selinux的配置文件路径
$ cd /etc/selinux/sysconfig