Knowledgebase

How to Disable SELinux Status in CentOS 7?

Check SELinux Status:

First login as a root on centOS7.

Now check the status of SELinux by following command.
sestatus


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

Disable 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 this line and write “disabled”Then press “Esc” after that press “shift+z+z” to save changes.

   

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

reboot

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

sestatus

The output should look like this:



Now your SELinux is disabled.

  • 0 Users Found This Useful
Was this answer helpful?
Related Articles
Copyright © 2022 Golden Host. All Rights Reserved.