Friday, March 27, 2009

Rename interface eth in linux

It is possible to change the name of the device E.g. eth0 to something like eth-intel if your machine is using udev to populate the device entries in sysfs.

Edit the file -
vi /etc/udev/rules.d/70-persistent-net.rules

as root or a power user and change entries with eth0 to whatever
you desire.

udev support is available for most kernels in the 2.6 generation.
For older kernel versions there might be tools such as hwconfig or mii-tools
available which could do the job.

If you are using a Gnome/KDE desktop, the networking/management tools
on the GUI provides a mechanism to change the name of the interface
from ethX to ethY. This facility allows direct renaming of the
interfaces while changing the udev rules itself.


Anonymous said...

The settings do not take effect right away, so you may need to reboot the machine. I ran into this when my machine rebooted.

Post a Comment