getenforce
getenforce is a command-line utility used on Linux systems running SELinux to report the current SELinux mode. It prints one of three words: Enforcing, Permissive, or Disabled, reflecting how SELinux is operating on the host. The tool is part of the policycoreutils package and queries the kernel via the SELinux runtime library to determine the status.
Enforcing means the SELinux policy is actively enforced by the kernel; policy decisions are applied to access
Usage and practical considerations: Running getenforce displays the current mode and is commonly used in scripts
Related commands: sestatus provides a broader report of SELinux status, including the active mode, policy type,
Limitations: On systems without SELinux support or in containers where the subsystem is not exposed, getenforce