{"id":1580,"date":"2021-12-16T12:01:59","date_gmt":"2021-12-16T09:01:59","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/25\/ubuntu-list-usb-devices\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/25\/ubuntu-list-usb-devices\/"},"modified":"2021-12-16T12:01:59","modified_gmt":"2021-12-16T09:01:59","slug":"ubuntu-list-usb-devices","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1580-ubuntu-list-usb-devices\/","title":{"rendered":"Ubuntu: list USB devices"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>On Ubuntu, you may (for one reason or another) wish to view information about all USB devices connected to the system. Unfortunately, Ubuntu doesn\u2019t come with an official GUI USB tool that users can use to view this information efficiently.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400897 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-list-usb-devices.png\" alt=\"Ubuntu: list USB devices\" width=\"1200\" height=\"880\"\/><\/p>\n<p>Thankfully, there are many command-line utilities that users can take advantage of to view USB device information. In this guide, we\u2019ll go over each of these tools, how they work, and how to use them.<\/p>\n<h2>Ubuntu list USB devices \u2013 Lsusb<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400898 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-list-usb-devices-1.png\" alt=\"\" width=\"1200\" height=\"403\"\/><\/p>\n<p>The number one way an Ubuntu user can view all connected USB devices is with the\u00a0<strong>lsusb\u00a0<\/strong>command. This command literally means \u201clist USB,\u201d and it does exactly that \u2014 it lists all of your USB devices, their IDs, names, etc.<\/p>\n<p>To get started, open up a terminal window on the Ubuntu desktop. To open up a terminal window on Ubuntu, press\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong>on the keyboard. Or, search for \u201cTerminal\u201d in the app menu and launch it that way.<\/p>\n<p>With the terminal window open and ready to use, execute the\u00a0<strong>lsusb\u00a0<\/strong>command in the terminal window. Once you enter it, it will print out detailed information about the USB devices connected to the system.<\/p>\n<pre>\nlsusb\n<\/pre>\n<p>In the\u00a0<strong>lsusb\u00a0<\/strong>output, you\u2019ll see \u201cBus,\u201d followed by numbers, \u201cDevice,\u201d more numbers, \u201cID,\u201d some hex code (that\u2019s your device\u2019s ID code), and the name of the device. To locate any USB device, find the name at the end.<\/p>\n<p>If you\u2019d like to save this output to a text file for later reading, research, or easier viewing via your favorite text editor, pipe the output to a file using the &gt; command-line modifier.\u00a0<\/p>\n<pre>\nlsusb &gt; ~\/my-usb-devices.txt\n<\/pre>\n<p>At any time, you can view the \u201cmy-usb-devices.txt\u201d file in the terminal with the\u00a0<strong>cat<\/strong> command below.<\/p>\n<pre>\ncat ~\/my-usb-devices.txt\n<\/pre>\n<p>Or, open up the text file in your home folder using your favorite text editor.<\/p>\n<h2>Ubuntu list USB devices \u2013 Dmesg<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400897 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-list-usb-devices.png\" alt=\"\" width=\"1200\" height=\"880\"\/><\/p>\n<p>Another way to view USB devices on Ubuntu is with the\u00a0<strong>dmesg<\/strong> command. The\u00a0<strong>dmesg\u00a0<\/strong>tool is used primarily to view kernel logs on your system. As USB devices interact with your Ubuntu system, they\u2019re talking to the Ubuntu Linux kernel, which means their information is in these logs.<\/p>\n<p>To use\u00a0<strong>dmesg<\/strong>, you must first open up a terminal window. To do this, press\u00a0<strong>Ctrl + Alt + T\u00a0\u00a0<\/strong>on the Ubuntu desktop. Alternatively, search for \u201cTerminal\u201d in the app menu and launch it that way.<\/p>\n<p>When the terminal window is open and ready to use, enter the\u00a0<strong>dmesg\u00a0<\/strong>command below with\u00a0<strong>sudo\u00a0<\/strong>privileges. Sadly, the Ubuntu Linux kernel logs cannot be viewed without root access, as <strong>dmesg\u00a0<\/strong>interacts with system-level stuff.<\/p>\n<pre>\nsudo dmesg | grep usb\n<\/pre>\n<p>You\u2019ll see an output of all USB-related information that has interacted with the Ubuntu kernel by entering this command. From here, use the output to find information on your USB devices.<\/p>\n<p>Want to save the\u00a0<strong>dmesg\u00a0<\/strong>output to a text file for later reading, or to view it better in your favorite GUI text editor? Using the command below, redirect the output to a text file.<\/p>\n<pre>\nsudo dmesg | grep usb &gt; ~\/dmesg-usb-info.txt\n<\/pre>\n<p>With it redirected, you can view the text file using the\u00a0<strong>cat\u00a0<\/strong>command below. Or by opening up \u201cdmesg-usb-info.txt\u201d in your favorite text editor.<\/p>\n<pre>\ncat ~\/dmesg-usb-info.txt\n<\/pre>\n<h2>Ubuntu list USB devices \u2013 Usb-devices<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-400904 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-list-usb-devices-3.png\" alt=\"\" width=\"1200\" height=\"750\"\/><\/p>\n<p>A third way you can view USB device information on the Ubuntu desktop is with the\u00a0<strong>usb-devices\u00a0<\/strong>command. It is similar to the\u00a0<strong>lsusb\u00a0<\/strong>tool. However, it is a bit more intricate and provides a lot more information in a much more organized way.<\/p>\n<p>To start, you must have a terminal window open up on the Ubuntu desktop. To open up a terminal window on the desktop, press\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong>on the keyboard. Or, search for \u201cTerminal\u201d in the app menu and launch it.<\/p>\n<p>With the terminal window open and ready to go, execute the\u00a0<strong>usb-devices\u00a0<\/strong>command. The output is long and prints out in detail, every single USB device connected to Ubuntu in a vertical list.<\/p>\n<p>In this list, you\u2019ll see several columns. T, D, P, S, S, S, C, and I. Each of these letters has tons of information about your devices. For example, to find out the vendor info of a connected USB, go to \u201cP\u201d and read the vendor and product info, etc.<\/p>\n<p>To save the output of the\u00a0<strong>usb-devices\u00a0<\/strong>command to your Ubuntu system for later reading, or to access via your favorite GUI text editor, you can pipe the output using\u00a0<strong>&gt;<\/strong>.\u00a0<\/p>\n<pre>\nusb-devices &gt; ~\/my-usb-devices-output.txt\n<\/pre>\n<p>At any time, if you want to view the \u201cmy-usb-devices-output.txt\u201d file on your computer, execute the\u00a0<strong>cat\u00a0<\/strong>command below. Alternatively, double-click on \u201cmy-usb-devices-output.txt\u201d in the Ubuntu file manager to view it in your favorite text editor.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles On Ubuntu, you may (for one reason or another) wish to view information about all USB devices connected to the system. Unfortunately, Ubuntu doesn\u2019t come with an official GUI USB tool that users can use to view this information efficiently. Thankfully, there are many command-line utilities that users can take advantage of to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1581,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1580"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1580"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1580\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1581"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}