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 https://www.kernel.org/ seems that there isn't..

  • 1
    Sometimes it is enough to install the kernel headers with apt-get install linux-headers-$(uname -r).
    – jofel
    Jul 3, 2014 at 11:55

1 Answer 1


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
  • 2
    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, 2014 at 11:53
  • @jofel thank you for the precision, I corrected my answer
    – Kiwy
    Jul 3, 2014 at 11:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .