I need to rename a network device on an AlmaLinux 9 server. It’s currently ens33. I want to change it to eth0.
I have made numerous attempts but all have failed and I keep disconnecting myself!
I have made progress because now I can connect to the server and I was able to rename the connection, but the device name remains the same. I have tried so many different things, that I now have the following:
[root@srv-al9 ~]# nmcli device status
DEVICE TYPE STATE CONNECTION
ens33 ethernet connected eth0
br-37edd30c4c2e bridge connected (externally) br-37edd30c4c2e
lo loopback connected (externally) lo
wt0 wireguard connected (externally) wt0
docker0 bridge connected (externally) docker0
vethfe8267b ethernet unmanaged --
[root@srv-al9 ~]# ls /etc/NetworkManager/system-connections
eth0.nmconnection
[root@srv-al9 ~]# cat /etc/NetworkManager/system-connections
eth0.nmconnection
cat: /etc/NetworkManager/system-connections: Is a directory
-bash: eth0.nmconnection: command not found
[root@srv-al9 ~]# cat /etc/NetworkManager/system-connections/eth0.nmconnection
[connection]
id=eth0
uuid=8637251c-fd20-4a76-9b85-54c33d2d2f12
type=ethernet
autoconnect-priority=-999
timestamp=1793545534
[ethernet]
mac-address=00:50:56:BC:84:C8
[ipv4]
method=auto
[ipv6]
addr-gen-mode=default
method=auto
[proxy]
/etc/sysconfig/network-scripts/ does not contain any files. It didn’t before I started.
/etc/systemd/network/ does not contain any files. It didn’t before I started.
What are the proper, concise steps to take when renaming a network device name on AlmaLinux 8, 9 and 10?
I have done this in the past but I can’t seem to do it on this server for some reason. Must be forgetting a step
I agree, modifying the scripts is the best option but I’m not a Linux pro so re-writing the scripts is a no-go for me.
biosdevname is not installed. I understand how net.ifnames works but how does biosdevname differ? What if you don’t have access to the bios or the bios does not have the info biosdevname needs? Just trying to understand how it works.
Logically, one could use udev rules to set a name.
An important question is then how many devices do you have?
If there is only one, then the initial “eth0” by kernel is fine
If there are more than one, then one of them gets name “eth0” and renaming an another with same name would be an issue. Most likely the udev rules must set unique name for each interface
On enterprise Linux installations hosting centralized engineering license daemons, renaming network interfaces or altering MAC binding orders can unexpectedly invalidate hostid licensing locks or interrupt concurrent checkout threads across client subnets. For dimensioning seat buffer pools during network maintenance, check our reference queue calculator at FLEXlm License Seat Queue & Denial Probability Calculator.
Hopefully this reference helps address the engineering or workflow considerations under discussion.