Centos7更改网卡名为eth0
1.先更该网卡配置文件设备名和网卡名参数:
vim /etc/sysconfig/network-scripts/ifcfg-eno16777736
NAME=eth0
DEVICE=eth0
2.将配置文件改名
mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0
3.更改引导配置文件
vim /etc/default/grub
#在GRUB_CMDLINE_LINUX配置项中添加 rhgb quiet 后面加上这两个参数 net.ifnames=0 biosdevname=0
4.重新生成GRUB配置并更新内核参数
grub2-mkconfig -o /boot/grub2/grub.cfg
5.重启后网卡变eth0
reboot