Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to turn off SELinux in a linux system

Shulou Source: shulou.com Published: 2022-06-02 13:48:48 10月04日 Update

How do I turn off SELinux in a linux system? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

The linux system closes SELinux by: 1, opening the config configuration file; 2, finding the configuration [SELINUX=enforcing] and changing it to [SELINUX=disabled]; 3, saving the file and exiting.

There are usually two ways to turn off SELinux, one is temporary shutdown, the other is permanent shutdown. Let's introduce these two methods respectively.

1. Temporary shutdown

Just execute the command setenforce 0. After shutting down by this method, SELinux will still be turned on after rebooting the system.

2. Permanently close

First open the configuration file with the following command

Vi / etc/selinux/config

Then change SELINUX=enforcing to SELINUX=disabled

Finally, save the file and exit.

This is the answer to the question about how to shut down SELinux in the linux system. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Tags: Methods systems files questions configuration Zhongguan commands more permanent help answers easy easy content guys partners knowledge articles industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL macOS Xiaomi vpn Huawei