Centos更换网卡名称为eth0

Centos更换网卡名称为eth0

已安装好系统后需要修改网卡名称为eth0

Centos更换网卡名称为eth0_第1张图片

 

编辑配置文件将ens33信息替换为eth0,可在vim命令模式输入%s/ens33/eth0/g替换相关内容

 Centos更换网卡名称为eth0_第2张图片

修改内核文件,添加内容:net.ifnames=0 biosdevname=0

[root@nova3 ~]# vim /etc/default/grub

 Centos更换网卡名称为eth0_第3张图片

 使用命令重新生成grub配置,更新内核参数

[root@nova3 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg 

 Centos更换网卡名称为eth0_第4张图片

重启服务器,查看‘网卡名称已经更换成功


你可能感兴趣的:(Rocky9.2,VS,Centos8,openKylin,centos,linux,运维)