39

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?

39

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.

30

I believe /proc/config.gz contains the .config file the kernel was compiled with.

  • 6
    That'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. – Insyte Aug 6 '09 at 17:19
  • 3
    As of writing, this is enabled by default on Arch :) – Navin Apr 25 '13 at 0:33
  • 6
    to 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. – xaa Oct 29 '15 at 10:59
  • It is the case on Arch Linux as CONFIG_IKCONFIG_PROC=y. – Terry Wang Jan 4 '18 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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