Centos replaces the network card name to eth0

Centos replaces the network card name to eth0

After the system is installed, the name of the network card needs to be changed to eth0

 

Edit the configuration file to replace ens33 information with eth0, you can enter %s/ens33/eth0/g in vim command mode to replace the relevant content

 

Modify the kernel file and add content: net.ifnames=0 biosdevname=0

[root@nova3 ~]# vim /etc/default/grub

 

 Use the command to regenerate the grub configuration and update the kernel parameters

[root@nova3 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg 

 

Restart the server and check that the name of the network card has been successfully replaced

 

Guess you like

Origin blog.csdn.net/qq_33468857/article/details/132109938