2 .TH "UDEVADM" "8" "" "systemd 218" "udevadm"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
17 .\" disable justification (adjust text to left margin only)
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
23 udevadm \- udev management tool
25 .HP \w'\fBudevadm\fR\ 'u
26 \fBudevadm\fR [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
27 .HP \w'\fBudevadm\ info\ \fR\fB\fIoptions\fR\fR\ 'u
28 \fBudevadm info \fR\fB\fIoptions\fR\fR
29 .HP \w'\fBudevadm\ trigger\ \fR\fB[options]\fR\ 'u
30 \fBudevadm trigger \fR\fB[options]\fR
31 .HP \w'\fBudevadm\ settle\ \fR\fB[options]\fR\ 'u
32 \fBudevadm settle \fR\fB[options]\fR
33 .HP \w'\fBudevadm\ control\ \fR\fB\fIcommand\fR\fR\ 'u
34 \fBudevadm control \fR\fB\fIcommand\fR\fR
35 .HP \w'\fBudevadm\ monitor\ \fR\fB[options]\fR\ 'u
36 \fBudevadm monitor \fR\fB[options]\fR
37 .HP \w'\fBudevadm\ hwdb\ \fR\fB[options]\fR\ 'u
38 \fBudevadm hwdb \fR\fB[options]\fR
39 .HP \w'\fBudevadm\ test\ \fR\fB[options]\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u
40 \fBudevadm test \fR\fB[options]\fR\fB \fR\fB\fIdevpath\fR\fR
41 .HP \w'\fBudevadm\ test\-builtin\ \fR\fB[options]\fR\fB\ \fR\fB\fIcommand\fR\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u
42 \fBudevadm test\-builtin \fR\fB[options]\fR\fB \fR\fB\fIcommand\fR\fR\fB \fR\fB\fIdevpath\fR\fR
46 expects a command and command specific options\&. It controls the runtime behavior of
47 \fBsystemd\-udevd\fR, requests kernel events, manages the event queue, and provides simple debugging mechanisms\&.
52 Print debug messages to standard error\&.
57 Print version number\&.
60 \fB\-h\fR, \fB\-\-help\fR
64 .SS "udevadm info [\fIoptions\fR] [\fIdevpath\fR|\fIfile\fR]"
66 Queries the udev database for device information stored in the udev database\&. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device\&.
68 \fB\-q\fR, \fB\-\-query=\fR\fB\fITYPE\fR\fR
70 Query the database for the specified type of device data\&. It needs the
74 to identify the specified device\&. Valid
83 \fB\-p\fR, \fB\-\-path=\fR\fB\fIDEVPATH\fR\fR
87 path of the device to query, e\&.g\&.
88 [/sys]/class/block/sda\&. Note that this option usually is not very useful, since
90 can guess the type of the argument, so
91 \fBudevadm \-\-devpath=/class/block/sda\fR
93 \fBudevadm /sys/class/block/sda\fR\&.
96 \fB\-n\fR, \fB\-\-name=\fR\fB\fIFILE\fR\fR
98 The name of the device node or a symlink to query, e\&.g\&.
99 [/dev]/sda\&. Note that this option usually is not very useful, since
101 can guess the type of the argument, so
102 \fBudevadm \-\-name=sda\fR
104 \fBudevadm /dev/sda\fR\&.
107 \fB\-r\fR, \fB\-\-root\fR
109 Print absolute paths in
116 \fB\-a\fR, \fB\-\-attribute\-walk\fR
118 Print all sysfs properties of the specified device that can be used in udev rules to match the specified device\&. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules\&.
121 \fB\-x\fR, \fB\-\-export\fR
123 Print output as key/value pairs\&. Values are enclosed in single quotes\&.
126 \fB\-P\fR, \fB\-\-export\-prefix=\fR\fB\fINAME\fR\fR
128 Add a prefix to the key name of exported values\&.
131 \fB\-d\fR, \fB\-\-device\-id\-of\-file=\fR\fB\fIFILE\fR\fR
133 Print major/minor numbers of the underlying device, where the file lives on\&.
136 \fB\-e\fR, \fB\-\-export\-db\fR
138 Export the content of the udev database\&.
141 \fB\-c\fR, \fB\-\-cleanup\-db\fR
143 Cleanup the udev database\&.
151 \fB\-h\fR, \fB\-\-help\fR
156 In addition an optional positional argument can be used to specify a device name or a sys path\&. It must start with
161 .SS "udevadm trigger [\fIoptions\fR] [\fIdevpath\fR|\fIfile\fR...]"
163 Request device events from the kernel\&. Primarily used to replay events at system coldplug time\&.
165 \fB\-v\fR, \fB\-\-verbose\fR
167 Print the list of devices which will be triggered\&.
170 \fB\-n\fR, \fB\-\-dry\-run\fR
172 Do not actually trigger the event\&.
175 \fB\-t\fR, \fB\-\-type=\fR\fB\fITYPE\fR\fR
177 Trigger a specific type of devices\&. Valid types are:
179 \fBsubsystems\fR\&. The default value is
183 \fB\-c\fR, \fB\-\-action=\fR\fB\fIACTION\fR\fR
185 Type of event to be triggered\&. The default value is
189 \fB\-s\fR, \fB\-\-subsystem\-match=\fR\fB\fISUBSYSTEM\fR\fR
191 Trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&.
194 \fB\-S\fR, \fB\-\-subsystem\-nomatch=\fR\fB\fISUBSYSTEM\fR\fR
196 Do not trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&.
199 \fB\-a\fR, \fB\-\-attr\-match=\fR\fB\fIATTRIBUTE\fR\fR\fB=\fR\fB\fIVALUE\fR\fR
201 Trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&.
204 \fB\-A\fR, \fB\-\-attr\-nomatch=\fR\fB\fIATTRIBUTE\fR\fR\fB=\fR\fB\fIVALUE\fR\fR
206 Do not trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&.
209 \fB\-p\fR, \fB\-\-property\-match=\fR\fB\fIPROPERTY\fR\fR\fB=\fR\fB\fIVALUE\fR\fR
211 Trigger events for devices with a matching property value\&. This option can be specified multiple times and supports shell style pattern matching\&.
214 \fB\-g\fR, \fB\-\-tag\-match=\fR\fB\fIPROPERTY\fR\fR
216 Trigger events for devices with a matching tag\&. This option can be specified multiple times\&.
219 \fB\-y\fR, \fB\-\-sysname\-match=\fR\fB\fIPATH\fR\fR
221 Trigger events for devices with a matching sys device path\&. This option can be specified multiple times and supports shell style pattern matching\&.
224 \fB\-\-name\-match=\fR\fB\fINAME\fR\fR
226 Trigger events for devices with a matching device path\&. This options can be specified multiple times\&.
229 \fB\-b\fR, \fB\-\-parent\-match=\fR\fB\fISYSPATH\fR\fR
231 Trigger events for all children of a given device\&.
234 \fB\-h\fR, \fB\-\-help\fR
239 In addition optional positional arguments can be used to specify device names or sys paths\&. They must start with
244 .SS "udevadm settle [\fIoptions\fR]"
246 Watches the udev event queue, and exits if all current events are handled\&.
248 \fB\-t\fR, \fB\-\-timeout=\fR\fB\fISECONDS\fR\fR
250 Maximum number of seconds to wait for the event queue to become empty\&. The default value is 120 seconds\&. A value of 0 will check if the queue is empty and always return immediately\&.
253 \fB\-E\fR, \fB\-\-exit\-if\-exists=\fR\fB\fIFILE\fR\fR
255 Stop waiting if file exists\&.
258 \fB\-h\fR, \fB\-\-help\fR
262 .SS "udevadm control \fIcommand\fR"
264 Modify the internal state of the running udev daemon\&.
266 \fB\-x\fR, \fB\-\-exit\fR
268 Signal and wait for systemd\-udevd to exit\&.
271 \fB\-l\fR, \fB\-\-log\-priority=\fR\fB\fIvalue\fR\fR
273 Set the internal log level of
274 systemd\-udevd\&. Valid values are the numerical syslog priorities or their textual representations:
285 \fB\-s\fR, \fB\-\-stop\-exec\-queue\fR
287 Signal systemd\-udevd to stop executing new events\&. Incoming events will be queued\&.
290 \fB\-S\fR, \fB\-\-start\-exec\-queue\fR
292 Signal systemd\-udevd to enable the execution of events\&.
295 \fB\-R\fR, \fB\-\-reload\fR
297 Signal systemd\-udevd to reload the rules files and other databases like the kernel module index\&. Reloading rules and databases does not apply any changes to already existing devices; the new configuration will only be applied to new events\&.
300 \fB\-p\fR, \fB\-\-property=\fR\fB\fIKEY\fR\fR\fB=\fR\fB\fIvalue\fR\fR
302 Set a global property for all events\&.
305 \fB\-m\fR, \fB\-\-children\-max=\fR\fIvalue\fR
307 Set the maximum number of events, systemd\-udevd will handle at the same time\&.
310 \fB\-\-timeout=\fR\fIseconds\fR
312 The maximum number of seconds to wait for a reply from systemd\-udevd\&.
315 \fB\-h\fR, \fB\-\-help\fR
319 .SS "udevadm monitor [\fIoptions\fR]"
321 Listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console\&. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event\&.
323 \fB\-k\fR, \fB\-\-kernel\fR
325 Print the kernel uevents\&.
328 \fB\-u\fR, \fB\-\-udev\fR
330 Print the udev event after the rule processing\&.
333 \fB\-p\fR, \fB\-\-property\fR
335 Also print the properties of the event\&.
338 \fB\-s\fR, \fB\-\-subsystem\-match=\fR\fB\fIstring[/string]\fR\fR
340 Filter events by subsystem[/devtype]\&. Only udev events with a matching subsystem value will pass\&.
343 \fB\-t\fR, \fB\-\-tag\-match=\fR\fB\fIstring\fR\fR
345 Filter events by property\&. Only udev events with a given tag attached will pass\&.
348 \fB\-h\fR, \fB\-\-help\fR
352 .SS "udevadm hwdb [\fIoptions\fR]"
354 Maintain the hardware database index in
355 /etc/udev/hwdb\&.bin\&.
357 \fB\-u\fR, \fB\-\-update\fR
359 Compile the hardware database information located in /usr/lib/udev/hwdb\&.d/, /etc/udev/hwdb\&.d/ and store it in
360 /etc/udev/hwdb\&.bin\&. This should be done after any update to the source files; it will not be called automatically\&. The running udev daemon will detect a new database on its own and does not need to be notified about it\&.
365 Put the compiled database into
366 /usr/lib/udev/hwdb\&.bin
367 instead\&. Use this if you want to ship a pre\-compiled database in immutable system images, or don\*(Aqt use
369 and want to avoid large binary files in
373 \fB\-t\fR, \fB\-\-test=\fR\fB\fIstring\fR\fR
375 Query the database with a modalias string, and print the retrieved properties\&.
378 \fB\-r\fR, \fB\-\-root=\fR\fB\fIstring\fR\fR
380 Alternative root path in the file system for reading and writing files\&.
383 \fB\-h\fR, \fB\-\-help\fR
387 .SS "udevadm test [\fIoptions\fR] [\fIdevpath\fR]"
389 Simulate a udev event run for the given device, and print debug output\&.
391 \fB\-a\fR, \fB\-\-action=\fR\fB\fIstring\fR\fR
396 \fB\-N\fR, \fB\-\-resolve\-names=\fR\fB\fBearly\fR\fR\fB|\fR\fB\fBlate\fR\fR\fB|\fR\fB\fBnever\fR\fR
398 Specify when udevadm should resolve names of users and groups\&. When set to
400 (the default), names will be resolved when the rules are parsed\&. When set to
401 \fBlate\fR, names will be resolved for every event\&. When set to
402 \fBnever\fR, names will never be resolved and all devices will be owned by root\&.
405 \fB\-h\fR, \fB\-\-help\fR
409 .SS "udevadm test\-builtin [\fIoptions\fR] [\fIcommand\fR] [\fIdevpath\fR]"
411 Run a built\-in command
414 \fIDEVPATH\fR, and print debug output\&.
416 \fB\-h\fR, \fB\-\-help\fR
423 \fBsystemd-udevd.service\fR(8)