计算机技术

Centos7更改网卡名称eth0

用ifconfig查看网卡名称为ens33,现在要将它修改成eth0

Centos7更改网卡名称eth0

编辑配置文件/etc/sysconfig/network-scripts/ifcfg-eno16777736

将DEVICE=eno16777736修改成DEVICE=eth0

保存并退出

重命名该配置文件。

[root@remote network-scripts]# cd /etc/sysconfig/network-scripts/

[root@remote network-scripts]# mv ifcfg-eno16777736 ifcfg-eth0

编辑/etc/default/grub并加入“net.ifnames=0 biosdevname=0 ”

同样是保存并退出

Centos7更改网卡名称eth0

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

使用reboot命令重启操作系统

重启完成之后进入系统使用ifconfig命令查看网卡名称已经修改成eth0了

https://jingyan.baidu.com/article/17bd8e524c76a285ab2bb8ff.html

Related Articles

发表回复

Check Also
Close
Back to top button