[root@host ~]# which ping
/bin/ping
[root@host ~]# rpm -qf /bin/ping
iputils-20071127-17.el6_4.2.x86_64
先用which查看命令的绝对路径,在用rpm -qf 绝对路径即可查看命令对应的安装包