Re: download the source code of some commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you use Debian or other distribution with apt package system.

You can use whereis to locate this command.
[~]$ whereis halt
halt: /sbin/halt /usr/share/man/man5/halt.5.gz /usr/share/man/man8/halt.8.gz

Then, use dpkg -S to show which package it's included. This one is: sysvinit.
[~]$ dpkg -S /sbin/halt
sysvinit: /sbin/halt

Now, you can download the source from Debian source, use:
[~]$ apt-get source sysvinit

Or if you want the original source, use aptitude (or apt-cache) find
it's homepage.
[~]$ aptitude show sysvinit
Package: sysvinit
......
Homepage: http://savannah.nongnu.org/projects/sysvinit

At last, get it from there. As for other package systems, I think there
should be a way too. Or you can google.
 
On 2012-06-21 20:48:48 +0800, 王哲 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!
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-- 
Regards,
Lei

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux