最近安裝了一個最小化版本的CentOS 7,發現不能使用 ifconfig命令,界面提示:
ifconfig command not found.git
解決辦法:ide
從yum找出哪一個包括ifconfig 命令
[root@tangym ~]# yum provides ifconfig Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfileoop
安裝完成以後,將可使用ifconfig 命令了
[root@tangym ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.20 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::1157:71fe:de9b:3e7e prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:01:07:3c txqueuelen 1000 (Ethernet)
RX packets 29890 bytes 42966542 (40.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 18814 bytes 1278145 (1.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0code
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 1 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0