Here is the 3 must-know Linux commands to check USB system information in Linux command line – in Linux terminal.
1.lsusb
The lsusb command is a powerful utility on Linux that provides detailed information about USB (Universal Serial Bus) devices connected to your system. It displays information about all USB buses in the system and the devices connected to them, displaying their bus and device numbers, vendor IDs, product IDs, and device descriptions
lsusb command reads information from the /dev/bus/usb directory or /proc/bus/usb interface. It uses a hardware database (/usr/share/usb.ids or /var/lib/usbutils/usb.ids) to provide human-readable names for vendors and products.
It is typically pre-installed on most Linux distributions and to use lsusb, simply open a terminal and type:
lsusb
The lsusb command supports various arguments or options, which enhances the command functionality:
- -v: Displays detailed information about each device.
- -t: Displays the USB device hierarchy in a tree format.
- -s [bus]:[device]: Shows information for a specific device.
2. usb-devices
The usb-devices command displays the in-depth information about USB devices, including the bus number, device level, speed, vendor ID, product ID, and manufacturer details. This information is crucial for troubleshooting connectivity issues or hardware configuration issues related to the USB device.
To use usb-devices, simply open a terminal and type:
usb-devices
The output includes various details for each USB device.
3. fdisk
We all know that the fdisk command is primarily used for partitioning disks and to display information about all connected storage devices, including USB drives. Which means, we can use the fdisk command to list USB devices in Linux.
Using fdisk -l is a simple way to list USB devices and other storage devices connected to your Linux system. To use the command simply run:
sudo fdisk -l
Note to run the command with -l option (which is for “list”) and to run the command wih sudo (root or administrative privileges), which is always required to access disk information on the system.
Once the run the command, you will see a list of all connected storage devices, including USB drives on your system.
These commands offer a thorough method for collecting information about USB devices connected to your Linux system.
