In this lesson, you will learn how systemd-udevd eliminates the chaos of fluctuating device names to ensure your hardware is always identified consistently.
The Problem: Why Names Change
In the early days of Linux, hardware was assigned names based on the order in which the kernel discovered it (e.g., eth0 or sda). If you added a new hard drive or a different network card, the kernel might re-order these, causing your mount points or network configs to point to the wrong device—or stop working entirely.
The Solution: Predictable Naming
systemd-udevd solves this by abandoning "discovery order" in favor of "intrinsic properties." Instead of naming a device based on when it showed up, it names it based on where it is or what it is.
For network interfaces, systemd-udevd uses several naming schemes based on:
- Firmware/BIOS index numbers (e.g.,
eno1for onboard ports). - PCI hardware location (e.g.,
enp3s0, representing PCI bus 3, slot 0). - MAC addresses (e.g.,
enx00e04c680d94).
These identifiers are permanent. If you move a cable from one PCI slot to another, the name changes because the physical address changed, preventing accidental configuration of the wrong port.
For storage, the system creates symbolic links in /dev/disk/by-id/ or /dev/disk/by-uuid/. While the kernel might still call your disk /dev/sda internally, your configuration files (like /etc/fstab) should point to the UUID:
# Example of a stable fstab entry
UUID=550e8400-e29b-41d4-a716-446655440000 / ext4 defaults 0 1
How udevd Orchestrates This
When a device is added, the kernel sends an event to systemd-udevd. The daemon matches this event against a set of rules located in /lib/udev/rules.d/. It queries the hardware attributes, generates the stable name, and creates a symlink so that user-space applications (and your own mount scripts) always reach the correct hardware regardless of the boot order.
Key Takeaway: Predictable naming ensures hardware is identified by permanent physical or logical attributes rather than unreliable discovery sequences, preventing system failures after hardware changes.