How to rename eth0 Network Interface Card Name Udev Linux

In  Linux, a  wireless link will show  "wlanx" but  I want to change it to  "ethx" or whatever  I want. How do  I change the eth0 or  wlan0  Network  Interface  Card name on Linux?

Step  1:First  Check this link before start operation.

You 'll get some useful information about the NIC  name algorithm.

Remove OLD NIC Linux

Step 2:Check  your  network interface and  note down MAC address.

root@redhattemplate ~]# ifconfig -a | grep -i --color hwaddr
eth0 Link encap:Ethernet HWaddr 00:50:56:90:7A:8C

Step 3:Take  a copy of  configuration

root@redhattemplate ~]# cp  /etc/udev/rules.d/70-persistent-net.rules /root/

Step 4:Rename  device  name as  you wish

You need to change  just  only the  name  of  Network  interface card  from  persistent-net file

NAME="eth0"   >>  NAME="trans0"

root@redhattemplate ~]# vi /etc/udev/rules.d/70-persistent-net.rules[/shell]
[shell]SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:XX:90:7a:8c", ATTR{type}=="1", KERNEL=="eth*", NAME="trans0"

Step 5:Reboot server  to  apply new  configuration

#shutdown -r  now


Tagged In:

I'm a IT Infrastructure and Operations Architect with extensive experience and administration skills and works for Turk Telekom. I provide hardware and software support for the IT Infrastructure and Operations tasks.

205 Total Posts
Follow Me