- Temporarily disable
Run the command setenforce 0 to temporarily disable SELinux
- Permanently disable
a. Open the selinux config file
vi /etc/selinux/config
b. Find SELINUX=enforcing, press i to enter edit mode, and change the parameter to SELINUX=disabled.
c. When you are done, press the Esc key, type the command :wq, and the file is saved and closed.
- Run the command
getenforceand verify thatSELinuxisdisabled, which meansSELinuxis turned off.