How To: List USB Device Info From The Terminal (lsusb)3 min read

In this article we will learn to use the terminal to check what USB devices are connected to your computer. We will be using the ‘lsusb‘ command for this one. This article should be both quick and easy.

You may be interested in the three previous articles. In those, we covered ‘lshw‘, ‘lscpu‘, and ‘lspci‘. Seeing as we’ve got a good thing going, we’ll go ahead and cover ‘lsusb’ this time. Like the rest, the function becomes evident by the name, and the man page describes it as thus:

lsusb – list USB devices

You shouldn’t have to install anything. Your distro should already have the ability to run this command. So, without further ado, let’s open your terminal by pressing CTRL + ALT + T. Once you have it open, you can give the command a try.

This one doesn’t need any elevated permissions (see further information below), you can run it as a regular user. As you see from the output, all your connected USB devices should be listed and enumerated. Quite frankly, that’s about all you’ll ever really need to do with the command – but there is indeed more.

So, what else can you do with it? Well, for starters you can see it in tree view. That may not seem important – but wait for it, there’s another use coming up and the tree view is great for seeing what’s attached to what hub without digging behind your computer. Let’s go ahead and use it with the tree switch:

That’s easy enough and informative enough. Like I said, this is useful if you have USB hubs and want to see what’s connected to what. But, that’s still not the neatest thing you can do with ‘lsusb’. Let’s go back to the original command.

Take a look at the output. For example, you might see something like this:

Now, I want you to look at those first two sections, ‘bus’ and ‘device’. Those are actually pretty useful. You just need to know how to use them. Keep them in the same order, and add them to the following command:

So, using my example above, you end up with a command that looks like:

See, the -D switch is for Device and, curiously, the manual says that you need to be root to use it. However, I’ve not ever needed root to do so. Allow me to quote again:

Do not scan the /dev/bus/usb directory, instead display only information about the device whose device file is given. The device file should be something like /dev/bus/usb/001/001. This option displays detailed information like the v option; you must be root to do this.

Try as I might, I can’t see a lick of difference when I run the command without root. So, I have no idea why the manual says I should, or that I must. If anyone knows why, please leave a comment. (Contrary to popular opinion, I do not in fact know everything!)

Anyhow, that last use of lsusb is the most informative. The output is too long for me to bother copy/pasting here, though padding the article would be nice. So, go ahead and run it for yourself. All you need to do is check the bus and device numbers, insert them properly into the path, and you’ll get a ton of info you probably didn’t know was available.

Once again, thanks for reading. Be sure to scroll up, look right, and sign up for the newsletter. You’ll get a lovely little notification every time there’s an article published. Feel free to leave a comment and let me know why it says root is required. As near as I can tell, that isn’t necessary?

Smash a Button
[Total: 0 Average: 0]
Get PDFPrint This
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?


Total Page Visits: 5 - Today Page Visits: 5

Author: Admin

I'm a retired mathematician that has a fondness for Linux and many (not all) things tech. I'm an old-school geek that just enjoys the life he has. I live in a very, very rural area of Maine.

Leave a Reply

Your email address will not be published. Required fields are marked *