20190108在CentOS7中修改网卡名为 eth0

CentOS7 修改网卡为 eth0

一.对于已经安装好centos7系统的服务器vim

  1. 修改网卡配置文件
    mv ifcfg-eno16777728 ifcfg-eth0 先将配置文件重命名
    vim ifcfg-eth0 修改如下两个参数
    20190108在CentOS7中修改网卡名为 eth0
  2. GRUB 添加 kernel 参数
    vim /etc/sysconfig/grub 在末尾处添加 net.ifname=0
    20190108在CentOS7中修改网卡名为 eth0
    #grub2-mkconfig -o /boot/grub2/grub.cfg 重定向
  3. reboot 重启
  4. 验证:
    20190108在CentOS7中修改网卡名为 eth0

二.也可在安装系统时添加 kernel 参数 net.ifnames=0
20190108在CentOS7中修改网卡名为 eth0centos

相关文章
相关标签/搜索