Linux command
getenforce 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
getenforce
说明
getenforce displays the current mode of SELinux (Security-Enhanced Linux). The command outputs one of three possible values: Enforcing - SELinux security policy is enforced. Access violations are blocked and logged. Permissive - SELinux security policy is not enforced but violations are logged. Useful for troubleshooting and policy development. Disabled - SELinux is completely disabled. This is a quick way to check SELinux status without parsing configuration files or using more verbose tools like sestatus.
FAQ
What is the getenforce command used for?
getenforce displays the current mode of SELinux (Security-Enhanced Linux). The command outputs one of three possible values: Enforcing - SELinux security policy is enforced. Access violations are blocked and logged. Permissive - SELinux security policy is not enforced but violations are logged. Useful for troubleshooting and policy development. Disabled - SELinux is completely disabled. This is a quick way to check SELinux status without parsing configuration files or using more verbose tools like sestatus.
How do I run a basic getenforce example?
Run `getenforce` in a terminal, then adjust file names, paths, flags, or remote targets for your system.