udevadm(8)
udevadm controls the udev device manager and queries device information.
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
| Flag | What it does |
|---|---|
--debug | print debug messages to stderr |
--version | show udevadm and udev versions |
--help | display help message |
-p, --path=DEVPATH | query a device by its /sys path |
-n, --name=NAME | query a device by its /dev name |
-q, --query=TYPE | query property; types: name, symlink, path, property, all, export |
-a, --attribute-walk | print device chain showing all attributes |
-e, --export | export device properties in key=value format |
Examples
query device properties for /dev/sda1
udevadm info -n /dev/sda1show full attribute chain for network interface eth0
udevadm info -p /sys/class/net/eth0 -amonitor and display udev events in real time as they occur
udevadm monitor --udevforce re-processing of all USB device events
udevadm trigger --subsystem-match=usbwait up to 30 seconds for udev event queue to empty
udevadm settle --timeout=30simulate rule processing for a USB device without applying changes
udevadm test /devices/pci0000:00/0000:00:14.0/usb1/1-1reload udev rules without restarting the daemon
udevadm control --reloadexport NVMe device properties in shell-friendly format
udevadm info -n /dev/nvme0n1 -e