1UDEVADM(8) udevadm UDEVADM(8)
2
3
4
6 udevadm - udev management tool
7
9 udevadm [--debug] [--version] [--help]
10
11 udevadm info [options] [devpath]
12
13 udevadm trigger [options] [devpath]
14
15 udevadm settle [options]
16
17 udevadm control option
18
19 udevadm monitor [options]
20
21 udevadm test [options] devpath
22
23 udevadm test-builtin [options] command devpath
24
26 udevadm expects a command and command specific options. It controls the
27 runtime behavior of systemd-udevd, requests kernel events, manages the
28 event queue, and provides simple debugging mechanisms.
29
31 -d, --debug
32 Print debug messages to standard error. This option is implied in
33 udevadm test and udevadm test-builtin commands.
34
35 -h, --help
36 Print a short help text and exit.
37
38 udevadm info [options] [devpath|file|unit...]
39 Query the udev database for device information.
40
41 Positional arguments should be used to specify one or more devices.
42 Each one may be a device name (in which case it must start with /dev/),
43 a sys path (in which case it must start with /sys/), or a systemd
44 device unit name (in which case it must end with ".device", see
45 systemd.device(5)).
46
47 -q, --query=TYPE
48 Query the database for the specified type of device data. Valid
49 TYPEs are: name, symlink, path, property, all.
50
51 -p, --path=DEVPATH
52 The /sys/ path of the device to query, e.g.
53 [/sys/]/class/block/sda. This option is an alternative to the
54 positional argument with a /sys/ prefix. udevadm info
55 --path=/class/block/sda is equivalent to udevadm info
56 /sys/class/block/sda.
57
58 -n, --name=FILE
59 The name of the device node or a symlink to query, e.g.
60 [/dev/]/sda. This option is an alternative to the positional
61 argument with a /dev/ prefix. udevadm info --name=sda is
62 equivalent to udevadm info /dev/sda.
63
64 -r, --root
65 Print absolute paths in name or symlink query.
66
67 -a, --attribute-walk
68 Print all sysfs properties of the specified device that can be used
69 in udev rules to match the specified device. It prints all devices
70 along the chain, up to the root of sysfs that can be used in udev
71 rules.
72
73 -x, --export
74 Print output as key/value pairs. Values are enclosed in single
75 quotes. This takes effects only when --query=property or
76 --device-id-of-file=FILE is specified.
77
78 -P, --export-prefix=NAME
79 Add a prefix to the key name of exported values. This implies
80 --export.
81
82 -d, --device-id-of-file=FILE
83 Print major/minor numbers of the underlying device, where the file
84 lives on. If this is specified, all positional arguments are
85 ignored.
86
87 -e, --export-db
88 Export the content of the udev database.
89
90 -c, --cleanup-db
91 Cleanup the udev database.
92
93 -w[SECONDS], --wait-for-initialization[=SECONDS]
94 Wait for device to be initialized. If argument SECONDS is not
95 specified, the default is to wait forever.
96
97 -h, --help
98 Print a short help text and exit.
99
100 udevadm trigger [options] [devpath|file|unit]
101 Request device events from the kernel. Primarily used to replay events
102 at system coldplug time.
103
104 Takes device specifications as positional arguments. See the
105 description of info above.
106
107 -v, --verbose
108 Print the list of devices which will be triggered.
109
110 -n, --dry-run
111 Do not actually trigger the event.
112
113 -q, --quiet
114 Suppress error logging in triggering events.
115
116 -t, --type=TYPE
117 Trigger a specific type of devices. Valid types are: devices,
118 subsystems. The default value is devices.
119
120 -c, --action=ACTION
121 Type of event to be triggered. Possible actions are "add",
122 "remove", "change", "move", "online", "offline", "bind", and
123 "unbind". Also, the special value "help" can be used to list the
124 possible actions. The default value is "change".
125
126 -s, --subsystem-match=SUBSYSTEM
127 Trigger events for devices which belong to a matching subsystem.
128 This option supports shell style pattern matching. When this option
129 is specified more than once, then each matching result is ORed,
130 that is, all the devices in each subsystem are triggered.
131
132 -S, --subsystem-nomatch=SUBSYSTEM
133 Do not trigger events for devices which belong to a matching
134 subsystem. This option supports shell style pattern matching. When
135 this option is specified more than once, then each matching result
136 is ANDed, that is, devices which do not match all specified
137 subsystems are triggered.
138
139 -a, --attr-match=ATTRIBUTE=VALUE
140 Trigger events for devices with a matching sysfs attribute. If a
141 value is specified along with the attribute name, the content of
142 the attribute is matched against the given value using shell style
143 pattern matching. If no value is specified, the existence of the
144 sysfs attribute is checked. When this option is specified multiple
145 times, then each matching result is ANDed, that is, only devices
146 which have all specified attributes are triggered.
147
148 -A, --attr-nomatch=ATTRIBUTE=VALUE
149 Do not trigger events for devices with a matching sysfs attribute.
150 If a value is specified along with the attribute name, the content
151 of the attribute is matched against the given value using shell
152 style pattern matching. If no value is specified, the existence of
153 the sysfs attribute is checked. When this option is specified
154 multiple times, then each matching result is ANDed, that is, only
155 devices which have none of the specified attributes are triggered.
156
157 -p, --property-match=PROPERTY=VALUE
158 Trigger events for devices with a matching property value. This
159 option supports shell style pattern matching. When this option is
160 specified more than once, then each matching result is ORed, that
161 is, devices which have one of the specified properties are
162 triggered.
163
164 -g, --tag-match=PROPERTY
165 Trigger events for devices with a matching tag. When this option is
166 specified multiple times, then each matching result is ANDed, that
167 is, devices which have all specified tags are triggered.
168
169 -y, --sysname-match=NAME
170 Trigger events for devices for which the last component (i.e. the
171 filename) of the /sys/ path matches the specified PATH. This option
172 supports shell style pattern matching. When this option is
173 specified more than once, then each matching result is ORed, that
174 is, all devices which have any of the specified NAME are triggered.
175
176 --name-match=NAME
177 Trigger events for devices with a matching device path. When this
178 option is specified more than once, then each matching result is
179 ORed, that is, all specified devices are triggered.
180
181 -b, --parent-match=SYSPATH
182 Trigger events for all children of a given device. When this option
183 is specified more than once, then each matching result is ORed,
184 that is, all children of each specified device are triggered.
185
186 -w, --settle
187 Apart from triggering events, also waits for those events to
188 finish. Note that this is different from calling udevadm settle.
189 udevadm settle waits for all events to finish. This option only
190 waits for events triggered by the same command to finish.
191
192 --wait-daemon[=SECONDS]
193 Before triggering uevents, wait for systemd-udevd daemon to be
194 initialized. Optionally takes timeout value. Default timeout is 5
195 seconds. This is equivalent to invoke invoking udevadm control
196 --ping before udevadm trigger.
197
198 -h, --help
199 Print a short help text and exit.
200
201 In addition, optional positional arguments can be used to specify
202 device names or sys paths. They must start with /dev/ or /sys/
203 respectively.
204
205 udevadm settle [options]
206 Watches the udev event queue, and exits if all current events are
207 handled.
208
209 -t, --timeout=SECONDS
210 Maximum number of seconds to wait for the event queue to become
211 empty. The default value is 120 seconds. A value of 0 will check if
212 the queue is empty and always return immediately. A non-zero value
213 will return an exit code of 0 if queue became empty before timeout
214 was reached, non-zero otherwise.
215
216 -E, --exit-if-exists=FILE
217 Stop waiting if file exists.
218
219 -h, --help
220 Print a short help text and exit.
221
222 See systemd-udev-settle.service(8) for more information.
223
224 udevadm control option
225 Modify the internal state of the running udev daemon.
226
227 -e, --exit
228 Signal and wait for systemd-udevd to exit. No option except for
229 --timeout can be specified after this option. Note that
230 systemd-udevd.service contains Restart=always and so as a result,
231 this option restarts systemd-udevd. If you want to stop
232 systemd-udevd.service, please use the following:
233
234 systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service
235
236
237 -l, --log-level=value
238 Set the internal log level of systemd-udevd. Valid values are the
239 numerical syslog priorities or their textual representations:
240 emerg, alert, crit, err, warning, notice, info, and debug.
241
242 -s, --stop-exec-queue
243 Signal systemd-udevd to stop executing new events. Incoming events
244 will be queued.
245
246 -S, --start-exec-queue
247 Signal systemd-udevd to enable the execution of events.
248
249 -R, --reload
250 Signal systemd-udevd to reload the rules files and other databases
251 like the kernel module index. Reloading rules and databases does
252 not apply any changes to already existing devices; the new
253 configuration will only be applied to new events.
254
255 -p, --property=KEY=value
256 Set a global property for all events.
257
258 -m, --children-max=value
259 Set the maximum number of events, systemd-udevd will handle at the
260 same time.
261
262 --ping
263 Send a ping message to systemd-udevd and wait for the reply. This
264 may be useful to check that systemd-udevd daemon is running.
265
266 -t, --timeout=seconds
267 The maximum number of seconds to wait for a reply from
268 systemd-udevd.
269
270 -h, --help
271 Print a short help text and exit.
272
273 udevadm monitor [options]
274 Listens to the kernel uevents and events sent out by a udev rule and
275 prints the devpath of the event to the console. It can be used to
276 analyze the event timing, by comparing the timestamps of the kernel
277 uevent and the udev event.
278
279 -k, --kernel
280 Print the kernel uevents.
281
282 -u, --udev
283 Print the udev event after the rule processing.
284
285 -p, --property
286 Also print the properties of the event.
287
288 -s, --subsystem-match=string[/string]
289 Filter kernel uevents and udev events by subsystem[/devtype]. Only
290 events with a matching subsystem value will pass. When this option
291 is specified more than once, then each matching result is ORed,
292 that is, all devices in the specified subsystems are monitored.
293
294 -t, --tag-match=string
295 Filter udev events by tag. Only udev events with a given tag
296 attached will pass. When this option is specified more than once,
297 then each matching result is ORed, that is, devices which have one
298 of the specified tags are monitored.
299
300 -h, --help
301 Print a short help text and exit.
302
303 udevadm test [options] [devpath]
304 Simulate a udev event run for the given device, and print debug output.
305
306 -a, --action=ACTION
307 Type of event to be simulated. Possible actions are "add",
308 "remove", "change", "move", "online", "offline", "bind", and
309 "unbind". Also, the special value "help" can be used to list the
310 possible actions. The default value is "add".
311
312 -N, --resolve-names=early|late|never
313 Specify when udevadm should resolve names of users and groups. When
314 set to early (the default), names will be resolved when the rules
315 are parsed. When set to late, names will be resolved for every
316 event. When set to never, names will never be resolved and all
317 devices will be owned by root.
318
319 -h, --help
320 Print a short help text and exit.
321
322 udevadm test-builtin [options] [command] [devpath]
323 Run a built-in command COMMAND for device DEVPATH, and print debug
324 output.
325
326 -h, --help
327 Print a short help text and exit.
328
330 udev(7), systemd-udevd.service(8)
331
332
333
334systemd 248 UDEVADM(8)