How to Enable & Disable SELinux in Ubuntu
In Ubuntu, you can use the following commands to enable and disable SELinux:
- Enable SELinux.
sudo setenforce 1
– Or
sudo selinux-activate
- Disable SELinux:
sudo setenforce 0
Otherwise
sudo selinux-deactivate
It is important to note that the above methods only temporarily disable or enable SELinux, and the system will revert to the default settings after a reboot. If you need to permanently disable or enable SELinux, you can edit the /etc/selinux/config file and change SELINUX=enforcing to SELINUX=disabled to permanently disable SELinux.