LinuxCommandLibrary

usb-devices

Display detailed information about USB devices

SYNOPSIS

usb-devices

DESCRIPTION

usb-devices is a powerful Linux utility designed to display comprehensive information about all connected USB devices. Unlike simpler commands like lsusb, which primarily list basic device identifiers, usb-devices parses the detailed information available within the /sys/bus/usb/devices filesystem. It presents a structured view including device topology, speed, vendor and product IDs, manufacturer and serial number, parent-child relationships between hubs and devices, and assigned kernel drivers. This command is invaluable for system administrators and developers needing to debug USB connectivity issues, verify driver assignments, or simply gain a deeper understanding of the USB hardware configuration. Often implemented as a shell script, its output provides a highly readable summary of the system's USB bus.

CAVEATS

Output Variability
The output format can vary slightly across different Linux distributions or kernel versions, as usb-devices is often a shell script and not a standardized binary.

Permissions
While typically readable by unprivileged users, some system configurations or specific device details might require root privileges to access all underlying /sys information.

Script-Based
It's generally a wrapper script that interprets sysfs data rather than a standalone compiled command, meaning its behavior is tied to the kernel's sysfs structure.

DETAILED OUTPUT STRUCTURE

The output of usb-devices is organized to provide a clear hierarchical view of the USB bus. Each USB device, including hubs, is typically represented with distinct sections:

T: Bus - General information about the USB bus and its associated devices, often including ID (bus ID and device number) and Driver (the kernel driver for the USB host controller).
P: Device - Details specific to the USB device itself, such as ID (vendor:product IDs), Vendor, Product, Serial number, Speed, and Ports (how many downstream ports if it's a hub).
S: Product Name - A human-readable name for the product.
C: Class - USB class, subclass, and protocol information.
I: Interface - Details for each interface provided by the device, including Class, Driver (the kernel module attached to this interface), and USB Info.
D: Driver - The specific kernel driver bound to the device's interface.

HISTORY

The usb-devices utility emerged as a convenient way to present detailed USB device information directly from the Linux kernel's sysfs virtual filesystem. Its development is tied to the evolution of kernel interfaces, moving from older /proc/bus/usb structures to the current /sys/bus/usb. It serves as a practical, human-readable parser, abstracting the complex raw data available in sysfs into a more digestible format for system introspection and troubleshooting.

SEE ALSO

lsusb(8), udevadm(8), dmesg(1)

Copied to clipboard