Centos 7 modify the name of the network card
The default network card name of Centos 7 is ens33. If you are accustomed to the Centos eth name, or if you want to change it to be more personalized, please follow these steps. The pro-test is valid.
1. Modify the name in the Nic file
(1) the name NAME= wants (eth0, etc.)
DEVICE= as above
(2) modify the name of the Nic file
Cd / etc/sysconfig/network-scripts/
Mv ifcfg-ens33 ifcfg-eth0
(3) modify and load the Nic name grub file
Use the file vim grub in the cd / etc/default/grub directory
Under the GRUB_CMDLINE_LINUX line file, write before rhgb quiet
The complete method of net.ifnames=0 biosname=0 is as follows:
GRUB_CMDLINE_LINUX= "crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap net.ifnames=0 biosdevname=0 rhgb quiet
(4) load grub file configuration information
Grub2-mkconfig-o / boot/grub2/grub.cfg Don't forget the parameter-o.
If my dear friends don't even bother to do Man, then I will continue to provide.
SYNOPSIS
Grub-mkconfig [- o |-- output=FILE] Don't ask me why, please make up for it yourself.
(5) the important thing is to restart the operating system painting to take effect, so use it cautiously in the production environment, lest the leader can't stop the 40m knife.