LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hwdb

systemd component that maps hardware properties to udev device attributes

TLDR

Update hardware database
$ sudo systemd-hwdb update
copy
Query device properties
$ systemd-hwdb query [modalias]
copy
Show hardware database path
$ systemd-hwdb --help
copy

SYNOPSIS

systemd-hwdb [options] command

DESCRIPTION

hwdb (Hardware Database) is a systemd component that maps hardware properties to udev device attributes. It matches hardware by modalias strings and sets properties like device names, permissions, and driver hints.The database is compiled from text files in /usr/lib/udev/hwdb.d/ and /etc/udev/hwdb.d/ into a binary format for fast matching.

PARAMETERS

update

Compile hwdb files to binary.
query modalias
Query properties for modalias.
--path path
Custom hwdb path.
--root root
Root directory.
--strict
Strict parsing mode.
--usr
Use /usr directory.

HWDB FILE FORMAT

$ # /etc/udev/hwdb.d/70-custom.hwdb
# Match USB keyboard
usb:v04D9p1702*
 KEYBOARD_KEY_70039=leftctrl
 KEYBOARD_KEY_3a=capslock

# Match by PCI ID
pci:v00001234d00005678*
 ID_VENDOR=Custom Vendor
copy

USAGE

$ # Update after editing hwdb files
sudo systemd-hwdb update
sudo udevadm trigger

# Find modalias for device
udevadm info /dev/input/event0 | grep MODALIAS
copy

CAVEATS

Changes require hwdb update and udevadm trigger. Modalias format varies by bus type. Incorrect entries may cause device issues.

SEE ALSO

udevadm(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid