9

I Have installed Linux 14.04 lts. I am getting interface device name as em1 and eth0.I want to rename it as eth0 and eth1.

3 Answers 3

6

Best way to achieve that what you are looking for:

First, uninstall the package biosdevname

sudo apt-get remove biosdevname

then run

sudo update-initramfs -u

After the next boot, everything will work the good ol way.

1
  • 2
    This worked for me. That package biosdevname must have been included as part of a recent apt-get upgrade I performed.
    – paperclip
    Aug 19, 2015 at 13:15
1

Edit /etc/default/grub and search for the following:

GRUB_CMDLINE_LINUX_DEFAULT=””
GRUB_CMDLINE_LINUX=””

Add biosdevname=0 to the 2 lines:

GRUB_CMDLINE_LINUX_DEFAULT=”biosdevname=0”
GRUB_CMDLINE_LINUX=”biosdevname=0”

Then run

sudo update-grub

Finally reboot, after reboot you should find all rules persisted in /etc/udev/rules.d/70-persistent-net.rules

2
  • On Ubuntu 14.04 there is no grub file at that location, its found in /boot/grub/grub.conf. The solution that worked for me was by @oler askubuntu.com/a/620678
    – paperclip
    Aug 19, 2015 at 13:14
  • Do you need to set biosdevname=0 on both LINUX_DEFAULT and LINUX? the resulting grub.cfg has two biosdevname=0. Althought that shouldn't be a problem, I think you should be able to set either of the lines ;) Oct 3, 2016 at 6:40
0

Edit 70-persistent-net.rules

vi /etc/udev/rules.d/70-persistent-net.rules    

Locate in the file the hardware named em1 and replace with eth*

Save and reboot

2
  • I have added this content to /etc/udev/rules.d/70-persistent-net.rules SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:10:b5:f5:b7:31", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0". and then saved and rebooted as you said but it is not happening. Jan 28, 2015 at 5:52
  • You don't have to add anything, you should replace the line were em* was with eth* . Here is a little tutorial upubuntu.com/2013/03/… Jan 28, 2015 at 11:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .