This question sounds just a little bit strange.

But for several different reasons you may want to give your personal name to the NIC adapters plugged into your Ubuntu box.

For example:

1. Maybe you are integrating a system for a customer and you want to give to the interfaces the name the customer prefers (if the software of the customer comes from another OS the NIC manes are different)

2. Maybe you want to give a more descriptive names to NIC's.

3. You want to be sure each interface card has a fixed name. Sometimes after a  reboot the names got shuffled up for some reason.

 

ubuntu

Some years ago, Ubuntu came with a fantastic program: "ifrename"

the syntax for this program is the following:

ifrename [-c configfile] [-i interface] [-n newname]

so you could change the interface name issuing a command like the following one:

# ifrename -i eth0 -n myEth

But for some reasons this command has been removed, so, now, you have to modify a configuration file.

 

/etc/udev/rules.d/70-persistent-net.rules 

My 70-persistent-net.rules looks like:

  1 # This file was automatically generated by the /lib/udev/write_net_rules
  2 # program, run by the persistent-net-generator.rules rules file.
  3 #
  4 # You can modify it, as long as you keep each rule on a single
  5 # line, and change only the value of the NAME= key.
  6 
  7 # PCI device 0x11ab:/sys/devices/pci0000:00/0000:00:1c.5/0000:86:00.0 (sky2)
  8 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:22:33:44:55:66", ATTR{dev_id}=="0x0", ATTR{t    ype}=="1", KERNEL=="eth*", NAME="eth0"
  9 
 10 # PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0 (iwlwifi)
 11 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:11:22:33:44:55", ATTR{dev_id}=="0x0", ATTR{t    ype}=="1", KERNEL=="wlan*", NAME="wlan0"
 
 

 

If I want to change the name of the wifi adapter I've to change the name field in lines number 11, for example if I want to change it in "wifi0"  my new line 11 will look like:

 

 11 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:11:22:33:44:55", ATTR{dev_id}=="0x0", ATTR{t    ype}=="1", KERNEL=="wlan*", NAME="wifi0"
 
Gg1