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.

See bugs from Ubuntu Launchpad here and here.

History of my bash commands

?arstan@blacky:~$ history | awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
40 ssh
38 ping
35 su
23 sudo
22 ls
18 vlc
12 cd
10 ifconfig
10 cat
9 axel

This is my daily work laptop. Running xubuntu 8.0.4.1

What’s yours?

Futsal injury makes me appreciate people I know, things I have

Recently, like a 2-3 weeks ago I joined my colleagues to play futsal after work. We’ve been playing futsal for the last few weeks. And guess what, I got to hurt my knee very badly, I couldn’t walk for at least 3 days. Every touch, every step hurt so badly.

I am very thankful to my lovely wife for her care and patience. I am very thankful for my brothers Nurbek and Kamchybek, my sister Aijan to help me in every possible ways. My good friend Ades also stood up to give me a hand.

My boss at my work was also very kind to say “No worries, just get better”.

I came to understand that just walking itself is a very big thing, I fully understood those disabled people who can’t walk.

All of these made a good lesson, I have to be always thankful for my family and friends, for all that I have  and say Alhamdulillah.

Categories


Clicky Web Analytics