Vai al contenuto
Home » Renaming Network Interfaces on Linux to eth0

Renaming Network Interfaces on Linux to eth0

Renaming Network Interfaces on Linux to eth0
Renaming Network Interfaces on Linux to eth0


How to rename network interfaces on SysLinuxOS and Debian Gnu/Linux permanently to eth0, eth1, wlan0. These names (eno1, enp5s0, wlp3s0, enp2s0, wlp2s0) are not always intuitive, especially when using multiple interfaces on the same machine.These are assigned to network interfaces directly by the kernel. To make network interface names more descriptive and easier to manage, we can rename them using the systemd-networkd service. All these names have in common the first two letters, “en” and “wl“. In fact, if you type the command:

sudo dmesg | grep -i eth
sudo dmesg | grep -i wl

you can read that the interfaces are renamed starting from eth0 and wlan0. Personally, I know two working methods to return to the old standard.

The First

this way should work in most cases and just do a small addition to grub:

sudo nano /etc/default/grub


GRUB_CMDLINE_LINUX=”net.ifnames=0 biosdevname=0″

as below:

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

generate a new grub config file, and reboot.

sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot

If everything went well, the interfaces will be eth0 and wlan0. If you’re using DHCP, there’s no need to modify anything. In case of a static IP, you can use the usual method:

sudo nano /etc/network/interfaces


auto eth0
iface eth0 inet static

The Second

This alternative method involves finding the names and paths of the current network cards and then manually creating two files that will contain the new names.

sudo udevadm info /sys/class/net/name_interface

The command above finds the data we’re interested in

E: ID_PATH=pci-0000:03:00.0
E: ID_PATH_TAG=pci-0000_03_00_0

now we will be able to create the file manually:

sudo nano /etc/systemd/network/10-rename-name_interface

example below for eth0:


for wlan0


After the reboot, the name of the network interfaces will be permanently seen with the old standard. In reality, there is also another method, simpler 🙂 , which is a bash script that does everything automatically:

git clone
cd rename-interfaces/
chmod +x
sudo ./
sudo reboot

Renaming Network Interfaces on Linux to eth0

enjoy 😉


Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *