Linux command
systemd-hwdb 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Update
systemd-hwdb update
Query
systemd-hwdb query [modalias]
Example
systemd-hwdb -s update
Example
systemd-hwdb --usr update
Example
systemd-hwdb -r [/path/to/root] update
说明
systemd-hwdb manages the udev hardware database, which maps hardware identifiers (modalias) to properties and metadata. The database is compiled from text files in `/usr/lib/udev/hwdb.d/` and `/etc/udev/hwdb.d/` into a binary format for fast lookup. This database is used by udev rules to identify hardware and set appropriate properties.
参数
- -s, --strict
- Return non-zero exit on parsing errors
- --usr
- Update database in /usr/lib/udev instead of /etc/udev
- -r, --root= _PATH_
- Operate on alternate root filesystem
FAQ
What is the systemd-hwdb command used for?
systemd-hwdb manages the udev hardware database, which maps hardware identifiers (modalias) to properties and metadata. The database is compiled from text files in `/usr/lib/udev/hwdb.d/` and `/etc/udev/hwdb.d/` into a binary format for fast lookup. This database is used by udev rules to identify hardware and set appropriate properties.
How do I run a basic systemd-hwdb example?
Run `systemd-hwdb update` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -s, --strict do in systemd-hwdb?
Return non-zero exit on parsing errors