18

Is there any tool which lists the controller, hubs and devices of USB subsystem in their tree structure at the shell?

lsusb lists flatly and does not show all the details. usbview has a GUI, but shows the tree structure and all details of the devices. Any tool that shows whatever usbview does, but at the shell?

1 Answers1

29

-t shows tree output:

$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/1p, 5000M
        |__ Port 1: Dev 4, If 0, Class=Hub, Driver=hub/2p, 5000M

This also shows the current speed, so you can see e. g. keyboard and mouse with 12 Mbps.

Use -tv for more verbose output, including class descriptors (vendor):

$ lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/1p, 5000M
        ID 2109:0817 VIA Labs, Inc. 
        |__ Port 1: Dev 4, If 0, Class=Hub, Driver=hub/2p, 5000M
            ID 2109:0817 VIA Labs, Inc. 
...

The verbose flag can be repeated for even more detailed output:

$ lsusb -tvv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb2  /dev/bus/usb/002/001
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/1p, 5000M
        ID 2109:0817 VIA Labs, Inc. 
        /sys/bus/usb/devices/2-2  /dev/bus/usb/002/002
        |__ Port 1: Dev 4, If 0, Class=Hub, Driver=hub/2p, 5000M
            ID 2109:0817 VIA Labs, Inc. 
            /sys/bus/usb/devices/2-2.1  /dev/bus/usb/002/004
    |__ Port 5: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
        /sys/bus/usb/devices/2-5  /dev/bus/usb/002/003
        |__ Port 3: Dev 5, If 0, Class=Hub, Driver=hub/4p, 5000M
            ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
            /sys/bus/usb/devices/2-5.3  /dev/bus/usb/002/00/
Tombart
  • 999
Rolf
  • 419