$linuxjunkies
>

device unit

also: .device unit, device unit file

A systemd unit file that represents and manages a hardware device or virtual device on the system, controlling how the device is mounted, activated, or made available to other services.

A device unit is a systemd unit configuration file with a .device extension that describes a hardware device (such as a USB drive, partition, or network interface) or virtual device. Device units are automatically generated from kernel device events via udev and allow systemd to coordinate device availability with service startup and dependency ordering.

Device units enable declarative management of device dependencies in systemd. For example, a service that requires a specific USB device can specify After=dev-mydevice.device in its unit file to ensure the service only starts after that device is available.

You can view device units with systemctl list-units --type=device or check a specific device with systemctl status dev-sda1.device. Device units are typically read-only and managed by udev, though they integrate seamlessly with other systemd units for dependency and ordering control.

Related terms