将RHEL7系统网卡名称eno16777736改为eth0
2019-05-21 本文已影响0人
Kan_shan

-
安装完redhat后ifconfig结果是这样的
image.png
接下来是修改为习惯的eth0
- 第1步:将
/etc/sysconfig/network-scripts/ifcfg-eno16777736
的NAME参数修改为eth0

- 第3步:将网卡配置文件ifcfg-eno1677736重命名为ifcfg-eth0

- 第3步:修改grub文件来禁用内核继续使用该命名规则:
1.编辑grub配置文件vim /etc/sysconfig/grub
2.在GRUB_CMDLINE_LINUX变量中添加一句 net.ifnames=0 biosdevname=0

- 第4步:重新生成grub配置并更新内核参数:
运行命令:grub2-mkconfig -o /boot/grub2/grub.cfg

- 重启查看修改是否完成
