How to Disable SELinux on ubuntu 18.04/20.04 LTS


SELinux is depicted as a required admittance control (MAC) security structure executed in the part. SELinux offers a methods for authorizing some security arrangements which would somehow not be successfully executed by a System Administrator.


In this post, We will disable SELinux Temporarily or Permanently on ubuntu 18.04/20.04 LTS.


Step 1: Get SELinux Status 


You need to check the status of the selinux by using the command. 

$ sudo sestatus


Step 2: Temporarily Disable SELinux


To disable temporarily SElinux, Use the below command.

$ sudo setenforce 0


Step 3: Permanently Disable SELinux

You need to open the selinux config file by using the command and change the status.

$ sudo vim /etc/selinux/config

change the enforcing to disabled in the SELinux file.


and get the SElinux Status again by using the given commands.

$ sudo sestatus 




In this post, We have disabled SElinux on ubuntu 20.04 LTS server, Still you have any question, Please leave a comment.

How to Disable SELinux on ubuntu 18.04/20.04 LTS

One thought on “How to Disable SELinux on ubuntu 18.04/20.04 LTS

  1. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top