Eth0 to Predictable Network Names
May 18, 2026
First, this assumes that you've booted your system and that the interface is eth0. If not, adjust accordingly.
ip addr list eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
...
Let's find the predictable name for this interface.
udevadm info --export --query=property --path=/sys/class/net/eth0 | grep ID_NET_NAME_PATH
ID_NET_NAME_PATH='enp4s0'
Great! This interface will be labeled enp4s0. Now we need to updated openrc.
cd /etc/init.d/
ln -s net.lo net.enp4s0
rc-update del net.eth0 default
rc-update add net.enp4s0 default
Don't forget to update the networking configuration.
nano -w /etc/conf.d/net
# replace references to eth0 with enp4s0
Finally, disable the kernel parameter ifnames.
/etc/default/grub
#GRUB_CMDLINE_LINUX="net.ifnames=0"
Regenerate grub.cfg.
grub-mkconfig -o /boot/grub/grub.cfg
Now reboot. Following reboot, you'll want to delete to previous openrc scripts.
rm -i /etc/init.d/net.eth0
That's it!