How to change network interface names in Ubuntu
Have you ever found out that your eth0 interface suddenly became eth1 or sth like that? I noticed that after some minor upgrades my eth0 became eth1. I hate this, because I am so used to eth0 as my LAN interface.
Also in latest versions of Ubuntu my WLAN is taken as wlan0. I’m so much used to eth1 as my WLAN. Anyways, on my laptop I won’t have any additional LAN devices except my built in.
So, let’s change those things, shall we?
sudo vim /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”wlan0″
Change above to:
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”eth1″
So, all you have to do is to edit /etc/udev/rules.d/70-persistent-net.rules file and change the NAME option to your choice of your ethernet/wifi device name.
Leave a Reply
You must be logged in to post a comment.