Permissions and owners
The setenforce command
Switches SELinux between Enforcing (1) and Permissive (0) live.
Syntax
sudo setenforce 0|1Copy-ready examples
$ sudo setenforce 0Set to Permissive$ getenforceCheckYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- The change does not survive reboot unless you edit /etc/selinux/config.
Related commands
FAQ
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course