CenOS 7.X 如何安装ifconfig进行网卡信息查看 – 21运维
通知: .-...

CenOS 7.X 如何安装ifconfig进行网卡信息查看

linux 21运维 6288浏览 0评论
21运维 原创文章,转载请注明出处。
昨天安装了一个测试用的centos 7.2,结果无法使用ifconfig 信息,which也没有找到这个命令。直接测试了下yum install ifconfig -y是不正确的。于是网上搜索了下资料安装ifconfig使用,方法如下:

root登录系统:
yum install -y net-tools\*
即可

Complete!
[root@docker5 init.d]# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
        ether 02:42:85:9b:ba:1b  txqueuelen 0  (Ethernet)
        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

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.75  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::5054:ff:fecb:4778  prefixlen 64  scopeid 0x20
        ether 52:54:00:cb:47:78  txqueuelen 1000  (Ethernet)
        RX packets 218123  bytes 82148195 (78.3 MiB)
        RX errors 0  dropped 12  overruns 0  frame 0
        TX packets 33555  bytes 3256004 (3.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
        loop  txqueuelen 0  (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

转载请注明:21运维 » CenOS 7.X 如何安装ifconfig进行网卡信息查看

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (2)

  1. 确实遇到这个问题,有搜到说centos7之后,默认集成的ip addr命令集
    nando2017-06-16 16:07 回复
    • 确实。不过习惯了ifconfig,还是可以装上。
      21运维2017-06-19 09:56 回复