When I run ip addr show, this will show an interface being named enp3s0f0 or similar.

This name is assigned by udev.

This happens after mounting the / drive.

Thus it happens after luks file encryption.

I wanted to make the password prompt to decrypt available over the network by installing an ssh server, dropbear, into the initramfs. Doing so requires telling dropbear what network interface to listen on, and also enabling dhcp within initramfs. To do so, I need the network interface name.

To my surprise, nowhere could I find a way to easily see what the original name of enp3s0f0 is. If my host has many ports and is slow to boot, trial and error can be cumbersome, requiring two reboots per try.

Is there some command I can run to find this out quickly, after the renaming has already happened?

  • What about identifying the interface by MAC address instead? Then you can do something like interface=$(grep -li $MACADDR /sys/class/net/*/address | cut -d/ -f5) to get the interface name.
    – larsks
    Jul 21, 2022 at 12:46

1 Answer 1


You can try to use system journal to see renames history

journalctl -b 0 -g "renamed from"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .