The Linux lsusb command has 5 secret uses you should know

Your Linux command line is full of commands you can use to learn more and use your device more efficiently. Recently I discovered some practical uses of lsusb order. Here’s what I found.
In case you are unfamiliar, the lsusb the command takes its name from ls command that you may already know. ls is short for “list” and of course usb refers to the Universal Serial Bus, the category of computer port that we all use all the time.
Identify the vendor of a device
Sometimes when you receive a USB drive or computer device, it is difficult to know who the manufacturer is. So-called white label products may have a company’s logo on them, but that company simply bought it from another and stamped it themselves.
If you want to know who the real manufacturer, also called seller, is, you can check with the lsusb order.
You will see a number of devices listed the first time you run it, but if you unplug the device and run lsusb again, you can identify which one you are studying because it will disappear on the second reading.
For example, here is an entry I identified for a USB stick I own:
Bus 004 Device 011: ID 13fe:6700 Phison Electronics Corp. USB DISK 3.0
I identified it by noticing that it was missing lsusbThe output after deleting it.
In this case, the provider identification code is 13fe, and lsusb identified this supplier as Phison Electronics Corp. If I wanted to know more, or if lsusb for some reason I couldn’t produce the name of a vendor, I could do a web search such as “13fe device vendor ID” and an online database will probably be able to identify it for me and show me other products they make.
Use These 7 Linux Commands to Keep Your System Clean and Fast
Keep your Linux system running fast with simple maintenance commands to clean packages, clear logs, manage startup applications, and monitor performance.
Identify a specific USB device model
You may have noticed that the ID code has a second set of characters after the Vendor ID. This is the device ID, which you can use to ensure you have a specific product from one vendor and not another.
Looking at the same result again:
Bus 004 Device 011: ID 13fe:6700 Phison Electronics Corp. USB DISK 3.0
The device ID number is 6700. Once you have the vendor and device ID codes, you can use a search service like Device Hunt to find the specific model you have.
Find the maximum transfer speed of your USB port
I know from experience that determining the speed of your USB port can be a real challenge. Computer manufacturers don’t always label them, and even when they do, it’s not always correct or informative. The colors of the USB ports are also not completely reliable.
Linux lsusb command to the rescue! The first step is to identify the root hub. You probably noticed that there were a lot of devices listed and that in addition to detachable USB devices, all USB ports and their capabilities are also listed there.
Again, identifying a specific port is easy if you have an external USB device to plug and unplug for testing purposes.
First, run lsusb with the -t flag to see the devices listed in a tree view for easier reading.
lsusb -t
You will see a bunch of devices. To determine which USB port you want to check, plug a device into that port and run the command again.
You will see the new device appear as a “branch” under the affected USB controller port. There will be a number printed at the end of this trunk entry with an M at the end.
This is the maximum theoretical speed of the port, in megabytes. So if the output is 480M, you know the maximum speed is 480 Mbps.
Check the maximum speed of a USB device
Even if your port is designed for a certain transfer speed, you’re still limited by all sorts of factors, not the least of which includes the maximum speed of the connected USB device. Fortunately, lsusb is also able to show you this speed.
However, in this case you should make sure to use the -t flag, because it reveals speed.
lsusb -t
In my case, I identified this entry as my USB key:
Port 002: Dev 011, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
The number at the end of the entry with an M is not the storage size but the maximum number of megabytes per second. In this case, since it says 5000M, the maximum speed is 5000 Mbps, or more effectively noted 5 Gbps. With this information in hand, you can verify a retailer’s claim regarding the device’s maximum speeds.
Determine your USB port or device generation number
It may also be helpful to know which generation of USB drive you are using. I’ve noticed that some devices include a specific generation or version number in their name, like “Sandisk 3.0”, but this can sometimes be unclear or misleading. Depending on the version of lsusb you are using, you may be able to see a port’s generation by combing through the verbose output, but this can be technically difficult.
If you know how to read speed ratings, checking the generation is actually very simple. Run lsusb -t again, and from the maximum speed supported by a device or port, you can also extrapolate the version or generation number of the USB port. Refer to this table to understand it:
|
Speed |
Generation |
|---|---|
|
12M |
USB1.0 |
|
480M |
USB2.0 |
|
5000M |
USB 3.2 Gen 1 (aka USB 3.0) |
|
10000M |
USB 3.2 Gen 2 (aka USB 3.1) |
|
20000M/x2 |
USB 3.2 generation 2×2 |
With hardcoded hardware ratings, you can confidently identify its generation or verify a retailer’s generation claim.
The lsusb command is not the only useful Linux command in hardware. You can also use the lspci to see information about the internal components of the PC.
Another tip: if you start using lsusbthe detailed output of , you may find it useful to know how to use the grep order. This way you can filter out the noise and get only the information you need.




