Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I need a specific kernel version to compile it with some additional modules.

When I typing:

uname -r

I get


I need this one.

 uname -a
 Linux "..." 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Where can I find this version? Here seems that there isn't..

share|improve this question
Sometimes it is enough to install the kernel headers with apt-get install linux-headers-$(uname -r). – jofel Jul 3 '14 at 11:55

1 Answer 1

up vote 6 down vote accepted

You could just use apt to get the source, check that the file /etc/apt/sources.list contains a line starting with


and then use the command:

apt-get update
#if you want to download the source into the current directory use:
apt-get source linux-image-$(uname -r)
#if you want the source to be installed in the system directory use:
apt-get install linux-source-$(uname -r)

It will download the source in the folder:

/usr/src or /usr/sources
share|improve this answer
The answer is not fully correct - it mixes two things. apt-get source downloads the package source files into the current directory. /usr/src is only filled if you are installing the source package with apt-get install linux-source-$(uname -r). – jofel Jul 3 '14 at 11:53
@jofel thank you for the precision, I corrected my answer – Kiwy Jul 3 '14 at 11:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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