解决 ifconfig command not found

1.找出哪个包提供了ifconfig命令

yum provides ifconfig

2.从输出样例中看出net-tools包提供了ifconfig命令,所以只安装net-tools包来使用ifconfig命令

Loaded plugins: fastestmirror
base                                                             | 3.6 kB  00:00:00     
extras                                                           | 3.4 kB  00:00:00     
updates                                                          | 3.4 kB  00:00:00     
(1/4): base/7/x86_64/group_gz                                    | 156 kB  00:00:00     
(2/4): extras/7/x86_64/primary_db                                | 130 kB  00:00:00     
(3/4): base/7/x86_64/primary_db                                  | 5.7 MB  00:00:04     
(4/4): updates/7/x86_64/primary_db                               | 3.6 MB  00:00:44     
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.cn99.com
 * updates: centosr4.centos.org
base/7/x86_64/filelists_db                                       | 6.7 MB  00:00:04     
extras/7/x86_64/filelists_db                                     | 494 kB  00:00:00     
updates/7/x86_64/filelists_db                                    | 2.1 MB  00:00:03     
net-tools-2.0-0.22.20131004git.el7.x86_64 : Basic networking tools
Repo        : base
Matched from:
Filename    : /sbin/ifconfig

3.安装net-tools包,安装完成后就可以使用ifconfig命令了

 yum install net-tools

你可能感兴趣的:(解决 ifconfig command not found)