首先在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"


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

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

Logo

更多推荐