1. 借鉴
CentOS 7安装 ifconfig 管理命令
2. 开始
缘起
ifconfig
bash: ifconfig: command not found
- 没有那我们安装一下吧yum install ifconfig
yum install ifconfig
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.bfsu.edu.cn
* updates: mirror.bit.edu.cn
No package ifconfig available.
Error: Nothing to do
yum search ifconfig
- 终于好像有一个匹配的了[net-tools.x86_64]
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.bfsu.edu.cn
* updates: mirror.bit.edu.cn
================================================== Matched: ifconfig ============================================
net-tools.x86_64 : Basic networking tools
解决
yum install net-tools.x86_64
ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.2 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:ac:11:00:02 txqueuelen 0 (Ethernet)
RX packets 18553 bytes 26721726 (25.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8741 bytes 479526 (468.2 KiB)
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
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
3. 大功告成
网友评论