Small example: Get source code for Linux built-in commands (which + dpkg + apt-get source)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.