Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lsusb

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.

Install

go install github.com/mirzakhany/lsusb@latest

Usage

lsusb [command] [flags]

Running lsusb with no subcommand lists all USB devices (same as lsusb list).

Commands

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

Flags

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

Examples

# 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 version

Options: -v, -s, -d, -p, -t, -V, -h (same semantics as above).

License

See repository for license details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages