在Centos中显示ipv4地址的方法

输入命令  ifconfig | more eth0网卡只有ipv6

修改方法如下:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT=no 改成 yes

/etc/init.d/network restart

原文地址:https://www.cnblogs.com/zxq-Study-Java/p/10050861.html