Some of you probably noticed that in newer versions of Debian the ehternet adapter is named ens** (e.g. ens192) instead of eth (e.g. eth0).
In theory this is no problem and works as usual. But for some people like me this looks odd and the eth-thing just existed for me. Hence I want it back.
This post covers what you need to do in order to get the eth naming back.
What do you need?
- Linux Terminal
- SUDO (or root) access
- Patience & one system reboot
1.) Symlink of the systemd default links.
Linux (Debian in particular) has a service manager called systemd. This manager uses so called "links" to define certain default actions that are used.
One default is to use a certain naming convetion for ethernet adapters. You can guess which convetion that is -> ens***
In order to override that and so that systemd does not come up with his default, we simple create a file that links to
/dev/null. This way we tell systemd to use our file and deny the use of his defaults.
sudo ln -s /dev/null /etc/systemd/network/99-default.link
2.) Edit of network interfaces.
Edit the interfaces file and update your ethernet device names there:
Sample file using DHCP and two interfaces:
3.) Edit of grub bootloader.
Last thing you need to edit is the grub bootloader file located at
/etc/default/ to update the naming convention there as well.
sudo grub-mkconfig && sudo update-grub.
As mentioned you now need to restart the system so that all changes become active.
After the restart your ethernet adapter should be connected and called
Check your achievement with the command
That's it, your done!
Over and Out,