Linux – Obtain kernel config from currently running Linux system

kernellinux

I accidentally deleted my .config for my kernel configuration on Linux, and seem to remember there was a way to retrieve the kernel configuration via the proc filesystem somehow.

Is this still possible, and if so how would I do it?

Best Answer

Depending on your system, you'll find it in any one of these:

  1. /proc/config.gz
  2. /boot/config
  3. /boot/config-$(uname -r)

and possibly more places.