setenforce(8)
π
setenforce β the setenforce(8) glow-up
okay bestie, so you found yourself in the SELinux Command Line documentation section of the manual, page setenforce(8), and you're like "what does this lil guy even do??" π¦
Short answer: it flips the mode SELinux is running in. That's it. That's the whole job. Iconic minimalism, honestly. β¨
β¨ SYNOPSIS β¨
setenforce [Enforcing|Permissive|1|0]
like, you give it ONE thing, and it does ONE thing. no drama, no flags, no --help chaos. lowkey refreshing ngl π
πΈ DESCRIPTION πΈ
Here's the tea, and it's genuinely simple:
Enforcingor1β puts SELinux into enforcing mode πPermissiveor0β puts SELinux into permissive mode π«Ά
so you can type the vibe word OR the vibe number, your call, they're the same energy fr fr.
Now, the part where I have to be a responsible bestie and not let you do something cursed: if SELinux is disabled and you want to enable it, or SELinux is enabled and you want to disable it β this is not the tool for that. setenforce does not do that. Do not make it do that. It will not do that. π
For turning SELinux itself on or off, please go see selinux(8). That's the one you want. Not this one. Different page, different job. π
ok genuinely though β enabling/disabling SELinux is a whole different process with a whole different manual page. Don't try to sneak it in here. Go read selinux(8) like a good little sysadmin. π
π AUTHOR π
This masterpiece was brought to you by Dan Walsh, <dwalsh@redhat.com>. main character energy, we stan. π
β SEE ALSO β
your little reading list, bestie, go forth and expand your knowledge:
iykyk β getenforce(8) is literally just this page's mirror selfie, it tells you what mode you're currently in while setenforce changes it. perfect pair. π
and that's the whole page!! π big love to <dwalsh@redhat.com>, who dropped this back on 7 April 2004 and honestly? it still ate. go set your enforcement mode, bestie, you got this π«Άβ¨π
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-utils 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-utils 3.6-5.el9 Β· Public Domain
- debian bookworm: selinux-utils 3.4-1+b6
- debian trixie: selinux-utils 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-utils 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: selinux-utils 3.3-1build2
- ubuntu noble: selinux-utils 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: selinux-utils 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: selinux-utils 3.8.1-1build1
- ubuntu resolute: selinux-utils 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: selinux-utils 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms