In this article, we will cover the way to change the name defined for your Ethernet/wireless adapter (eth0, eth1, wlan0, wlan1, etc.). This tip is not very useful, but it maybe interesting for some users and we will show you here how to do it.
Getting Started
You can check the current name for your wired/wireless adapter with this command under Ubuntu/Linux Mint:
ifconfig
Next, make a backup copy of the file we are going to edit using this command:
sudo cp /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.back
Edit now the file with this command:
gksudo gedit /etc/udev/rules.d/70-persistent-net.rules
In this file, locate your adapter name and change it to whatever name you want. Here is a code snippet from the file indicating the part you must change:
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:03.0 (e1000)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:1b:4e:ec", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
After you finish, save the file and close it, then restart your computer so that changes take effect. Run again "ifconfig" to check if the name has changed or not. If you want to restore your original file, run this command:
sudo cp /etc/udev/rules.d/70-persistent-net.rules.back /etc/udev/rules.d/70-persistent-net.rules
No comments:
Post a Comment