天天看点

centos 7修改网卡为 eth0修改配置执行命令reboot 重启

刚装了一个虚拟机 centos7 ,发现网卡不是 eth0 而是 ens33,这是 centos7 的一致性网络设备命名导致的。

可以使用以下方式,将网卡名称回到 eth0 格式。

centos 7修改网卡为 eth0修改配置执行命令reboot 重启

修改配置

vim /etc/default/grub

中添加

biosdevname=0 net.ifnames=0
           
centos 7修改网卡为 eth0修改配置执行命令reboot 重启

执行命令

grub2-mkconfig -o /boot/grub2/grub.cfg
           
centos 7修改网卡为 eth0修改配置执行命令reboot 重启

reboot 重启

centos 7修改网卡为 eth0修改配置执行命令reboot 重启

继续阅读