1、已安装的系统修改网卡名称
#修改网卡配置文件
[root@localhost ~]# cd /etc/sysconfig/network-scripts/[root@localhost network-scripts]# mv ifcfg-ens33 ifcfg-eth0[root@localhost network-scripts]# cat ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
NAME=eth0 #将此处由ens33修改为eth0
DEVICE=eth0 #将此处由ens33修改为eth0
ONBOOT=yes#修改内核启动参数,禁用预测命名方案,将 net.ifnames=0 biosdevname=0 ?关闭
[root@localhost ~]# cat /etc/sysconfig/grub
..........
..........
GRUB_CMDLINE_LINUX="crashkernel= ...... net.ifnames=0 biosdevname=0 quiet"
..........
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg #重启系统,并检查修改结果
[root@localhost ~]# reboot
[root@localhost ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 192.168.92.129 netmask 255.255.255.0 broadcast 192.168.92.255inet6 fe80::20c:29ff:fef7:f3c6 prefixlen 64