修改Ubuntu系统的网卡名称为eth0,eth1,eth2等
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
序言
Ubuntu系统比如server版中的网卡名称经常不规范,比如有ens2f0,ens2f1等。但是我们可能有需要去将网卡名称规范化,变成eth0,eth1等。
系统环境
vim /etc/default/grub
将
GRUB_CMDLINE_LINUX=""
修改为
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
2. 重新生成grub配置文件
grub-mkconfig -o /boot/grub/grub.cfg
或者
update-grub
3. 重启
reboot
重启后,可以输入命令
ifconfig -a
看到网卡都变成eth0 eth1了。需要注意的是,重启后需要配置网络。配置方法可见之前的文章【在这里】
如果对你有帮助,帮忙点个赞吧!




A beautiful web dashboard for Linux
最近提交(Master分支:27 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)