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