Fedora20将网卡名字改回eth0
近由于项目原因,自己安装了个Fedora20虚拟机环境,忽然发现Fedora20这个版本里的网卡名字有点怪怪的,不是传统的eth0,改成了ens33,觉得有必要改回来。上网搜索了一下,把这个别扭的ens33改成了eth0,看着顺眼多了。记录操作步骤如下:The easiest way to restore the old way Kernel/modules/udev re
近由于项目原因,自己安装了个Fedora20虚拟机环境,忽然发现Fedora20这个版本里的网卡名字有点怪怪的,不是传统的eth0,改成了ens33,觉得有必要改回来。上网搜索了一下,把这个别扭的ens33改成了eth0,看着顺眼多了。
记录操作步骤如下:
The easiest way to restore the old way Kernel/modules/udev rename your ethernet interfaces is supplying these kernel parameters to Fedora 19:
- net.ifnames=0
- biosdevname=0
To do so follow this steps:
- Edit /etc/default/grub
- At the end of GRUB_CMDLINE_LINUX line append "net.ifnames=0 biosdevname=0"
- Save the file
- Type "grub2-mkconfig -o /boot/grub2/grub.cfg"
- Type "reboot"
If you didn't supply these parameters during the installation, you will probably need to adjust and/or rename interface files at /etc/sysconfig/network-scripts/ifcfg-*.
Up to Fedora 18, just biosdevname=0 was enough.
As an example, in a certain machine, in a exhaustive research, I got:
-No parameters: NIC identified as "enp5s2".
-Parameter biosdevname=0: NIC identified as "enp5s2".
-Parameter net.ifnames=0: NIC identified as "em1".
-Parameter net.ifnames=0 AND biosdevname=0: NIC identified as "eth0".
更多推荐
所有评论(0)