lsusb lists USB devices on macOS. It uses system_profiler (SPUSBDataType or SPUSBHostDataType depending on macOS version) and provides a Linux-style listing with filtering, tree view, and verbose output.
go install github.com/mirzakhany/lsusb@latestlsusb [command] [flags]Running lsusb with no subcommand lists all USB devices (same as lsusb list).
| Command | Description |
|---|---|
list |
List USB devices (default) |
tree |
Dump the physical USB device hierarchy as a tree |
verbose |
Show raw system_profiler USB output |
version |
Show program version |
| Flag | Description |
|---|---|
-p, --parens |
Display manufacturer names in parentheses |
-s, --device |
[[bus]:][devnum] — show only devices with the given bus and/or device numbers (decimal) |
-d, --vendor |
[vendor]:[product] — show only devices with the given vendor and product ID (hex) |
-h, --help |
Help for the command |
# List all USB devices
lsusb
# List with manufacturer in parentheses
lsusb -p
lsusb list -p
# Filter by bus and device (decimal)
lsusb -s 001:002
lsusb list -s 001
# Filter by vendor:product ID (hex)
lsusb -d 0a5c:4500
lsusb list -d 18d1:4ee7
# Tree view
lsusb tree
# Raw system_profiler output
lsusb verbose
# Version
lsusb versionOptions: -v, -s, -d, -p, -t, -V, -h (same semantics as above).
See repository for license details.