USB peripherals range from keyboards and storage sticks to embedded debug adapters, and troubleshooting them often starts with confirming how the system sees each device. Access to detailed USB information aids in matching physical devices to logical identifiers, validating that drivers loaded correctly, and understanding power capabilities. The kernel always knows what is actually on each bus, even when the cable maze under the desk suggests otherwise.
On Linux, USB information is exposed through the kernel's USB subsystem and surfaced to user space via tools such as lsusb, dmesg, and usb-devices. These utilities read from the underlying bus topology and descriptor data, revealing bus numbers, device IDs, configured interfaces, and sometimes power attributes or speed. Combining them provides both a high-level inventory and low-level descriptors for each device.
Because USB buses can host hubs, composite devices, and hot-plugged hardware, interpreting their state benefits from multiple views and a consistent workflow. Verbose listings generate large outputs, some details require elevated privileges, and device numbering can change when hardware is reattached. Using the commands below in a structured order yields a repeatable way to inspect and verify USB devices on a Linux system.
Steps to view USB device details:
- Open a terminal on the Linux system.
- List all connected USB devices with lsusb.
$ lsusb Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
The lsusb command shows a summary of USB devices connected to the system, including their bus location, device number, vendor ID, and product ID.
- Display the USB device hierarchy using lsusb -t.
$ lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M |__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480MThe lsusb -t option provides a tree-like structure showing which devices are connected to each USB port and their negotiated speed (for example, 480M for USB 2.0).
- Show verbose descriptor information for each connected device with lsusb -v.
$ lsusb -v Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x046d Logitech, Inc. idProduct 0xc52b Unifying Receiver
The -v option prints detailed descriptors, configurations, and interfaces for each device, which can include information related to capabilities and power characteristics.
- Filter the listing to a specific USB device using lsusb -d with its vendor and product IDs.
$ lsusb -d 046d:c52b Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
The -d option restricts output to the device matching the specified vendor and product ID, useful once the numeric IDs are known.
- Target a device by bus and device number using lsusb -s.
$ lsusb -s 002:003 Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
The -s option selects a device using its bus and device numbers, which are visible in the main lsusb listing.
- Quickly locate devices by name by combining lsusb with grep.
$ lsusb | grep Logitech Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Filtering by manufacturer or model name narrows the list when multiple devices are present on the same system.
- Examine kernel messages related to USB activity using dmesg.
$ dmesg | grep -i usb [ 1.843250] usb 1-1: new high-speed USB device number 2 using ehci-pci [ 1.972032] usb 1-1: New USB device found, idVendor=8087, idProduct=0024
dmesg shows kernel log messages and helps identify detection events, speed negotiation, and error conditions for USB devices.
- Retrieve detailed per-device information from the kernel with usb-devices.
$ usb-devices T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=8087 ProdID=0024 Rev= 0.00 S: Product=Integrated Rate Matching Hub
The usb-devices output exposes low-level attributes such as class, speed, and configuration flags directly from the kernel’s USB subsystem.
- Confirm detection accuracy by comparing lsusb and usb-devices output with the set of physically connected USB devices.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.
