如果你不知道在哪里可以找到ifconfig命令,请按照以下简单的步骤来找到它。首先,让我们找出哪个包提供了ifconfig命令。要完成这项任务,输入以下命令:
[root@jrserver app_files]# yum provides ifconfig
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors..com
* epel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors..com
net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools
Repo : @base
Matched from:
Filename : /usr/sbin/ifconfig
或者你也可以使用以下命令:
yum whatprovides ifconfig
就像你在上面的输出中所看到的,net-tools包提供了ifconfig命令。因此,让我们安装net-tools包来使用ifconfig命令:
yum install net-tools
[root@jrserver app_files]# ifconfig
eno16777984: flags=<UP,BROADCAST,RUNNING,MULTICAST> mtu
inet 10.60.10.200 netmask 255.255.255.0 broadcast 10.60.10.255
inet6 fe80::20c:29ff:fe05:766b prefixlen scopeid 0x20<link>
ether :0c::::6b txqueuelen (Ethernet)
RX packets bytes (1.1 GiB)
RX errors dropped overruns frame
TX packets bytes (36.1 MiB)
TX errors dropped overruns carrier collisions lo: flags=<UP,LOOPBACK,RUNNING> mtu
inet 127.0.0.1 netmask 255.0.0.0
inet6 :: prefixlen scopeid 0x10<host>
loop txqueuelen (Local Loopback)
RX packets bytes (4.9 GiB)
RX errors dropped overruns frame
TX packets bytes (4.9 GiB)
TX errors dropped overruns carrier collisions