Config :
leap_15.2 beta
laptop asus rog strix
test running on a virtualbox vm Version 6.1.8 r137981 (Qt5.9.7) but should be also use on real system.
Using NetworkManager
I want to change the interface name of the Ethernet card to a name of my choice.
I have written a script to do that but that failed.
I have read a lot of things on internet but nothing help me very much.
List of things I have tried :
1-)
Create a /etc/udev/rules.d/99-persistent-net.rules with :
During my test i have tried to remove any reference to eth0 by removing any config files ( /etc/sysconfig/network, /etc/NetworkManager, /etc/udev/rules.d/99-persistent-net.rules )
typing
I’m pretty sure you can’t actually specify a custom network interface name and certainly not for the network device… Too many system functions depend on the standard naming conventions which would be broken if the name changed.
But,
It’s possible to create a symbolic link (ie an alias but is not the same as “ip aliasing”) so you can refer to the interface by some custom name.
Note that if you do this, you should be able to use the custom name for your own purposes, but if you want to run common network utilities like ip tools, you’d still have to use the real names.
Since you don’t describe how you want to use this custom name, I can’t say if this will work but AFAIK it’s the only approximate solution to your post.
Although you can read the MAN page for ip-link,
Looks like the following top answer is very nice, the author extracted only what is essential to provide a distilled answer
I am very surprise that any computer running any linux distro will fail into problem if an Ethernet card is named “my_lovely_card” rather than “eth0”
From my great ignorance the string naming a device has nothing to do with the device itself.
If all computer and/or network software are now based only on name ‘eth0’ or ‘wlan0’ then I can assure you that we will run into disaster.
That said I will read your link.
Thank you for your comments.
Maybe renaming will work OK for someone,
But maybe you’re confusing what is a device, what is an interface and the names that can be associated with the device or interface?
Each are different, and are hooked into different parts of the system, some not easy to modify.
Well, I actually do have it in initrd but still my rules worked without recreating initrd. So it probably depends on whether something keeps busy interface preventing renaming.