2021-09-10 23:03:05 +01:00
|
|
|
# udevadm
|
|
|
|
|
|
|
|
> Linux `udev` management tool.
|
|
|
|
> More information: <https://www.freedesktop.org/software/systemd/man/udevadm>.
|
|
|
|
|
|
|
|
- Monitor all device events:
|
|
|
|
|
|
|
|
`sudo udevadm monitor`
|
|
|
|
|
|
|
|
- Print `uevents` sent out by the kernel:
|
|
|
|
|
|
|
|
`sudo udevadm monitor --kernel`
|
|
|
|
|
|
|
|
- Print device events after being processed by `udev`:
|
|
|
|
|
|
|
|
`sudo udevadm monitor --udev`
|
|
|
|
|
2023-11-02 14:26:39 +00:00
|
|
|
- List attributes of device `/dev/sda`:
|
2021-09-10 23:03:05 +01:00
|
|
|
|
2023-11-02 14:26:39 +00:00
|
|
|
`sudo udevadm info --attribute-walk {{/dev/sda}}`
|
2021-09-10 23:03:05 +01:00
|
|
|
|
|
|
|
- Reload all `udev` rules:
|
|
|
|
|
|
|
|
`sudo udevadm control --reload-rules`
|
|
|
|
|
|
|
|
- Trigger all `udev` rules to run:
|
|
|
|
|
|
|
|
`sudo udevadm trigger`
|
2023-11-02 14:26:39 +00:00
|
|
|
|
|
|
|
- Test an event run by simulating loading of `/dev/sda`:
|
|
|
|
|
|
|
|
`sudo udevadm test {{/dev/sda}}`
|