查看、关闭SELinux
2015-08-21 14:41
423 查看
查看SELinux状态:
方法1
/usr/sbin/sestatus -v | grep "SELinux status:"
#输出结果是enabled为开启,disabled为关闭。
方法2
getenforce
#输出结果是permissive为关闭,enforcing为开启。
关闭SELinux:
1、临时关闭(不重启系统即可生效):
setenforce 0
##设置SELinux为permissive模式,即关闭SELinux;如果数字为1则设置SELinux为enforcing模式,即开 启SELinux
2、永久生效(修改后需要重启系统才能生效)
修改/etc/selinux/config 文件,将SELINUX=enforcing改为SELINUX=disabled
相关文章推荐
- Linux expect问题集:227 Entering Passive Mode (10,41,49,10,218,187). ftp: connect: Connection timed out
- Linux下获取线程TID的方法
- Linux expect问题集:ssh_exchange_identification: Connection closed by remote host
- Linux中Kill进程的N种方法
- Linux60命令
- Linux常用命令
- [Linux]使用Clang实现代码静态分析
- centos6.5 zabbix搭建及常见问题
- Linux expect自动登录ssh
- Linux命令(四)
- linux文件压缩命令
- centos 6.5 安装 Rstudio-server
- linux ubuntu 打包命令总结
- Linux脚本牛刀小试
- Linux 设备文件分类
- linux版本FTP下载
- linux 脚本入门篇
- Linux高效运维心得及技巧分享
- Linux时间子系统之(一):时间的基本概念
- Centos和Redhat的区别和联系