在Linux中,某些命令名称和rpm包的名称是不一样的,需要通过查询其依赖包进行安装。
CentOS:
比如ifconfig安装:
[root@192.168.138.150-mysql-master ~] # yum provides *bin/ifconfig Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: my.mirrors.thegigabit.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com net-tools-2.0-0.25.20131004git.el7.x86_64 : Basic networking tools Repo : base Matched from: Filename : /sbin/ifconfig net-tools-2.0-0.25.20131004git.el7.x86_64 : Basic networking tools Repo : @base Matched from: Filename : /sbin/ifconfig
==========================================
[root@192.168.138.150-mysql-master ~] # yum -y install net-tools
注:其它版本的linux系统可能有所不同。
Centos系统还可以使用这个命令 # yum whatprovides */ifconfig