centos7中ifconfig没反应

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

 

 

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值