1

I am running Ubuntu desktop 16.04 I tried to get the kernel sources using the command

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

as recommended in the Ubuntu wiki. I got the error

E: You must put some source URIs in your sources.list

I searched the web and found advice on editing sources.list, but don't know what specifically I need to do to get the kernel sources. I am new to this; can someone help?

6
  • Specifically for the kernel, you need at least one deb-src line with main in it.
    – muru
    May 17, 2016 at 21:51
  • OK., so I tried editing the sources.list file, but of course, it is read-only. The system keeps asking me for the root (or sudo) password, but I was not asked to specify one when installing the system (which I did by running the standard UI-based install onto a VM. How do I find the root password? May 18, 2016 at 5:31
  • You might have to reset (!) it: askubuntu.com/q/24006/158442
    – muru
    May 18, 2016 at 5:46
  • Thanks Muru. I edited the sources.list file and uncommented the deb-src lines that were present. One such line is "deb-src us.archive.ubuntu.com/ubuntu xental main restricted" and other similar lines for updates, etc. May 18, 2016 at 15:10
  • 1
    did you run sudo apt-get update after modifying that file?
    – muru
    May 18, 2016 at 15:19

0

Browse other questions tagged or ask your own question.