The 'lsusb' command is a utility for displaying information about USB buses in the system and the devices connected to them. It's part of the usbutils package and is available on most Linux distributions. lsusb provides valuable information for diagnosing issues with USB devices and understanding the USB device hierarchy in a system.
Key features of the lsusb command:
1. USB Device Enumeration: lsusb identifies and lists all USB devices connected to the system, including internal devices like webcams, Bluetooth adapters, and external peripherals like mice, keyboards, and storage devices.
2. Device Identification: The command displays vendor and product IDs for each device, which can be used to identify specific hardware models and find appropriate drivers or troubleshooting information.
3. Hierarchical Display: With the -t option, lsusb shows the tree structure of USB buses, hubs, and devices, making it easy to visualize how devices are physically connected to the system.
4. Detailed Device Information: Using the -v (verbose) option, lsusb provides extensive details about each device, including its USB version compatibility, power requirements, supported speeds, and configuration descriptors.
5. Filtering Capabilities: The command allows filtering output to show only specific devices based on bus number, device number, or vendor/product IDs, which helps focus on devices of interest in systems with many USB peripherals.
6. USB Protocol Analysis: In verbose mode, lsusb shows low-level USB protocol information, including device, configuration, interface, and endpoint descriptors, which is valuable for developers and advanced troubleshooting.
7. Human-readable Output: lsusb translates numeric vendor and product IDs into human-readable names using a database of USB IDs (usually located at /usr/share/hwdata/usb.ids).
Common use cases for lsusb include:
- Identifying connected USB devices
- Checking if a USB device is properly detected by the system
- Troubleshooting non-functioning USB peripherals
- Finding vendor and product IDs to search for drivers
- Verifying USB device capabilities (like speed support)
- Diagnosing power-related issues with USB devices
- Developing and debugging USB drivers
lsusb is particularly useful for system administrators, hardware technicians, and Linux users who need to troubleshoot USB connectivity issues or gather information about their system's USB configuration. It provides insights that might not be readily available through graphical system information tools, especially for complex USB setups with multiple hubs or composite devices.