If you’re using RedHat or CentOS Linux distros (or sporting a Fedora Linux desktop), you probably have SELinux enabled by default. But if it’s been disabled for some reason and you want it back – here’s how you can enable SELinux in your Linux system.
Confirm current SELinux mode
Run the getenforce command to confirm that SELinux is actually disabled:
[root@rhel8 ~]# getenforce
Disabled
Check SElinux status with sestatus
sestatus normally shows verbose SElinux status information, but if SELinux is disabled, you’ll only get one line of output, like this:
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!