Fast, practical commands to read SELinux mode and full status so you can act with confidence. 16.11.2025 | reading time: 2 min Curious whether SELinux is protecting your system right now? Use a couple of simple commands to get a one-word verdict or a full status report and decide if further action is needed. Single-command verdict Get an immediate, one-word answer with `getenforce`; run the command and read the result exactly as shown: ``` $ getenforce Enforcing ``` That single word tells you if SELinux is enforcing rules, only logging (Permissive), or disabled. Detailed status report For a fuller picture use `sestatus` and inspect mode, loaded policy and configuration sources; a typical session looks like this: ``` $ 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 Policy MLS status: enabled Policy deny_unknown status: allowed ``` Read the Current mode and Mode from config file lines to detect runtime vs persistent settings. When to change mode When he must switch modes for troubleshooting or maintenance, he uses `setenforce` for immediate runtime changes and edits `/etc/selinux/config` for persistent behavior; remember that switching to Permissive keeps rules but only logs denials, while Disabled unloads the policy and requires a reboot to take effect. Inspect audit and booleans If something is blocked but should be allowed, query booleans with `getsebool -a`, search audit messages with `ausearch` and translate denials with `audit2why` or `audit2allow`; these tools show the why and help craft policy fixes rather than flipping modes blindly. Next steps and hygiene Make checking SELinux part of routine troubleshooting: read the one-word status first, then the detailed report, and only change runtime mode when you understand the audit output; mastering this flow reduces outages and hardens systems over time. Join Bits & Bytes Academy First class LINUX exam preparation. security utilities troubleshooting