Wednesday, February 14, 2018

Finding the path of Kernel source code



I have the following situation. Let's say, I have 3 kernel images installed in my system. But currently, image 3.0.0-generic is running. And the source code for all three kernels are located at different paths.



So now, if I wanted to find the source of currently running kernel image, how do I do that? I know uname -r will give the current kernel image. But how do I find the path of the resulting kernel?



The below command will produce the list of files which are owned by your current kernal,




dpkg -L $(dpkg --get-selections | grep linux-image-`uname -r`)

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...