CentOS 7.0 View selinux status | off | open

Source: Internet
Author: User

When Linux is installed, it is usually the case that SELinux is turned on by default, which causes the installation of some services to be unsuccessful.

It can be completely closed if not needed, here is how to view it in CentOS 7.0 and turn off SELinux.

View SELinux Status

When Linux is installed, it is usually the case that SELinux is turned on by default, which causes the installation of some services to be unsuccessful. It can be completely closed if not needed, here is how to view it in CentOS 7.0 and turn off SELinux.                View SELinux status [[email protected] ~]# sestatus SELinux status:enabled selinuxfs Mount:                   /sys/fs/selinux selinux root directory:/etc/selinux Loaded policy name:targeted Current mode: Enforcing Mode from config file:enforcing policy MLS status:enabled policy Deny_ Unknown status:allowed Max kernel policy version:28 temporarily closed [[email protected] ~]# Setenforce 0 Permanently closed, can modify configuration file /etc/selinux/config, set the SELinux to Disabled.  [[email protected] ~]# cat/etc/selinux/config # This file controls the state of the SELinux on the system.  # selinux= can take one of the these three values: # Enforcing-selinux Security policy is enforced.  # Permissive-selinux Prints warnings instead of enforcing.  # disabled-no SELinux policy is loaded. #SELINUX =enforcing selinux=disabled # SElinuxtype= can take one of three one of the values: # targeted-targeted processes is protected, # minimum-modific Ation of targeted policy.   Only selected processes is protected.  # Mls-multi level Security protection.  Selinuxtype=targeted[[email protected] ~]# sestatus SELinux status:disabled

Temporarily closed

permanently closed , You can modify the configuration file/etc/selinux/config to set the SELinux to Disabled.

[Email protected] ~]# Cat/etc/selinux/config         
# This file controls the state of the SELinux on the system.
# selinux= can take one of these three values:
# Enforcing-selinux security policy is enforced.
# Permissive-selinux Prints warnings instead of enforcing.
# Disabled-no SELinux policy is loaded.
#SELINUX =enforcing selinux=disabled
# selinuxtype= can take one of three the values:
# targeted-targeted processes is protected,
# Minimum-modification of targeted policy. Only selected processes is protected.
# Mls-multi level Security protection. selinuxtype=targeted
[Email protected] ~]# sestatus SELinux Status: disabled

CentOS 7.0 View selinux status | off | open

Related Article

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.