1. Edit the grub configuration file
# vim /etc/default/grub or vim /etc/sysconfig/grub same result
Add net.ifnames=0 biosdevname=0 in GRUB_CMDLINE_LI
Second, use the grub2-mkconfig command to regenerate the GRUB configuration and update the kernel
# grub2-mkconfig -o /boot/grub2/grub.cfg
As long as this step is completed, and then restart the Linux operating system, you can see that the name of the network card has changed to eth0 through ip addr, and the network can be used normally, but the network configuration file is still ifcfg-ens33.
3. Modify the network card configuration file
Change the original network card configuration file name to ifcfg-ens33, which needs to be changed to eth0, ifcfg-ens34 to eth1, and adjust the network card configuration file appropriately
#mv ifcfg-ens33 ifcfg-eth0
#mv ifcfg-ens34 ifcfg-eth1
And modify the network card configuration file