天天看点

Centos7更改网卡设备名称为eth0,eth1等

首先在vim /etc/sysconfig/grub中添加“net.ifnames=0 biosdevname=0”

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 net.ifnames=0 biosdevname=0 rd.lvm.lv=centos/root crashkernel=auto  vconsole.keymap=us rhgb quiet"

Centos7更改网卡设备名称为eth0,eth1等
Centos7更改网卡设备名称为eth0,eth1等

然后执行grub2-mkconfig -o /boot/grub2/grub.cfg命令

Centos7更改网卡设备名称为eth0,eth1等

最后重启机器,使用ifconfig查看网卡名称就变成了eth0,eth1......

继续阅读