> ## Content Index
> Fetch the complete content index at: https://oyang.cc/llms.txt
> Use this file to discover other available public pages before exploring further.

# CentOS7关闭SELinux
- URL: https://oyang.cc/centos7guan-bi-selinux-2/
- Published: 2021-06-10T00:46:25.000Z
- Updated: 2021-06-10T00:46:28.000Z
- Author: 轶语林
- Tags: centos

## **查看**

```
[root@dev-server ~]# getenforce
Disabled
[root@dev-server ~]# /usr/sbin/sestatus -v
SELinux status:                 disabled
```

## **临时关闭**

```
##设置SELinux 成为permissive模式
##setenforce 1 设置SELinux 成为enforcing模式
setenforce 0
```

## **永久关闭**

```
vi /etc/selinux/config
```

将SELINUX=enforcing改为SELINUX=disabled  
设置后需要重启才能生效