可在已安装该命令的的系统中执行如下命令,例如查找netstat这个命令所属的rpm包

[root@localhost ~]#rpm -qf /usr/bin/netstat
net-tools-2.0-0.17.20131004git.el7.x86_64

也可以用yum命令在本机查找,如下

当命令未安装时,状态如下

[root@r820a ~]# yum whatprovides telnet
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
1:telnet-0.17-59.el7.x86_64 : The client program for the Telnet remote login protocol
Repo        : local

当命令已安装时,状态如下

[root@r820a ~]# yum whatprovides scp
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
local/filelists_db                                                 | 2.9 MB  00:00:00     
openssh-clients-6.6.1p1-22.el7.x86_64 : An open source SSH client applications
Repo        : local
Matched from:
Filename    : /usr/bin/scp