yum whatprovides ifconfig
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
*Note* Spacewalk repositories are not listed below. You must run this command as root to access Spacewalk repositories.
dockerrepo/filelists_db | 12 kB 00:00:00
epel/7Server/x86_64/filelists_db | 7.2 MB 00:00:00
openafs/x86_64/filelists_db | 19 kB 00:00:00
net-tools-2.0-0.22.20131004git.el7.x86_64 : Basic networking tools
Repo : @rhel-x86_64-server-74
Matched from:
Filename : /sbin/ifconfig
可以从中看到依赖的是net-tools包,所以我们可以用下面的命令来安装包含ifconfig命令的包
yum install net-tools
同样的命令还可以用下面这个来查找依赖关系包
yum provides ifconfig
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
*Note* Spacewalk repositories are not listed below. You must run this command as root to access Spacewalk repositories.
net-tools-2.0-0.22.20131004git.el7.x86_64 : Basic networking tools
Repo : @rhel-x86_64-server-74
Matched from:
Filename : /sbin/ifconfig