How to Change Network Interface Name from eth0 to ens33 on Debian?
Asked by
TechVoyager77
I'm working on a Debian installation running on VMware, and I'd like to switch my network interface name from "eth0" back to the more standardized "ens33." Previously, I managed to set it to "eth0" by using the kernel parameters `biosdevname=0` and `net.ifnames=0`. However, I've now removed those parameters from `/etc/default/grub`, regenerated `grub.cfg`, and rebuilt initrd, but the interface still shows up as "eth0." I don't see any references to "eth0" in `/boot` or `/etc`. What steps can I take to make sure my NIC is recognized as "ens33" without resorting to creating an udev rule? Thanks!
Answers
I faced a similar issue, but I managed to partially solve it. There was a file named `/etc/systemd/network/00no-altname.link` that was affecting the interface name. After removing that file, my interface changed to **ens192**.
Reply to this answer
Have you tried using `ifrename`? It can help in renaming your interfaces based on driver rules instead of relying on the default naming scheme.
Reply to this answer
If you're really set on using the interface name "ens33," you might still have to look into using udev rules to achieve the naming you want. Just remember, this can go both ways, and your original question mentioned avoiding udev for renaming, but sometimes it's necessary to get the desired result!
Reply to this answer
Add your answer
Answers are reviewed before publication.
TechVoyager77: Thanks for the suggestion! I'm actually trying to avoid any udev rules because I want to keep things simple. But it seems like I might have to reconsider that.