Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to view and close SELinux in Linux system

Shulou Source: shulou.com Published: 2022-06-01 12:13:19 09月30日 Update

This article mainly explains "how to view and close SELinux in Linux system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "How to view and close SELinux in Linux system"!

1. Check SELinux status command:

1./usr/sbin/sestatus -v ##If SELinux status parameter is enabled, it is enabled

SELinux status: enabled

2. getenforce ##can also be checked with this command

Second, close SELinux method:

1. Temporary shutdown (without restarting the machine):

The code is as follows:

setenforce 0 #Set SELinux to permissive mode

#setenforce 1 Set SELinux to enforcement mode

2. Modifying the configuration file requires restarting the machine:

Modify the/etc/selinux/config file

For SELINUX=enforcing read SELINUX=disabled

Restart the machine

At this point, I believe that everyone has a deeper understanding of "how to view and close SELinux in Linux system," so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: System machine content command file method mode state learning practical deeper no code interest parameter practical practical easy to operate more friends Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple MariaDB Microsoft Shulou Tech Info