查看SELinux状态的工具
命令语法格式
sestatus [-v] [-b]
This tool is used to get the status of a system running SELinux.
命令描述
命令sestatus用于获取运行SELinux的系统的状态。该手册页描述了sestatus程序。
此工具用于获取运行SELinux的系统的状态。 它显示有关SELinux是启用还是禁用、关键目录的位置、加载的策略、状态的数据。如示例所示:
> sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allow
Memory protection checking: actual (secure)
Max kernel policy version: 26
SELinux status: enabled
SELinuxfs mount: /selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allow
Memory protection checking: actual (secure)
Max kernel policy version: 26
命令sestatus还显示
- 在/etc/sestatus.conf中列出的文件和进程的安全上下文。手册sestatus.conf(5)中描述了该文件的格式。
- 布尔值的状态。
更多内容可以参考官方的手册。
命令支持的选项及含义
-v
显示/etc/sestatus.conf中列出的文件和进程的上下文。它还检查文件是否是符号链接,如果是,则还显示目标文件的上下文。
将始终显示以下上下文:
- 当前进程的上下文;
- 初始(init)进程的上下文;
- 控制终端文件上下文;
-b
显示布尔值的当前状态。
相关文件
/etc/sestatus.conf
命令sestatus的配置文件。
相关手册
selinux(8), sestatus.conf(5)
参考文献
- man 8 sestatus, Version 2.8-1
更新日志
- 10/17/2018 创建文章