Linux常用命令-setenforce 发表于 2021-03-21 分类于 command 命令setenforce 描述modify the mode SELinux is running in更改SELinux运行模式 用法1setenforce [Enforcing|Permissive|1|0] 选项无 注意无 示例123456789101112# Use Enforcing or 1 to put SELinux in enforcing mode.# Use Permissive or 0 to put SELinux in permissive mode.# 临时关闭SELinux$ setenforce 0# 永久关闭$ sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config# 查看当前SELinux状态$ getenforceDisabled$ sestatus SELinux status: disabled