A-A+

RHEL一条命令更改SELINUX

2015年11月02日 Linux运维 暂无评论 阅读 4,384 次

查看selinux运行状态

selinuxenabled && echo enabled || echo disabled

临时生效
setenforce 0

关闭selinux并且立即生效,并且是永久生效
setenforce 0
sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config

3个状态说明
# This file controls the state of SELinux on the system.
# SELINUX=disabled
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.

标签:

给我留言