How to Enable SELinux Status in CentOS 7?

  • 48

Initial Steps:

First login as a root on centOS7.

Now check the status of SELinux by following command.

If it is already enable, then there is no need to enable it on the other hand if this screen displayed in front of you then follow the steps given below.

Enable SELinux:

To permanently disable SELinux on CentOS 7 system, follow the steps below.

  1. Open the /etc/selinux/config file and edit the SELINUX mod to disabled

vi /etc/selinux/config
this will show you the image like given below.

As the above image shows that it is enabled now press “i” to insert or edit this file now navigate to Red line and write “enable”.

Then press “Esc” after that press “shift+z+z” to save changes.


  1. Save the file and reboot your CentOS system with.


  1. After reboot verify the change with the sestatus command.



The output should look like this


Was this answer helpful?