centos7更改网卡名称

1、编辑/etc/sysconfig/grub文件,加入net.ifnames=0 biosdevname=0

2、执行命令grub2-mkconfig -o /boot/grub2/grub.cfg,生成新的grub.cfg 文件

3、重命名网卡配置文件,改为ifcfg-eth0,并且编辑该文件,将里面的device值改为eth0

 4、重启

原文地址:https://www.cnblogs.com/tiantianhappy/p/10155543.html