如果你不知道在哪里可以找到ifconfig命令,請按照以下簡單的步驟來找到它。首先,讓我們找出哪個包提供了ifconfig命令。要完成這項任務,輸入以下命令:
[root@jrserver app_files]# yum provides ifconfig Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.163.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=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.60.10.200 netmask 255.255.255.0 broadcast 10.60.10.255 inet6 fe80::20c:29ff:fe05:766b prefixlen 64 scopeid 0x20<link> ether 00:0c:29:05:76:6b txqueuelen 1000 (Ethernet) RX packets 607480 bytes 1278116091 (1.1 GiB) RX errors 0 dropped 13 overruns 0 frame 0 TX packets 404695 bytes 37875952 (36.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 18963942 bytes 5327444973 (4.9 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 18963942 bytes 5327444973 (4.9 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0