Linux Comm Lsusb
[ Linux Command Encyclopedia](#)\\n\\n* * *\\n\\n## What is the lsusb Command\\n\\n`lsusb` is a useful command in Linux systems for listing all USB devices connected to the computer. It stands for "list USB" and can display detailed information about USB buses and connected devices.\\n\\n### Command Functions\\n\\n1. View the list of USB devices currently connected to the system\\n2. Get detailed information about USB devices (Vendor ID, Product ID, etc.)\\n3. Diagnose USB connection issues\\n4. Verify if USB devices are correctly recognized by the system\\n\\n* * *\\n\\n## Basic Syntax\\n\\nlsusb \\n\\n### Common Options and Parameters\\n\\n| Option | Description |\\n| --- | --- |\\n| `-v` | Display verbose output, including device descriptor information |\\n| `-t` | Display USB device hierarchy in tree structure |\\n| `-s [:]` | Only display devices with specified bus and device number |\\n| `-d :` | Only display devices with specified Vendor ID and Product ID |\\n| `-D Device file` | Display detailed information for the specified device file |\\n| `--help` | Display help information |\\n| `--version` | Display version information |\\n\\n* * *\\n\\n## Basic Usage Examples\\n\\n### 1. List All USB Devices (Basic Usage)\\n\\n## Example\\n\\nlsusb\\n\\nTypical output example:\\n\\nBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 8087:0a2b Intel Corp. Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying ReceiverBus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\\nOutput analysis:\\n\\n* `Bus XXX`: USB bus number\\n* `Device XXX`: Device number on this bus\\n* `ID XXXX:XXXX`: Vendor ID:Product ID\\n* Device description information\\n\\n### 2. Display Detailed Information (-v Option)\\n\\n## Example\\n\\nlsusb -v\\n\\nThis command outputs very detailed USB device information, including:\\n\\n* Device descriptors\\n* Configuration descriptors\\n* Interface descriptors\\n* Endpoint descriptors\\n* USB protocol version supported by the device\\n* Device class, subclass, and protocol\\n\\n* * *\\n\\n## Advanced Usage\\n\\n### 1. Display USB Device Connections in Tree Structure\\n\\n## Example\\n\\nlsusb -t\\n\\nExample output:\\n\\n/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M |__ Port 3: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 4: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M\\n\\n### 2. Filter Specific Devices\\n\\n## Example\\n\\n# Only display devices on bus 1\\n\\n lsusb -s 1:\\n\\n# Only display device 3 on bus 1\\n\\n lsusb -s 1:3\\n\\n# Only display Logitech devices (via Vendor ID:Product ID)\\n\\n lsusb -d 046d:\\n\\n### 3. View Specific Device File Information\\n\\n## Example\\n\\nlsusb -D/dev/bus/usb/001/003\\n\\n* * *\\n\\n## Practical Application Scenarios\\n\\n### 1. Check if USB Device is Recognized\\n\\nWhen a USB device is inserted but cannot be used, first use `lsusb` to check if the system has recognized the device.\\n\\n### 2. Get Device ID for Driver Installation\\n\\nMany Linux drivers need to know the device's Vendor ID and Product ID, which can be obtained through `lsusb`.\\n\\n### 3. Debug USB Connection Issues\\n\\nBy comparing the `lsusb` output before and after inserting a device, you can determine if the device is correctly recognized.\\n\\n### 4. View Detailed USB Device Information\\n\\nUsing the `-v` option can obtain detailed technical specifications of the device, which is helpful for developing USB-related applications.\\n\\n* * *\\n\\n## Frequently Asked Questions\\n\\n### Q1: Why doesn't my USB device appear in the lsusb output?\\n\\nPossible reasons:\\n\\n1. Physical connection issues with the device\\n2. USB port or hub failure\\n3. Insufficient power supply to the device\\n4. Kernel driver issues\\n\\n### Q2: How to determine device speed from lsusb output?\\n\\nIn the verbose output (`lsusb -v`), look for the `bcdUSB` field:\\n\\n* `2.00`: USB 2.0\\n* `3.00`: USB 3.0\\n* `3.10`: USB 3.1\\n\\n### Q3: How to permanently save lsusb output?\\n\\n## Example\\n\\nlsusb > usb_devices.txt\\n\\n* * *\\n\\n## Practice Exercises\\n\\n1. Insert a USB device and observe the changes in `lsusb` output\\n2. Use the `-d` option to find devices from a specific vendor\\n3. Compare the output differences between `lsusb` and `lsusb -v`\\n4. Try using the `-t` option to understand the USB device connection topology\\n\\n* * *\\n\\n## Summary\\n\\n`lsusb` is a simple but powerful tool that can help users and system administrators:\\n\\n* Quickly view connected USB devices\\n* Get detailed device information\\n* Diagnose USB-related issues\\n* Provide necessary information for driver installation\\n\\nMastering the use of the `lsusb` command allows you to more efficiently manage and debug USB devices in a Linux environment.\\n\\n[ Linux Command Encyclopedia](#)
YouTip