How to disable SELinux on CentOS

SELinux is the security mechanism for Linux. Think carefully before disabling the SELinux and think more when you are disabling it for a public server. In this tutorial I will explain you how to disable SELinux in CentOS.

How to verify the status of SELinux:

For temporary basis you can issue the below command to switch the SELinux to permissive mode:

CentOS-LogoThe above command will switch the SELinux to permissive mode for that session. But if you want to disable the SELinux permanently then for the below instruction.

Change the SELINUX=enforcing to SELINUX=disabled like below example:

The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply