Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to check SELinux status and turn off SELinux under Linux

Shulou Source: shulou.com Published: 2022-06-01 12:48:40 10月03日 Update

This article introduces the knowledge of "how to check SELinux status and turn off SELinux under Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. View the SELinux status command:

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

SELinux status: enabled

2. Getenforce # # can also use this command to check

2. Disable the SELinux method:

1. Temporarily shut down (no need to restart the machine):

The code is as follows:

Setenforce 0 # sets SELinux to permissive mode

# setenforce 1 sets SELinux to enforcing mode

2. To modify the configuration file, you need to restart the machine:

Modify / etc/selinux/config file

Change SELINUX=enforcing to SELINUX=disabled

Just restart the machine.

This is the end of the content of "how to check SELinux status and turn off SELinux under Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: State machine content commands files more patterns knowledge practicality learning next no code parameters dilemma actual situation article method case Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Apple Shulou Technology Shulou Information MySQL