Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

lsusb

📅 2021-Mar-26 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ usb ⬩ 📚 Archive

lsusb is a handy utility to view the USB buses and devices connected to USB ports on the computer. It is a part of the usbutils package. It presents a human-friendly view of the output of the usb-devices tool, which also ships with usbutils.

$ sudo apt install usbutils
$ lsusb
Bus 001 Device 005: ID 0bc2:2100 Seagate RSS LLC FreeAgent Go
Bus 001 Device 004: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

In the above output we see a root hub, hubs and a Seagate storage device.

$ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
            |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=lan78xx, 480M
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M

This shows the hierarchy with port, class and driver details, but the human-friendly device names are lost.

$ lsusb -tv
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
        |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
            ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
            |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=lan78xx, 480M
                ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            ID 0bc2:2100 Seagate RSS LLC FreeAgent Go
$ sudo lsusb -v

Bus 001 Device 005: ID 0bc2:2100 Seagate RSS LLC FreeAgent Go
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0bc2 Seagate RSS LLC
  idProduct          0x2100 FreeAgent Go
  bcdDevice            0.00
  iManufacturer           1 Seagate
  iProduct                2 FreeAgent
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          5 Config0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA

[Much much more info for each hub and device]

Tried with: usbutils 1:012-2 and Ubuntu 20.04


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email