c4rt1y

centos7下修改网卡为eth0

0x01 修改名称

mv /etc/sysconfig/network-scripts/ifcfg-en33 /etc/sysconfig/network-scripts/ifcfg-eth0

0x02 编辑网卡信息

cat /etc/sysconfig/network-scripts/ifcfg-eth0
name=eth0

0x03 编辑内核信息

#加入 net.ifnames=0 biosdevname=0 
cat /etc/sysconfig/grub
GRUB_CMDLINE_LINUX="crashkernel=autorhgb net.ifnames=0 biosdevname=0 quiet"

0x04 生成启动菜单

grub2-mkconfig -o /boot/grub2/grub.cfg

0x05 重启

查看 ip a,会发现已经是eth0了
GoTop