CentOS 6.x修改网卡名称em1/2为eth0/1

  1. 先备份网卡配置文件ifcfg-em1 ifcfg-em2,路径为/etc/sysconfig/network-scripts/

2.修改ifcfg-em1 ifcfg-em2文件名为ifcfg-eth0 ifcfg-eth1

3.然后在对应的文件内容修改DEVICE=eth0或eth1 设置onboot=yes

DEVICE=em1
TYPE=Ethernet
UUID=4a92fe6d-5a13-4077-bd8b-e28cf4192797
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.1.10
PREFIX=16
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System em1"
HWADDR=80:18:44:E2:69:94
LAST_CONNECT=1526622829

4.重启系统

你可能感兴趣的:(CentOS 6.x修改网卡名称em1/2为eth0/1)