lsusb
lsusb
The lsusb
command in Linux is used to display information about USB (Universal Serial Bus) buses in the system and the devices connected to them. It's a valuable tool for diagnosing and managing USB devices, providing detailed insights into the USB hardware connected to your system.
Understanding lsusb
lsusb
The lsusb
command lists all the USB devices currently connected to your system, showing details about each device such as the vendor ID, product ID, and device description.
Basic Usage
To display a list of all USB devices, simply run:
Example Output
Here’s an example of what the lsusb
command might return:
Detailed Output
To get more detailed information about the USB devices, use the -v
(verbose) option:
Example Detailed Output
Here’s an example of detailed output for one device:
Key Options
-v: Verbose output. Displays detailed information about each device.
-t: Show the hierarchical tree of devices.
-s [bus]:[devnum]: Show only devices in the specified bus and device number.
-d [vendor]:[product]: Show only devices with the specified vendor and product ID.
-D [device]: Show detailed information about the specified device file.
Practical Examples
List All USB Devices:
This command lists all the currently connected USB devices.
Display Detailed Information About All USB Devices:
This command provides detailed information about all USB devices. Note that
sudo
may be required for full details.Show USB Device Tree:
This command shows a hierarchical tree of USB devices.
Filter by Vendor and Product ID:
This command will list devices that match the specified vendor (8087) and product (0024) IDs.
Detailed Information for a Specific Device:
This command displays information about the device on bus 002 with device number 004.
Related Commands
usb-devices: Displays detailed information about USB devices. It's more human-readable than
lsusb -v
.dmesg: Displays system messages, including those related to USB device connections and disconnections.
udevadm: Monitors udev events. Useful for diagnosing USB device issues.
Conclusion
The lsusb
command is a powerful tool for managing and diagnosing USB devices on Linux systems. It provides a quick way to list all USB devices and offers detailed information for troubleshooting and verifying hardware.
help
Last updated