1、ifconfig 提示无此命令
2、yum install ifconfig也没得
[root@ip-100 ~]# yum install ifconfig
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* extras: mirrors.cn99.com
* updates: mirrors.cn99.com
No package ifconfig available.
Error: Nothing to do
3、yum search ifconfig,找到一个net-tools.x86_64,安装即可
[root@ip-100 ~]# yum search ifconfig
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* extras: mirrors.cn99.com
* updates: mirrors.cn99.com
========================================== Matched: ifconfig ===========================================
net-tools.x86_64 : Basic networking tools
[root@ip-100 ~]#
4、yum install -y net-tools.x86_64
5、安装完成后
[root@ip-100 ~]# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
inet6 fe80::42:6bff:fe3d:f0a5 prefixlen 64 scopeid 0x20<link>
ether 02:42:6b:3d:f0:a5 txqueuelen 0 (Ethernet)
RX packets 52 bytes 3568 (3.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3 bytes 266 (266.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.116.131 netmask 255.255.255.0 broadcast 192.168.116.255
inet6 fe80::8871:1089:91aa:c41a prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:d7:3c:11 txqueuelen 1000 (Ethernet)
RX packets 102995 bytes 141705015 (135.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12396 bytes 1336091 (1.2 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 1000 (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