$linuxjunkies
>

udevadm(8)

udevadm controls the udev device manager and queries device information.

UbuntuDebianFedoraArch

Synopsis

udevadm [--debug] [--version] [--help] COMMAND [COMMAND OPTIONS]

Description

udevadm is the administrative tool for udev, the Linux device manager. It allows you to query, monitor, test, and control udev rules and devices. Common tasks include debugging device naming, triggering rule re-evaluation, and monitoring device events in real time.

udevadm provides several subcommands: info (query device properties), monitor (watch device events), test (test rule processing), trigger (force device event re-processing), settle (wait for event queue), and control (manage udev daemon).

Common options

FlagWhat it does
--debugprint debug messages to stderr
--versionshow udevadm and udev versions
--helpdisplay help message
-p, --path=DEVPATHquery a device by its /sys path
-n, --name=NAMEquery a device by its /dev name
-q, --query=TYPEquery property; types: name, symlink, path, property, all, export
-a, --attribute-walkprint device chain showing all attributes
-e, --exportexport device properties in key=value format

Examples

query device properties for /dev/sda1

udevadm info -n /dev/sda1

show full attribute chain for network interface eth0

udevadm info -p /sys/class/net/eth0 -a

monitor and display udev events in real time as they occur

udevadm monitor --udev

force re-processing of all USB device events

udevadm trigger --subsystem-match=usb

wait up to 30 seconds for udev event queue to empty

udevadm settle --timeout=30

simulate rule processing for a USB device without applying changes

udevadm test /devices/pci0000:00/0000:00:14.0/usb1/1-1

reload udev rules without restarting the daemon

udevadm control --reload

export NVMe device properties in shell-friendly format

udevadm info -n /dev/nvme0n1 -e

Related commands