1,修改网卡配置文件:
vim /etc/sysconfig/network-scripts/ifcfg-eno16777728 修改: NAME=eth0 DEVICE=eth0
,2,修改网卡名称:
mv /etc/sysconfig/network-scripts/ifcfg-eno16777728 /etc/sysconfig/network-scripts/ifcfg-eth0
3,修改grub配置文件:
vim /etc/default/grub 修改: GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"
4,运行命令来重新生成GRUB配置并更新内核参数:
grub2-mkconfig -o /boot/grub2/grub.cfg
5,重启机器
*我这里是刚装完系统修改一次成功生效,如果修改不生效请百度查找原因解决*