查看SELinux状态及关闭SELinux

更新时间:2023-06-10 02:47:29 阅读: 评论:0

查看SELinux状态及关闭SELinux ⼀、查看SELinux状态:
1、我们可以通过查看配置⽂件的命令 cat /etc/linux/config 来查看状态
[root@lill ~]# cat /etc/linux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of the three values:
scarf的复数#    enforcing - SELinux curity policy is enforced.
#    permissive - SELinux prints warnings instead of enforcing.
喜欢的英文
#    disabled - No SELinux policy is loaded.
containersSELINUX=enforcing
# SELINUXTYPE= can take one of the two values:
儿童英文歌曲视频#    targeted - Targeted process are protected,
#    mls - Multi Level Security protection.sheet什么意思
SELINUXTYPE=targeted
发现SELinux共有3个状态enforcing (执⾏中)、permissive (不执⾏但产⽣警告)、disabled(关闭)。2,也可以⽤这个命令检查:getenforce
[root@localhost /]# getenforcepayroll
Enforcingesntiale
3、也可以⽤下述命令;如果SELinux status参数为enabled即为开启状态
[root@localhost /]# /usr/sbin/status -v
SELinux status:                enabled
与领导相处的艺术
⼆、关闭SELinux:
1、临时关闭(重启机器后失效):
#tenforce 0设置为permissive模式;tenforce 1 设置为enforcing模式;
tenforce 0
2、永久关闭(需要重启机器):
电话英语
flowers是什么意思d -i s#SELINUX=enforcing#SELINUX=disabled# /etc/linux/config
重启机器即可

本文发布于:2023-06-10 02:47:29,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/139937.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:状态   关闭   命令
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图