Linux – the current kernel build options stored

compilinglinux-kernel

Is there a way to know if the kernel was compiled with a certain option activated (i.e. CONFIG_PROC_EVENTS=y) without having to pull out the kernel sources package and looking in the config file?

Best Answer

If you look through your /boot directory you'll notice these files:

$ ls -l /boot/|grep config
-rw-r--r--  1 root root   109919 Oct 21  2011 config-2.6.35.14-100.fc14.x86_64
-rw-r--r--  1 root root   109919 Oct 27  2011 config-2.6.35.14-103.fc14.x86_64
-rw-r--r--  1 root root   109919 Nov 23  2011 config-2.6.35.14-106.fc14.x86_64

Notice what version of the Kernel you're using:

$ uname -r
2.6.35.14-106.fc14.x86_64

If you grep through the appropriate "config-uname -r" file you can see what options the Kernel was built with:

$ grep CONFIG_PROC_EVENTS= /boot/config-`uname -r`
CONFIG_PROC_EVENTS=y

References

Related Question