美文网首页
解决 Centos7 系统 ifconfig 不显示 ipv4

解决 Centos7 系统 ifconfig 不显示 ipv4

作者: 丶沧月 | 来源:发表于2019-03-14 11:16 被阅读0次

我是 Centos7 (centos6 的是 eth0),所以网卡默认是 ens33

第一步:

sudo vim  /etc/sysconfig/network-scripts/ifcfg-ens33

第二步:

只需要将最后一项:

ONBOOT=no 改成 yes

输入 :wq 保存退出

image.png

第三步:

重启网卡服务:

/etc/init.d/network restart

再输入 ifconfig,就会显示出ipv4。


image.png

相关文章

网友评论

      本文标题:解决 Centos7 系统 ifconfig 不显示 ipv4

      本文链接:https://www.haomeiwen.com/subject/focqmqtx.html