How do I check what options are compiled into a Linux kernel without looking at /boot/config-*
and if I don't have access to the /boot/config-*
file that's left over?
-
1Similar on SU: superuser.com/questions/287371/…– Ciro Santilli OurBigBook.comCommented Apr 29, 2015 at 21:40
Add a comment
|
2 Answers
Unless your kernel was built with CONFIG_IKCONFIG_PROC
, which would make the config available in /proc
as sysadmin1138 mentioned above, you're pretty much out of luck. Debian and RH based kernel packages do, however, generally install a config-$version
file in /boot
. So unless it's a custom kernel, it should be available there.
I believe /proc/config.gz contains the .config file the kernel was compiled with.
-
8That's only available if
CONFIG_IKCONFIG_PROC
was set when the kernel was built. Doesn't seem to be there by default on RHEL or Ubuntu.– InsyteCommented Aug 6, 2009 at 17:19 -
5
-
7to read (or grep) the current settings from config.gz you can unzip it with
$cat /proc/config.gz | gunzip > mykernel.conf
as suggested by Jarl on superuser.com.– xaaCommented Oct 29, 2015 at 10:59 -
-
3@xaa Or you can use the single command alternatives
zcat
orzless
, the latter of which is more convenient as it is a pager which allows you to scroll and search as well.– comfreakCommented Aug 28, 2019 at 18:45