View, close SELinux

Source: Internet
Author: User

To view the SELinux status:

1,/usr/sbin/sestatus-v | grep "SELinux Status:" # #如果SELinux the status parameter is enabled


2, Getenforce # #除了上面的命令还可以使用这个命令, the output is permissive to close, enforcing to open.


To turn off SELinux:

1, temporary shutdown (do not restart the system can be effective):

Setenforce 0 # #设置SELinux为permissive模式, that is, turn off SELinux, if the number is 1 set SELinux to enforcing mode, which is to turn on SELinux


2, modify the configuration file (need to restart the system after the change to take effect)

Modify the/etc/selinux/config file

Change Selinux=enforcing to Selinux=disabled


This article is from the "Wang Ke's Technical blog" blog, please be sure to keep this source http://wangxiaoke.blog.51cto.com/5150707/1686845

View, close SELinux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.