Skip to content

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
Output Format: 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
Use less to scroll:
lsusb -v | less
Key fields to look for: - 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
Output:
/:  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
- Driver: Shows which kernel driver is handling the device (e.g., 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"

  1. Check dmesg | tail immediately after plugging it in.
  2. If lsusb doesn'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: lsusb lists devices, but lsusb -v (verbose) often requires sudo to read complete descriptors.
  • USB Classes:
    • 03 = HID (Keyboard/Mouse)
    • 08 = Mass Storage (Flash drive)
    • 09 = Hub
    • 0E = Video (Webcam)