CentOS7 Close SELinux

Source: Internet
Author: User

SELinux, an abbreviation of security-enhanced Linux, are a Security enhancement to the Linux operating system. It is a labeling system, blocks many system functions in its default configuration.

SELinux are very useful for some users, but due to their administrative overhead, you could be better off simply disabling it. The time spent adding rules and updating permissions on SELinux versus the added security benefit could not be worth it.

First check if SELinux is disabled or enabled:


If This command returns "SELinux status:enabled", you can disable SELinux with the following command.

setenforce 0

The command above would only disable SELinux for now and the change would be reverted across reboots. Therefore, disable it permanently by opening the file and /etc/sysconfig/selinux replace the current SELINUX directive with a value disabled of So it looks like this:

vim /etc/sysconfig/selinux

Check the SELinux status again to make sure, it has been properly disabled.


CentOS7 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.