How to view and shut down SELinux on Linux systems

  
                

SELinux is an expansion preemptive access control security module for Linux that can control programs to access only specific files. So how does SELinux view and shut down? The following small series will introduce you how to view and close SELinux under Linux.

First, the state command to view the SELinux:

1, /usr /sbin /sestatus -v ## if SELinux status parameter is enabled is the open state

SELinux status: enabled

2, getenforce ## can also use this command to check

Second, close SELinux method:

1, temporarily shut down (do not restart the machine): < Br>

The code is as follows:

setenforce 0 #Set SELinux to be permissive mode

#setenforce 1 Set SELinux to enforcing mode

2, modify the configuration file needs to restart the machine :

Modify /etc/selinux/config file

Change SELINUX=enforcing to SELINUX=disabled

Restart the machine

The above is under Linux The method of viewing and closing SELinux is introduced. If you don't know how to view SELinux, or if you want to shut down SELinux, you can try the methods described in this article to solve your problem easily.

Copyright © Windows knowledge All Rights Reserved