Learning Devuan GNU/Linux - eudev & Device Management
Episode 15 of 23

Learning Devuan GNU/Linux - eudev & Device Management

This episode covers eudev, Devuan's systemd-free device manager: understanding its role in the system, using udevadm for inspection and monitoring, writing rules in /etc/udev/rules.d/, and comparing it with systemd-udev.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

Every time you plug in a USB device, attach a disk, or turn on a webcam, a process quietly does its job: udev creates the device node, assigns names, and loads the right drivers. On Devuan, this process is handled by eudev — a fork of udev that runs without systemd. Episode 15 breaks down how it works and how to use it.

Mastering eudev lets you control hardware with precision: making sure a disk always appears under the same name, setting special permissions, or running automatic commands when a specific device is plugged in. It's one of the skills sysadmins rarely master, and on a non-systemd system it feels especially relevant.

What Is eudev

The Device Manager's Role in the System

eudev runs as a daemon that listens for kernel events (uevents). When a new device is detected, eudev:

  • creates a device node in /dev,
  • loads the matching driver,
  • sets permissions and ownership,
  • runs any matching rules.

Its function is identical to systemd-udev; the difference is only in dependencies: eudev doesn't need systemd at all. That's why Devuan uses it as the default.

Verifying eudev Is Running

Check eudev's version and process:

Cek eudev
udevadm --version
ps aux | grep -E "[u]devd"

udevadm --version shows the eudev version. If eudev isn't running, device nodes won't be created and the system will almost certainly misbehave — devices won't appear in /dev.

Using udevadm

Inspecting Devices

udevadm is the main tool for interacting with eudev. For a detailed inspection of a device:

Inspeksi device
udevadm info -a -n /dev/sda
udevadm info -q property -n /dev/sda

udevadm info -a -n /dev/sda shows hierarchical attributes that can be used as match patterns in rules. The -q property option displays udev properties such as ID_FS_TYPE and ID_MODEL — both useful for writing precise rules.

Monitoring Events

To watch kernel events live, use monitor mode:

Monitor peristiwa udev
udevadm monitor
udevadm monitor --property

udevadm monitor prints kernel and udev events in real time. When you plug in a USB device, you'll see lines containing add, remove, and change. The --property mode shows the full detail you can use to write rules.

Writing Rules in /etc/udev/rules.d/

Rule Structure

A udev rule is a line pairing matches and assignments:

Struktur rule udev
match1=="nilai1", match2=="nilai2", assignment1="nilaiA", assignment2="nilaiB"

Matches use the == (equals) or != operators; assignments use = to set and += to add. Rule files go in /etc/udev/rules.d/ and end with .rules.

Example Rule: A Fixed Disk Name

So a USB disk always appears as /dev/mydata regardless of plug-in order:

Rule nama disk tetap
echo 'KERNEL=="sd*", ATTR{ID_FS_TYPE}=="ext4", SYMLINK+="mydata"' | \
  sudo tee /etc/udev/rules.d/99-local.rules
sudo udevadm control --reload-rules

KERNEL=="sd*" matches all SCSI disks, ATTR{ID_FS_TYPE}=="ext4" ensures only ext4 disks, and SYMLINK+="mydata" adds the symlink. After writing rules, always reload with udevadm control --reload-rules.

Running Programs Automatically

Rules can also run commands when a device appears. An example setting video permissions:

Rule permission device video
echo 'SUBSYSTEM=="video4linux", GROUP="video", MODE="0660"' | \
  sudo tee -a /etc/udev/rules.d/99-local.rules
sudo udevadm control --reload-rules

The rule above ensures all webcams are accessible to the video group. Use RUN+= rules carefully — the command runs every time a device matches the rule, and processes running as root can become a security risk.

eudev vs systemd-udev

Differences and Similarities

In practice, eudev and systemd-udev are very similar: the rule syntax is identical, udevadm is still used, and rule files can be moved between systems. The core difference is in dependencies — eudev is standalone, systemd-udev requires systemd.

For packages that demand specific udev features, Devuan provides package shims so applications that normally call systemd-udev keep working. This is part of the compatibility work we discussed in episode 2.

Testing New Rules

After writing rules, test them by re-triggering the device:

Trigger ulang rules
sudo udevadm control --reload-rules
sudo udevadm trigger
ls -l /dev/mydata

udevadm trigger makes the kernel re-emit events for all devices, so freshly written rules are evaluated immediately. If the mydata symlink appears, your rule works.

Conclusion

Episode 15 covered eudev as Devuan's systemd-free device manager: its role in device node creation and hotplug, using udevadm for inspection and monitoring, writing rules in /etc/udev/rules.d/, and comparing it with systemd-udev.

Key takeaways:

  • eudev is a fork of udev that runs without systemd.
  • udevadm info inspects devices; udevadm monitor watches events.
  • Rules use match == and assignment = or +=.
  • Rules live in /etc/udev/rules.d/ and end with .rules.
  • Reload rules with udevadm control --reload-rules.
  • eudev and systemd-udev share the same rule syntax.

In the next episode, episode 16, we'll cover backup, restore, and system maintenance — backing up data with rsync and dump, taking advantage of Btrfs snapshots, storing package lists with apt-clone, and system recovery through rescue mode.

Learning Devuan GNU/Linux - eudev & Device Management | Learning Devuan GNU/Linux