Ubuntu Server: rename eth1 to eth0

Today I needed to change / rename network interface name ‘eth1′ to ‘eth0′, after replacing broken network card. I searched for the file ‘/etc/iftab’, and it was not there.

The solution lies in the file ‘/etc/udev/rules.d/70-persistent-net.rules’:
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0b:49:81:02:13", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Changing NAME=”eth1″ to NAME=”eth0″ did the trick.

Tested on Ubuntu Server 9.04.

This entry was posted in OS and tagged , . Bookmark the permalink.

7 Responses to Ubuntu Server: rename eth1 to eth0

  1. bradley says:

    Worked on SLES10 as well. Thanks!

  2. one says:

    Ubuntu 9.10 32-bit works

  3. ifeoluwa says:


  4. Dan-O says:

    Thanks it worked for me on NATTY as well

  5. Carlos says:

    Worked on CentOS 6 (vmware) as well

  6. Kevin says:

    Worked on Ubuntu Server 10.04 LTS. Nice work Maris.

  7. Richard says:

    Works on 12.04 as well!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current ye@r *