If you followed the instructions, you have installed a kernel source package, named linux-source-3.13.0
, e.g., by
sudo apt-get install linux-source-3.13.0
or
sudo apt-get install linux-source
which installs a virtual package that installs the versioned package as a dependency.
Having done that, you can find the file you were looking for (using the package name):
dpkg -L linux-source-3.13.0 |grep -F signal.c
and get the pathname(s) of any files in that package named "signal.c"
If the package was actually a tarball of the sources, you would have to extract those files, e.g., using tar
. In that case, dpkg -L linux-source
would only list the tarball (and the grep would return nothing).
For the case of a tarball, you could do this:
tar tvf $(dpkg -L linux-source-3.13.0) |grep -F signal.c
if it contained only one file. But supposing you had something like
/usr
/usr/src
/usr/src/linux-patch-3.13-rt.patch.bz2
/usr/src/linux-source-3.13.tar.bz2
/usr/share
/usr/share/doc
/usr/share/doc/linux-source-3.13
/usr/share/doc/linux-source-3.13/copyright
/usr/share/doc/linux-source-3.13/changelog.Debian.gz
/usr/share/doc/linux-source-3.13/README.Debian
then the file you are looking for would be in the "tar.bz2" file, so...
tar tvf $(dpkg -L linux-source-3.13.0|grep -F .tar.bz2) |grep -F signal.c
would show the pathnames within that tarball for "signal.c"
Further reading:
linux-source
with something else? I get the output:package 'linux-source' is not installed
. I tried replacing it withlinux-image-extra-3.19.0-65-generic
, without results. – HelterSkelter Jul 31 '16 at 18:05dpkg-query: package 'linux-source' is not installed
– HelterSkelter Jul 31 '16 at 18:09sudo apt-get source linux-image-$(uname -r)
– Chef Pharaoh Aug 01 '16 at 16:05sudo apt-get install linux-source-3.13.0
. If I would, will it reinstall the current Kernel? I don't want that.|2.| @ChefPharaoh, I executed what you suggested. What should I do next?
dpkg -L linux-source
still results in the above message. I did, however, trieddpkg -L linux-image-$(uname -r)
, and the output looks similiar to @ThomasDickey's output, but with no.bz2
files.|3.| In examining the output of ``sudo apt-get install linux-source-3.13.0
– HelterSkelter Aug 03 '16 at 07:11, I do see this:
linux-lts-vivid-3.19.0/kernel/signal.c`. But I can't find it on my pc.linux-source...
provides the source files;linux-image...
provides the kernel. Did you runapt-get install linux-source-...
? Your comment says that |1.| you didn't, and |3.| you did (and examined the output). – JigglyNaga Aug 03 '16 at 09:31sudo apt-get source linux-image-$(uname -r)
" – HelterSkelter Aug 03 '16 at 12:28sudo apt-get install linux-source-3.13.0
, and then trieddpkg -L linux-source
, and again got the message:package 'linux-source' is not installed
. – HelterSkelter Aug 03 '16 at 12:33