Get the App
SLTechnology News&Howtos  ›  Development  › 

How does Linux shut down selinux?

Shulou Source: shulou.com Published: 2022-06-01 20:05:35 10月01日 Update

This article mainly introduces the relevant knowledge of "how Linux shuts down selinux". The editor shows you the operation process through an actual case. The operation method is simple and fast, and it is practical. I hope this article "how Linux shuts down selinux" can help you solve the problem.

1. View [root@dev-server ~] # getenforce Disabled [root@dev-server ~] # / usr/sbin/sestatus-v SELinux status: disabled2, temporarily close # # set SELinux to permissive mode # # setenforce 1 set SELinux to enforcing mode setenforce 03, permanently close vi / etc/selinux/config and change SELINUX=enforcing to SELINUX=disabled setting to take effect

Centos 7.0View selinux status | off | enable Linux. After installation, SELinux is usually enabled by default, which will lead to unsuccessful installation of some services.

You can turn it off when you don't need it. Here's how to view it in centos 7. 0 and turn off selinux.

Check the selinux status [root@localhost ~] ``# sestatus`` SELinux status: enabled ``SELinuxfs ``mount``: ``/ sys/fs/ selinux` SELinux root directory:`` / etc/ selinux`` Loaded policy name: targeted ``Current mode: enforcing ``Mode from config ``file``: enforcing ``Policy MLS status: enabled ``Policy deny_unknown status: allowed ``Max kernel policy version: 28 temporarily close [root@localhost ~] ``# setenforce 0 to modify the configuration file / etc/selinux/config permanently Set SELINUX to disabled.

[root@localhost ~] ``# cat / etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing-SELinux security policy is enforced. # permissive-SELinux prints warnings instead of enforcing. # disabled-No SELinux policy is loaded. # SELINUX=enforcing SELINUX=disabled # SELINUXTYPE= can take one of three two values: # targeted-Targeted processes are protected, # minimum-Modification of targeted policy. Only selected processes are protected. # mls-Multi Level Security protection. SELINUXTYPE=targeted [root@rdo ~] ``# sestatus SELinux status: disabled's content on "how Linux shuts down selinux" ends here. Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Status knowledge situation model industry permanent different practical successful content practical practical document article method is in more cases knowledge points articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Apple Xiaomi Linux Redmi