I did the following before updating the kernel:

apt-get source linux-image-$(uname -r)

Then I got this folder after unzipping:


But inside is just this:




But I don't see anything folders like arch/ orblock

Did I do something wrong? I already updated the kernel and I have a 4cpu pc so it took many hours to do this. How can I get the kernel from what I already downloaded? Also I took reference to this answer and this page of instructions. I cloned bionic but need the version So I then checked this out into a branch called temp. How do I get the files at this location? I tried to clone temp but it doesn't work.

  • 1
    You downloaded metapackage - those just serve as lists of bunch other packages to install, that's where source code actually is. Find out that package's dependencies and download those – Sergiy Kolodyazhnyy Sep 7 at 4:12
  • The rules and what makes up the meta package can be found in the debian/ directory – guiverc Sep 7 at 5:40
  • It seems that you can't get kernel source code this way anymore. But you can get the source from git. – Pilot6 Sep 7 at 9:13
  • The sudo apt install linux-source command is what you want. – waltinator Sep 10 at 23:02

Get the current linux source code by

apt-get source linux-image-unsigned-$(uname -r)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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