Linux system modifies the name of the network card to eth0
Environment: linux system, modifying network name
One: modify the system grub
[root@localhost ~] # vi / boot/grub/grub.conf # add biosdevname=0 after kernel parameter
: wq # Save exit
2. Modify the Nic naming rule configuration file of 70-persistent-net.rules
[root@localhost ~] # vi / etc/udev/rules.d/70-persistent-net.rules # modify this server has a network card, the identified network card name is: em1, we need to change the above em1 to eth0.
: wq # Save exit
Modify the name of the current network card configuration file
[root@localhost ~] # cd / etc/sysconfig/network-scripts/ # enter the Nic configuration file directory
[root@localhost ~] # mv ifcfg-em1 ifcfg-eth0 # rename
4. Modify the contents of the configuration file of the network card and change all em to eth.
[root@localhost ~] # cd / etc/sysconfig/network-scripts/ # enter the Nic configuration file directory
[root@localhost ~] # vi ifcfg-eth0 # change the em1 in it to eth0
After the modification of wq # is completed, save and exit
Restart the network card
[root@localhost ~] # service network restart # if rebooting the network card still fails, restart the system