Fedora20將網卡名字改回eth0

近由於項目原因,自己安裝了個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:

  1. net.ifnames=0
  2. biosdevname=0

To do so follow this steps:

  1. Edit /etc/default/grub
  2. At the end of GRUB_CMDLINE_LINUX line append "net.ifnames=0 biosdevname=0"
  3. Save the file
  4. Type "grub2-mkconfig -o /boot/grub2/grub.cfg"
  5. 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".

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章