Demand:
When developing SSVM version management System, think of uname can get the Linux kernel version information, so want to download uname command source code reference to see
Example:
$ which uname [find the location of the uname command]
/bin/uname
$ dpkg-s/bin/uname [find the code in which the uname belongs in the development package]
Coreutils:/bin/uname
$ apt-get Source coreutils [Download the source of the related package]
[When downloading, if the following problems occur, the solution to see below]
[Sh:dpkg-source:not found
Unpack command ' Dpkg-source-x COREUTILS_7.4-2UBUNTU3.DSC ' failed.
Check if the ' Dpkg-dev ' package is installed.
E:child Process failed]
$ sudo apt-get install dpkg-dev-y
$ apt-get Source Coreutils
[After downloading the source, the following file will be generated in the current directory]
coreutils-7.4/
Coreutils_7.4-2ubuntu3.diff.gz
Coreutils_7.4-2ubuntu3.dsc
Coreutils_7.4.orig.tar.gz
$ find. -name uname* [All files beginning with find search uname]
This article is from the "Andyhdchoice" blog, make sure to keep this source http://andyhdchoice.blog.51cto.com/1521623/1548759
Small example: Get source code for Linux built-in commands (which + dpkg + apt-get source)