lsusb Command Cheat Sheet
The lsusb command displays information about USB buses in the system and the devices connected to them. It is essential for verifying hardware detection.
Synopsis
lsusb [options]...
Basic Listing
lsusb
Bus 002 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
- Bus 002: The USB bus number.
- Device 003: Device number on that bus.
- ID 046d:c534: Vendor ID : Product ID (Hexadecimal).
- Logitech...: Text description (from local database).
Hardware Details
Verbose Output (-v)
Dumps everything: descriptors, config, interfaces, endpoints. Warning: Output is huge.
lsusb -v
less to scroll:
lsusb -v | less
idVendor, idProduct
- MaxPower (How much power device requests, e.g., 500mA).
- bInterfaceClass (e.g., Human Interface Device, Mass Storage).
Specific Device (-d)
Filter by Vendor:Product.
lsusb -d 046d:c534 -v
Specific Bus/Device (-s)
Filter by bus and device number.
lsusb -s 002:003 -v
Topology View
Tree View (-t)
Shows the physical hierarchy of USB ports, hubs, and devices.
lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
|__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
usb-storage, uvcvideo).
- Speed: Shows link speed (12M, 480M, 5000M).
Raw IDs
Numeric Output (-n)
Do not resolve names (useful if usb.ids is missing or for scripts).
lsusb -n
Troubleshooting
"Device not found"
- Check
dmesg | tailimmediately after plugging it in. - If
lsusbdoesn't see it, it might be a power issue or dead hardware.
Update USB Database
If devices show as "Unknown", update the local ID mapping.
sudo update-usbids
Notes
- Permissions:
lsusblists devices, butlsusb -v(verbose) often requiressudoto read complete descriptors. - USB Classes:
03= HID (Keyboard/Mouse)08= Mass Storage (Flash drive)09= Hub0E= Video (Webcam)