Sometimes you wish to allocate more friendly names to the ethernet cards in ubuntu for better administration of the linux. In this tutorial you can learn how to do that.

Step 1: Issue “sudo ifconfig” command to check the current names of your ethernet cards

eth0      Link encap:Ethernet  HWaddr 00:f0:4f:3f:f6:f7  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1068 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1068 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:129574 (129.5 KB)  TX bytes:129574 (129.5 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1a:21:c3:f3:c3
          inet addr:192.168.1.112  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:2fff:fecd:fbc5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23718 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17322 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29549832 (29.5 MB)  TX bytes:2035781 (2.0 MB)

Step 2: Edit file “sudo nano /etc/udev/rules.d/70-persistent-net.rules

# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0 (r8169)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:e0:4c:36:06:c7″, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# USB device 0x0846:0x4260 (usb)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:1b:2f:cd:fb:c5″, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”wlan0″

Step 3: Change the parameter NAME to whatever you wish like.

Step 4: Reboot the system

That’s all you need to do.

Change Network Interface Cards Name in Ubuntu

Leave a Reply