getenforce Command Generator
Generate getenforce commands to report the current SELinux mode
Getting Started with getenforce
## What is getenforce?
The `getenforce` command reports the **current** SELinux mode running on the system. It takes no options and no arguments, and prints one of three words:
- `Enforcing` — SELinux policy is active and enforced. - `Permissive` — SELinux logs denials but does not block them. - `Disabled` — SELinux is turned off entirely.
## How to Use
1. **Run the Command**: Just execute `getenforce` (typically with `sudo` if permissions are restricted). 2. **Read the Output**: A single word is printed indicating the current mode. 3. **Copy & Run**: Copy the generated command into your terminal.
> This is a read-only status check — it cannot change the mode. To switch between Enforcing and Permissive at runtime, use `setenforce`. To change the persistent mode at boot, edit `/etc/selinux/config` and reboot.
▶Why does getenforce print 'Disabled' even after I set it?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee