Because we often switch between centos6 and centos7, we feel that the nic name of centos7 is too long and inconvenient, so we want to change the nic name to eth0 which is the same as that of centos7, eth1, perform the following operations: 1. # cd/etc/sysconfig2. add the following sentence to the longest line # vimgrubnet. ifnames = 0 biosdevn
Because we often switch between centos6 and centos7, we feel that the nic name of centos7 is too long and inconvenient, so we want to get the same name as 6.
If you want to change the network card name to eth0 and eth1, perform the following operations:
1. # cd/etc/sysconfig
2. add the following sentence to the longest line.
# Vim grub
Net. ifnames = 0 biosdevname = 0
3. # grub2-mkconfig-o/boot/grub2/grub. cfg
4. rename the original Nic name
# Cd/etc/sysconfig/network-scripts
# Mv ifcfg-enoXXXXXXXX ifcfg-eth0
5. modify the NAME in the ifcfg-eth0, the device name is eth0
NAME = eth0
DEVICE = eth0
6. reboot and check that the eth0 we want has been created.