How to check selinux status

Source: Internet
Author: User
The method for checking the selinux status is as follows: kernel (document ID432988.1) selinux has three modes: Enforcing (orknownasenabled), DisabledorPermissive. PermissivemodeloadstheSELinuxsoftware, butdoesntenf

Method for checking selinux status: Source: How to Check whether SELinux is Enabled or Disabled (Document ID 432988.1) selinux has three modes: Enforcing (or known as enabled), Disabled or Permissive. permissive mode loads the SELinux software, but doesnt enf

How to check selinux status:

Source:
How to Check whether SELinux is Enabled or Disabled (Document ID 432988.1)

Selinux has three modes:
Enforcing (or known as enabled), Disabled or Permissive.

Permissive mode loads the SELinux software, but doesn' t enforce the rules, only logging is performed med.

Run the following command to check the status of selinux:

[Root @ servera ~] # Uname-aLinux servera 2.6.18-308. el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 [this article is from the Internet (http://www.68idc.cn)] x86_64 GNU/Linux [root @ servera ~] # SestatusSELinux status: disabled [root @ servera ~] # GetenforceDisabled [root @ servera ~] #

If the selinux status is determined in the program, use the following command:

[root@servera ~]# /usr/sbin/selinuxenabled; if [ $? -ne 0 ]; then echo "DISABLED"; else echo "ENABLED"; fiDISABLED

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.