{"id":381902,"date":"2021-12-16T15:00:53","date_gmt":"2021-12-16T12:00:53","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-use-lsusb-in-linux-with-a-practical-example-cloudsavvy-it\/"},"modified":"2021-12-16T15:00:53","modified_gmt":"2021-12-16T12:00:53","slug":"how-to-use-lsusb-in-linux-with-a-practical-example-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-use-lsusb-in-linux-with-a-practical-example-cloudsavvy-it\/","title":{"rendered":"#How to Use lsusb in Linux (With a Practical Example) \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a3d2c3c2dc40\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a3d2c3c2dc40\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-lsusb-in-linux-with-a-practical-example-cloudsavvy-it\/#What_Is_lsusb\" >What Is lsusb?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-lsusb-in-linux-with-a-practical-example-cloudsavvy-it\/#Using_lsusb_First_Run\" >Using lsusb: First Run<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-lsusb-in-linux-with-a-practical-example-cloudsavvy-it\/#lsusb_Diving_Deeper\" >lsusb: Diving Deeper<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-lsusb-in-linux-with-a-practical-example-cloudsavvy-it\/#Wrapping_up\" >Wrapping up<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Use lsusb in Linux (With a Practical Example) \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage alignnone wp-image-4038 size-full\" data-pagespeed-lazy-srcset=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2017\/07\/add8ac45.png?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.cloudsavvyit.com\/p\/uploads\/2017\/07\/add8ac45.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" sizes=\"auto, 400w, 1200w\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2017\/07\/add8ac45.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"How to Use lspci in Linux (With a Practical Example)\" width=\"1400\" height=\"600\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Learn how to use the lsusb tool in Linux with a practical example. The lsusb will list all USB devices in a system and USB hubs and provide detailed information on each of them.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"What_Is_lsusb\"><\/span>What Is <i>lsusb<\/i>?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><i>lsusb<\/i> is a command-line tool in Linux, installed by default as part of your (modern) Linux Operating System, which can list and enumerate all USB devices, including USB hubs found within the system on which it is being executed. It will work on desktops, servers, and other common Linux-running hardware like Raspberry Pi\u2019s, etc.<\/p>\n<p>As the tool is installed by default, there is no need to install it, and it cannot be uninstalled. The only way to remove it completely from a system would be to use <code>sudo<\/code> to remove (<code>rm<\/code>) the actual binary (commonly at <code>\/usr\/bin\/lsusb<\/code>) and the manual (commonly at <code>\/usr\/share\/man\/man8\/lsusb.8.gz<\/code>).<\/p>\n<p>You can access the complete but small <code>lsusb<\/code> manual by issuing <code>man lsusb<\/code> at a Terminal command prompt.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14493\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/10\/586e508f.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Partial lsusb manual page\" width=\"1160\" height=\"512\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>To access the command prompt, if you are using a desktop GUI, you will often have to click your operating system\u2019s action button (like the green button commonly at the bottom left in Linux Mint or the <i>Activities<\/i> button at the top left in Ubuntu) and type Terminal and click the corresponding option, or you may like to try the Windows key on your keyboard in combination with the letter <code>T<\/code> (hold the Windows key, then press <code>T<\/code>).<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Using_lsusb_First_Run\"><\/span>Using <i>lsusb<\/i>: First Run<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When you first run <code>lsusb<\/code> from a Terminal command prompt, you will get a brief\/concise list of output, showing various items of information about the USB devices in your system:<\/p>\n<pre>lsusb&#13;\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14494\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/10\/59b2900a.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"First lsusb run without any options\" width=\"571\" height=\"105\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Here we first see the USB Bus (a computer\/system bus is a transport mechanism the customer uses, just like a bus in real life, to transport data from one item to another, for example, from a USB device \u2013 like a mouse or keyboard \u2013 to the processor) number, followed by a device number, a <i>USB Device ID<\/i> and finally a textual de<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">script<\/a>ion of the device.<\/p>\n<p>Note that the <i>USB Device ID<\/i> has two parts. The first part (before the <code>:<\/code>) is a USB devices vendor identifier, associated with a specific vendor, and the second part is a subsystem USB device number. So, for example, the Holtek Semiconductor device with USB device ID <code>04d9:1203<\/code> has <code>04d9<\/code> which is <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/usb-ids.gowdy.us\/read\/UD\/04d9\"> associated with <i>Holtek Semiconductor, Inc.<\/i><\/a> and the subsystem device (the actual USB device or USB software emulator by that vendor) is <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/usb-ids.gowdy.us\/read\/UD\/04d9\/1203\">a keyboard<\/a>.<\/p>\n<p>Of interest here is that such Device IDs can be entered into your favorite search engine. Preferably this should be done with double quotes around the full ID or without quotes if you are only searching the first or second part, in which case you may want to add USB as a generic keyword. In both cases, this would produce reliable search results.<\/p>\n<p>Having the ability to search such Device IDs online also opens up the possibility to find that driver for that <i>odd USB device from years ago<\/i> by using a Device ID. You can add a keyword like \u201cdriver\u201d, \u201cdownload\u201d and\/or similar to obtain more accurate search results.<\/p>\n<p>Note that it may also be possible to search for a similar driver by the same hardware vendor if you cannot find the actual target driver, as sometimes drivers include support for a whole array of devices by the manufacturer. Finally, the last textual output column of the <i>lsusb<\/i> output may provide a good hint as to what the device is.<\/p>\n<p>Also, note that devices listed in lsusb are not necessarily always hardware\/physical devices. They may be software hub interfaces that take care of, for example, relaying hardware signals from an actual physical USB device to the operating system. For example, let\u2019s run <code>lsusb<\/code> inside VirtualBox (a software package that emulates computer hardware and allows running other operating systems from within a host operating system):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14495\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/10\/9eb60bc8.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"lsusb output on VirtualBox\" width=\"574\" height=\"73\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Note that VirtualBox will use (or rather; emulate) the most common\/default USB standard, i.e. <code>Linux Foundation 1.1 root hub<\/code> whereas a modern system will also list <code>Linux Foundation 2.0 root hub<\/code> and <code>Linux Foundation 3.0 root hub<\/code> hubs \u2013 i.e. USB 1.1 versus USB 2.0 and USB 3.0. This is handy if you quickly want to see if a system is modern or not; <code>lsusb<\/code> will show if there is a USB 3.0 hub in the system (if the hardware is not virtualized), a good indicator that the system at least has some level of modernity!<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"lsusb_Diving_Deeper\"><\/span><i>lsusb<\/i>: Diving Deeper<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Once you get used to using <code>lsusb<\/code> as part of your regular workflow, you will want to explore some of the command line options available. The <code>-d [vendor]:[product]<\/code> is handy if you want to search for a specific vendor and product ID. Similarly you can search by Bus number and Device number using the <code>-s [[bus]:][devnum]<\/code> option. Note that here the <i>bus<\/i> part of the option is optional.<\/p>\n<p>So how can you search for just a Product ID without searching for a vendor? You can use <code>grep<\/code>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14496\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/10\/c00b5755.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"lsusb -s and -d options and grepping for the USB Device ID\" width=\"534\" height=\"117\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Note that using a Product ID with the option <code>-s<\/code> (i.e. an incorrect combination of options\/input as the Product ID should be used with the <code>-d<\/code> option instead) may lead to unexpected output as <code>lsusb<\/code> tries and parses the input provided a USB bus and device number option:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14497\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/10\/7b6fbd4c.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Incorrect usage of the -s option gives unexpected lsusb output\" width=\"520\" height=\"51\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You can also find a plethora of technical information for each USB device by specifying the <code>-v<\/code> option. <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/general\/\" data-internallinksmanager029f6b8e52c=\"3\" title=\"General\" target=\"_blank\" rel=\"noopener\">General<\/a>ly you will want to add\u00a0<code>sudo<\/code>\u00a0to provide all available information about the device:<\/p>\n<pre>sudo lsusb -d your:deviceid -v 2&gt;\/dev\/null | grep 'MaxPower'&#13;\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14498\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/10\/d642f8c3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"MaxPower grep using sudo lsusb in verbose mode\" width=\"603\" height=\"85\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The output of <code>lsusb -v<\/code> is very verbose, so we only selected a single item of interest: the MaxPower for the Logitech Optical Wheel Mouse, selected with the <code>-d<\/code> option. We also suppress any <code>lsusb<\/code> errors by redirecting <code>stderr<\/code> (standard error) output to <code>\/dev\/null<\/code> for the <code>lsusb<\/code> command (before piping it to <code>grep<\/code> to select the item of interest.<\/p>\n<p>Use <code>lsusb -v<\/code> to see all detailed information for all connected devices and hubs (including software devices). Note that the output will likely scroll for several pages, especially on modern or non-hardware-emulated systems.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Wrapping_up\"><\/span>Wrapping up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this article we reviewed how to use the <code>lsusb<\/code> tool in Linux. We looked at how to start the tool from a Terminal prompt in Linux and how to use various options to control the output and informativeness of <code>lsusb<\/code>.<\/p>\n<p>If you enjoyed reading this article, you may like to read How to Use lsof in Linux (With a Practical Example) next! <strong>Enjoy!<\/strong>\n<\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/14492\/how-to-use-lsusb-in-linux-with-a-practical-example\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Use lsusb in Linux (With a Practical Example) \u2013 CloudSavvy IT&#8221; Learn how to use the lsusb tool in Linux with a practical example. The lsusb will list all USB devices in a system and USB hubs and provide detailed information on each of them. What Is lsusb? lsusb is a command-line tool&#8230;<\/p>\n","protected":false},"author":1,"featured_media":381903,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2017\/07\/add8ac45.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-381902","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/381902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=381902"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/381902\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/381903"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=381902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=381902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=381902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}