ll /etc/sysconfig/grub lrwxrwxrwx 1 root root 17 Jun 12 2016 /etc/sysconfig/grub -> /etc/default/grub 1、修改grub文件 # vim /etc/sysconfig/grub # 内容如下: GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet" GRUB_DISABLE_RECOVERY="true" 2、修改上面内容中的GRUB_CMDLINE_LINUX的值,增加 net.ifnames=0 biosdevname=0 # vim /etc/sysconfig/grub # 修改后的内容如下: GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16net.ifnames=0 biosdevname=0 rhgb quiet" GRUB_DISABLE_RECOVERY="true" 3、执行:grub2-mkconfig -o /boot/grub2/grub.cfg 然后,重启系统,网卡名字就变成eth*了
grub2-mkconfig 亦可以 grub2-install