Ubuntu/Debian:
which ping
dpkg -S /bin/ping
apt-get source iputils-ping
同样,你可以自己到软件源去下载:
Ubuntu:
http://archive.ubuntu.com/ubuntu/pool/main/i/iputils/ 包括二进制程序和源代码
http://mirrors.oschina.net/ubuntu/pool/main/i/iputils/ 这是开源中国的镜像源
Debian:
http://mirror.debian.org/status.html
http://mirrors.ustc.edu.cn/debian/pool/main/i/iputils/
安装构建iputils-ping依赖的包,方便直接编译调试下载的源代码:
sudo apt-get build-dep iputils-ping
这些源码包都提供有Makefile,直接make构建就好了.
Fedora/CentOS:
which ping
rpm -qf /bin/ping
yumdownloader --source iputils
Fedora:
http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Everything/source/SRPMS/i/iputils-20121221-4.fc20.src.rpm
http://mirrors.oschina.net/fedora/releases/20/Everything/source/SRPMS/i/iputils-20121221-4.fc20.src.rpm
http://mirrors.oschina.net/fedora/releases/20/Everything/x86_64/os/Packages/i/iputils-20121221-4.fc20.x86_64.rpm
CentOS:
http://vault.centos.org/6.4/os/Source/SPackages/iputils-20071127-16.el6.src.rpm 源代码
http://mirror.centos.org/centos/6/os/x86_64/Packages/ 二进制程序
http://mirrors.oschina.net/centos/6/os/x86_64/Packages/ 二进制程序
Linux Kernel源代码目录:http://www.linuxdiyf.com/linux/16449.html
成为一名更好的程序员:如何阅读源代码:http://www.linuxdiyf.com/linux/16113.html
查询linux程序对应的开源代码:http://www.linuxdiyf.com/linux/13972.html
如何查看Linux命令源代码:http://www.linuxdiyf.com/linux/13796.html
打造阅读Linux源代码利器:http://www.linuxdiyf.com/linux/13607.html