Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9
Current systems name network interfaces by their hardware position (for example ens3 or enp1s0), so names do not change between boots. Red Hat recommends keeping these names. If an old script needs eth0, you can switch back.
Note: A mistake here can leave the server without network. Do this only with console access (on a Ucartz VPS: the VNC console in the VPS dashboard).
AlmaLinux / Rocky Linux 9
- Add the kernel arguments:
grubby --update-kernel=ALL --args="net.ifnames=0 biosdevname=0" - Point the connection profile at the new name:
nmcli con mod "ens3" connection.interface-name eth0(use your profile name fromnmcli con show). - Reboot and check with
ip link.
Ubuntu / Debian
- Add
net.ifnames=0 biosdevname=0toGRUB_CMDLINE_LINUXin/etc/default/gruband runupdate-grub. - Change the interface name in your Netplan file (Ubuntu) or
/etc/network/interfaces(Debian) toeth0. - Reboot and check with
ip link.
Tip: Alternatively, keep predictable names and give an interface your own name with a systemd .link file in /etc/systemd/network/ that matches its MAC address.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
