Mastering lsusb: List and Analyze USB Devices on CentOS 7
This guide shows how to install usbutils, use lsusb and its options to list USB devices, display detailed information, view hierarchical structures, and filter storage devices on a CentOS 7 system.
Install usbutils
CentOS 7 does not include lsusb by default. Install it with:
yum -y install usbutilsList USB devices
Run lsusb to display each device’s bus number, device number, vendor ID, product ID and description.
Bus 001 Device 010: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 055: ID 0951:1665 Kingston Technology Digital DataTraveler SE9 64GB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubField explanation
Bus 001– identifier of the USB controller (use lspci | grep USB to list all controllers). Device 055 – system‑assigned device number. ID – vendor and product identifiers.
Text after the IDs – manufacturer and product name.
Tree view of USB topology
Use the -t option for a hierarchical display. The speed suffixes indicate the bus speed (12M = USB 1.1, 480M = USB 2.0, 5000M = USB 3.0).
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/7p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480MVerbose device information
Use -v to show full descriptors (device, configuration, interface, endpoint). Pipe to less for paging: lsusb -v | less Typical fields include bLength, bDescriptorType, bcdUSB, idVendor, idProduct, class codes, max packet size, power consumption, etc.
Count connected devices
List device nodes under /dev/bus/usb to see how many devices are present:
find /dev/bus/usbIdentify mass‑storage devices
Filter verbose output for the Mass Storage class and vendor IDs: lsusb -v | grep -E 'idVendor|Mass Storage' This isolates entries such as:
idVendor 0x0951 Kingston Technology
bInterfaceClass 8 Mass StorageQuery a single device
Use the -D option with the device node path to retrieve its full descriptor set:
lsusb -D /dev/bus/usb/001/056Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
