Lsusb Basics
Just a quick reference of:
- basic output
- filter by bus/device
- filter by vendor/product
Basic Output
The lsusb tool just reads the USB bus and lists what it finds. Super flashy.
Here’s my computer. I’ve only plugged in one flash drive and a mouse:
$ lsusb
Bus 002 Device 003: ID 8086:0189 Intel Corp.
Bus 002 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1bcf:2b80 Sunplus Innovation Technology Inc.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The breakdown from L-R: Bus# Device#: vendorID:productID Description
One can filter this output by using -s
to specify a bus and a device number, or by using -d
to specify vendor and product ID numbers.
Filter by Bus/Device ID
Let’s look at the 2nd bus using -s
:
$ lsusb -s 002:
Bus 002 Device 003: ID 8086:0189 Intel Corp.
Bus 002 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Filter by Vendor/Product ID
Let’s check for any Logitech things using -d
:
$ lsusb -d 046d:
Bus 002 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
If I had more Logitech devices plugged in, this would probably have displayed those as well. Note on both of those there’s a colon after the ID. It’s important to put that there or the filter may work improperly or not at all.