How to turn off SELinux (RPM) inside Linux

Source: Internet
Author: User

There are a lot of Linux users because of the selinux is not familiar with, so it will be closed, to avoid affecting the use of other services, the following small series to share with you how to close selinux, I hope to help you.

    1. First we can use the command to view the status of SELinux

      Getenforce    This command can see the status of SELinux, which can now be seen in the off state.

    2. There is also a command to see the status of SELinux.

      sestatus-v

    3. There is also a setenforce command to set the status of SELinux,

      To view man  8 setenforce

    4. Assuming that SELinux is running, we can use the setenforce command to set the temporary shutdown without the restart effect.

      setenforce 0

    5. We can also edit the file and then restart it to take effect.

      Vi/etc/sysconfig/selinux

      Change the line to

      selinux=disabled

      and save it, then restart it.

    6. Changed, the contents of the file, such as

      Setenforce 0 can be temporarily closed, But it will still be the same after a reboot.

      Modify the /etc/sysconfig/selinux file to permanently disable it.

How to turn off SELinux (go) inside Linux

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.