How do I view Linux kernel configuration?
Posted by danielApr 23
Linux kernel – check the kernel options enabled during kernel compilation.
You might want to know whether a certain kernel option was enabled or not when your kernel was built, say if Symmetric multiprocessing (SMP) was enabled, or if KVM was compiled directly into the kernel or just as a loadable module. To answer this, you can look at the /boot/config-$(uname -r) file.
To find out if SMP is enabled in your system for instance, search for all SMP keywords in the kernel configuration –
daniel@linubuvma:~$ grep SMP /boot/config-$(uname -r) CONFIG_X86_64_SMP=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_SMP=y # CONFIG_X86_VSMP is not set # CONFIG_MAXSMP is not set CONFIG_PM_SLEEP_SMP=y CONFIG_SCSI_SAS_HOST_SMP=y CONFIG_VIDEO_VP27SMPX=m
The ‘CONFIG_SMP=y’ setting indicates that the SMP module was compiled directly in the kernel, it is part of the monolithic kernel.
If your kernel was built with ‘CONFIG_IKCONFIG_PROC’, then the /proc/config.gz will contain the .config file the Linux kernel was compiled with.
daniel@linubuvma:~$ grep CONFIG_IKCONFIG_PROC /boot/config-$(uname -r) daniel@linubuvma:~$ daniel@linubuvma:~$ ls /proc/config.gz ls: cannot access /proc/config.gz: No such file or directory
In my case, the kernel was not built with ‘CONFIG_IKCONFIG_PROC’.
No comments
You must be logged in to post a comment.