Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to know if the kernel i am running has support for SELinux. What commands would i use to check this ?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

If you are running a 2.6 or later kernel, it is available. To know for sure, you have to look at the configuration for your kernel, look for the CONFIG_SECURITY_SELINUX_... configuration options (kernel configuration is probably a file /boot/config...).

If it is a distribution kernel, it is most probably enabled.

share|improve this answer
    
Running a kernel that was compile by someone else so the version won't matter to me, still might be disabled. I just check the config file in boot and it showed it as disabled ty : ) –  Xnub Apr 11 '13 at 19:27
    
cat /proc/config.gz | gunzip > running.config makes a copy of running config then i just did a search on it grep -i selinux /root/running.config –  Xnub Apr 11 '13 at 22:42

Pretty sure if you are running a 2.6 kernel, you have it. I use sestatus to check if SELinux is on or not. If the output of uname -r shows a 2.6.something kernel you probably have selinux support. Sestatus will show you if it is enabled or not.

share|improve this answer

Your Answer

 
discard

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.