Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not sure if I remember when I installed red hat 5 on my server. So how I can be sure whether selinux is disabled or not?

share|improve this question
up vote 5 down vote accepted

Simply try

grep -i selinux /var/log/dmesg

The clean way to determine if selinux is enabled or not would be to use the selinuxenabled tool from libselinux-utils package. The issue is that your kernel could have selinux compiled and enforced, but (for various uncommon reasons) not have selinux-utils installed.
This is a quite uncommon situation, but it resambles to yours :)

share|improve this answer
selinux_register_security: Registering secondary module capability audit(1253173647.322:2): selinux=0 auid=4294967295 what is that mean? – Libyano Oct 13 '09 at 8:37
selinux=0 means it is disabled. Even if your kernel has selinux support it is disabled. – drAlberT Oct 13 '09 at 8:46

See Administrator Control of SELinux in the SELinux manual:

selinuxenabled;; echo $?

will display 0 if SELinux is enabled and -256 if it is disabled.

share|improve this answer
When i try /usr/bin/sestatus it says bash: /usr/bin/sestatus: No such file or directory , is that meaning selinux is not exists? – Libyano Oct 13 '09 at 8:34
No, it only means the utility doesn't exist. Use the selinuxenabled tool instead, like Zanchey suggests. – Roy Oct 13 '09 at 8:40
It seems he has not selinux-utils installed, but his kernel supports selinux, being disabled. – drAlberT Oct 13 '09 at 10:20
I believe RHEL has a customized set of tools. They are installed by default. – Roy Oct 13 '09 at 10:46
What is default for you? On my systems I use --no-base in the ks @packages section, and my defaults on RHEL is to not have such tools – drAlberT Oct 13 '09 at 11:01

The standard interactive tool on RHEL is getenforce. It outputs a message telling the user which mode SELinux is in: enforcing, permissive or disabled.

share|improve this answer

In Red Hat systems, you could edit /etc/selinux/config and set:


Reboot and you are golden.

share|improve this answer
do I really need to reboot to disable it? – cd1 Jan 28 '10 at 17:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.