download the source code of some commands

Greg Freemyer greg.freemyer at gmail.com
Thu Jun 21 10:42:12 EDT 2012


On Thu, Jun 21, 2012 at 8:48 AM, 王哲 <wangzhe5004 at gmail.com> wrote:
>   Hi all:
>        I want to see some source code of some commands,for
> example,halt,reboot,uptime,and so on.
>
> but i don't kown where to download?   can you give me some advice?
>
> Thanks in advance!

You need to figure out how your distro of choice lets you query the
filelist for packages.

I use openSUSE primarily and it has the Yast tool that lets you do
that in the software management section.

uptime => coreutils
reboot => aaa_base
halt => aaa_base

Once you know the package your distro uses you can download the
corresponding source package for it.

You will have better luck learning the process you need to know by
asking on a distro specific mailing list.

Greg



More information about the Kernelnewbies mailing list