udevadm
Manage and monitor udev event subsystem
TLDR
Monitor all device events
Print uevents sent out by the kernel
Print device events after being processed by udev
List attributes of device /dev/sda
Reload all udev rules
Trigger all udev rules to run
Test an event run by simulating loading of /dev/sda
SYNOPSIS
udevadm [--version] [--help] | subcommand [options] [arguments]
PARAMETERS
--debug
Enable extended output with debug messages
--version
Print program version and exit
--help
Print help text and exit
control
Query or set udev daemon parameters at runtime
help
Print help for specified subcommand
hwdb
Query or update hardware database
info
Print device information from sysfs or kernel
monitor
Listen to kernel uevents and udev events
query
Query udev properties from database file
settle
Wait for ongoing device events to complete
test
Simulate a device uevent through udev
test-builtin
Test a built-in udev command
trigger
Request events for currently available devices
version
Print udev and kernel versions
DESCRIPTION
udevadm is the administrative command-line utility for interacting with udev(7), the Linux kernel's device manager. It allows querying device properties, monitoring hardware events, testing rules, triggering uevents, and controlling the udev daemon.
Key functionalities include inspecting sysfs attributes (info), watching kernel uevents and udev settlements (monitor), simulating device hotplug (trigger), and validating rule syntax (test). It's invaluable for debugging device detection, persistent naming issues, or hardware database lookups via hwdb.
Primarily used by system administrators and developers on systemd-based distributions, it provides direct access to the device event subsystem without restarting services. Global options like --debug aid troubleshooting, while subcommands handle specific tasks. Output is typically human-readable but supports structured formats for scripting.
CAVEATS
Many subcommands require root privileges; trigger and test can disrupt devices if misused. Debug output may be verbose. Not for production event triggering.
COMMON EXAMPLES
udevadm info /sys/block/sda – Show device properties.
udevadm monitor – Watch uevents live.
udevadm trigger --type=devices --action=change – Re-enumerate devices.
SUBCOMMAND OPTIONS
Each subcommand has unique flags, e.g., info --query=property, monitor --kernel, hwdb --update. Run udevadm <subcommand> --help for details.
HISTORY
Developed as part of udev project (2003) by Gentoo developers; integrated into systemd (2012). Replaced legacy tools like udevinfo(8), udevtest(8). Evolved with eudev fork and systemd-udev.


