setsebool(8)
โจ setsebool(8) โจ
okay bestie, gather round, because setsebool(8) is literally the little command that flips SELinux booleans on and off and it's giving main character energy ๐
๐ NAME ๐
setsebool โ set SELinux boolean value. that's it. that's the job. she sets booleans. iconic behavior fr fr ๐ฆ
๐ธ SYNOPSIS ๐ธ
setsebool [ -PNV ] boolean value | bool1=val1 bool2=val2 ...
๐ DESCRIPTION ๐
so like, setsebool sets the current state of a particular SELinux boolean โ or a whole list of booleans, because why do one when you can do many โ to a given value. slay.
and the value? it's flexible bestie:
1,true, oronโ enable the boolean โจ0,false, oroffโ disable it ๐
now here's the part you actually need to hear, no cap:
- Without the
-Poption, only the current boolean value is affected. the boot-time default settings are not changed. so yeah, it'll vibe for now and then forget everything after a reboot ๐ - If the
-Poption is given, all pending values are written to the policy file on disk. meaning they'll be persistent across reboots. this is the one you want if you're tired of redoing your work every single time, periodt ๐ - If the
-Noption is given, the policy on disk is not reloaded into the kernel. noted. - If the
-Voption is given, verbose error messages will be printed from thesemanagelibraries. so when something goes wrong you get the whole story instead of a cryptic little nothing ๐ซถ
โญ EXAMPLE โญ
Enable container_use_devices boolean (will return to persistent value after reboot) โ so it's cute for now but it's not staying ๐
# setsebool container_use_devices 1
Persistently enable samba_create_home_dirs and samba_enable_home_dirs booleans โ two at once, using the bool=val format, and with -P so it actually sticks around ๐ฅ
# setsebool -P samba_create_home_dirs=on samba_enable_home_dirs=on
๐ AUTHOR ๐
This manual page was written by Dan Walsh <dwalsh@redhat.com>. The program was written by Tresys Technology. give them their flowers ๐ธ
๐ SEE ALSO ๐
and that's the whole page bestie, go forth and flip those booleans responsibly ๐
signing off with the receipts: dwalsh@redhat.com ยท 11 Aug 2004 ยท setsebool(8) โ mwah, love u, bye ๐โจ๐ฆ
๐ฆ where this page comes from
- centos-stream 10: policycoreutils 3.11-1.el10 ยท GPL-2.0-or-later
- centos-stream 9: policycoreutils 3.6-9.el9 ยท GPL-2.0-or-later
- debian trixie: policycoreutils 3.8.1-2
- fedora 43: policycoreutils 3.9-5.fc43 ยท GPL-2.0-or-later
- fedora 43: policycoreutils 3.9-7.fc43 ยท GPL-2.0-or-later
- fedora 44: policycoreutils 3.10-1.fc44 ยท GPL-2.0-or-later
- fedora 44: policycoreutils 3.11-2.fc44 ยท GPL-2.0-or-later
- nixos 26.05: policycoreutils 3.11
- nixpkgs unstable: policycoreutils 3.11
- opensuse-leap 16.0: policycoreutils 3.8.1-160000.5.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: policycoreutils 3.8.1-160000.5.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: policycoreutils 3.8.1-160000.5.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: policycoreutils 3.8.1-160000.5.1 ยท GPL-2.0-or-later
- ubuntu questing: policycoreutils 3.8.1-1
- ubuntu resolute: policycoreutils 3.9-2
- ubuntu stonking: policycoreutils 3.11-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms