Lsusb command

Author: m | 2025-04-24

★★★★☆ (4.9 / 3427 reviews)

dragon naturally speaking profesional

What is the lsusb command and its purpose? The lsusb command is a command-line tool to show connected USB devices. Which package provides the lsusb command? The command lsusb is provided by the usbutils package. Relevant articles using the lsusb command. The following articles include an example on how to use lsusb and might be worth further

download fnf

lsusb command in Linux/Unix, Uses of lsusb command with

On Ubuntu, you may (for one reason or another) wish to view information about all USB devices connected to the system. Unfortunately, Ubuntu doesn’t 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 view USB device information. In this guide, we’ll go over each of these tools, how they work, and how to use them.The number one way an Ubuntu user can view all connected USB devices is with the lsusb command. This command literally means “list USB,” and it does exactly that — it lists all of your USB devices, their IDs, names, etc.To get started, open up a terminal window on the Ubuntu desktop. To open up a terminal window on Ubuntu, press Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu and launch it that way.With the terminal window open and ready to use, execute the lsusb command in the terminal window. Once you enter it, it will print out detailed information about the USB devices connected to the system.lsusbIn the lsusb output, you’ll see “Bus,” followed by numbers, “Device,” more numbers, “ID,” some hex code (that’s your device’s ID code), and the name of the device. To locate any USB device, find the name at the end.If you’d 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 > command-line modifier. lsusb > ~/my-usb-devices.txtAt any time, you can view the “my-usb-devices.txt” file in the terminal with the cat command below.cat ~/my-usb-devices.txtOr, open up the text file in your home folder using your favorite text editor.Ubuntu list USB devices – DmesgAnother way O o /---o /---/---oo---/ \---\---o o \---o oCymeList system USB buses and devices. A modern cross-platform lsusb that attempts to maintain compatibility with, but also add new features. Profiles system USB buses and the devices on those buses, including full device descriptors.As a developer of embedded devices, I use a USB list tool on a frequent basis and developed this to cater to what I believe are the short comings of lsusb: verbose dump is mostly too verbose, tree doesn't contain useful data on the whole, it barely works on non-Linux platforms and modern terminals support features that make glancing through the data easier.The project started as a quick replacement for the barely working lsusb script and a Rust project to keep me up to date! Like most fun projects, it quickly experienced feature creep as I developed it into a cross-platform replacement for lsusb. It started as a macOS system_profiler parser, evolved to include a 'libusb' based profiler for reading full device descriptors and now defaults to a pure Rust profiler using nusb.It's not perfect as it started out as a Rust refresher but I had a lot of fun developing it and hope others will find it useful and can contribute. Reading around the lsusb source code, USB-IF and general USB information was also a good knowledge builder.The name comes from the technical term for the type of blossom on a Apple tree: cyme - it is Apple related and also looks like a USB device tree 😃🌸.FeaturesCompatible with lsusb using --lsusb argument. Supports all arguments including --verbose output - fully parsed device descriptors! Output is identical for use with no args (list), tree (excluding drivers on non-Linux) and should match for verbose (perhaps formatting differences).Default build is a native Rust profiler using nusb.Filters like lsusb but that also work when printing --tree. Adds --filter-name, --filter-serial, --filter-class and option to hide empty --hide-buses/--hide-hubs.Improved --tree mode; shows device, configurations, interfaces and endpoints as tree depending on level of --verbose.Controllable display --blocks for device, bus --bus-blocks, configurations --config-blocks, interfaces --interface-blocks and endpoints --endpoint-blocks. Use --more to see more by default.Modern terminal features with coloured output, utf-8 characters and icon look-up based device data. Can be turned off and customised. See --encoding (glyphs [default], utf8 and ascii), which can keep icons/tree within a certain encoding, --color (auto [default], always and never) and --icon (auto [default], always and never). Auto --icon will

lsusb command in Linux/Unix, Uses of lsusb command with examples

Libusb-1.0-0-dev or one's package manager of choice.Was the default feature before 2.0.0 for gathering verbose information. It is the profiler used by lsusb but there should be no difference in output between the two, since cyme uses control messages to gather the same information. If one wishes to use 'libusb', use --no-default-features and --feature=libusb or --feature=ffi for udevlib too.Note'libusb' does not profile buses on non-Linux systems (since it relies on root_hubs). On these platforms, cyme will generate generic bus information.macOS system_profilerUses the macOS system_profiler SPUSBDataType command to profile devices.Was the default feature before 2.0.0 for macOS systems to provide the base information; 'libusb' was used to open devices for verbose information. It is not used anymore if using the default native profiler but can be forced with --system-profiler - the native profiler uses the same IOKit backend but is much faster as it is not deserializing JSON. It also always captures bus numbers where system_profiler does not.TipIf wishing to use only macOS system_profiler and not obtain more verbose information, remove default features with cargo install --no-default-features cyme. There is not much to be gained by this considering that the default native profiler uses the same IOKit as a backend, can open devices to read descriptors (verbose mode) and is much faster.UsageUse cyme --help for basic usage or man ./doc/cyme.1. There are also autocompletions in './doc'.ExamplesTree tree.json# Then import the JSON file to view the system USB tree as it was when exported. All cyme args can be used with this static import as if it was profiled data.cyme --from-json tree.json"># List all USB devices and buses in a tree format with default display blockscyme --tree# As above but with configurations toocyme --tree --verbose# And with interfaces and endpoints - each verbose level goes futher down the USB descriptor tree. Using short arg here.cyme --tree -vvv# List all USB devices and buses in a tree format with more display blocks, all verbose levels and headings to show what is being displayedcyme --tree --more --headings# Export the tree to a JSON file - --json works with all optionscyme --tree --verbose --json > tree.json# Then import the JSON file to view the system USB tree as it was when exported. All cyme args can be used with this static import as if it was profiled data.cyme --from-json tree.jsonlsusb# List all USB devices and buses like 'lsusb'cyme --lsusb# lsusb verbose device dump including all. What is the lsusb command and its purpose? The lsusb command is a command-line tool to show connected USB devices. Which package provides the lsusb command? The command lsusb is provided by the usbutils package. Relevant articles using the lsusb command. The following articles include an example on how to use lsusb and might be worth further

Master the Linux ‘lsusb’ Command: A

A guide on how to setup fonts on macOS and Android.To check if the font you are using is setup correctly, try running the following snippet in a shell and see if that prints a folder icon. If it prints a box, or question mark or something else, then you might have some issues in how you setup the font or how your terminal emulator renders the font.If one does not want icons, provide a config file with custom blocks not including the any 'icon*' blocks - see the example config. Alternatively, to only use standard UTF-8 characters supported by all fonts (no private use area) pass --encoding utf8 and --icon auto (default). The --icon auto will drop the icon blocks if the characters matched are not supported by the --encoding.For no icons at all, use the hidden --no-icons or --icon never args.Known Issuessudo is required to open and read Linux root_hub string descriptors and potentially all devices if the user does not have permissions. The program works fine without these however, as will use sysfs/hwdb/'usb-ids' like lsusb. Use debugging -z to see what devices failed to read. The env CYME_PRINT_NON_CRITICAL_PROFILER_STDERR can be used to print these to stderr. --lsusb --verbose will print a message to stderr always to match the 'lsusb' behaviour.Users cannot open special non-user devices on Apple buses (VHCI); T2 chip for example. These will still be listed with 'native' and system_profiler but not --force-libusb. They will not print verbose information however and log an error if --verbose is used/print if --lsusb. Different utility with the same name.Macports users: sudo port install usbutilsIO Registryioreg -l -r -c IOUSBHostDeviceThis command lists all the Mac OS IO Registry information under all USB devices. Unlike lsusb, ioreg tells how Mac OS recognized USB devices and interfaces, and how it matched drivers to these interfaces. The -r -c IOUSBHostDevice limits the output to USB devices; to get complete OS registry, please run ioreg -l.OS LoggingThe LOG(....) statements, sprinkled throughout the HoRNDIS code, call the IOLog functions. On Mac OS El Capitan (10.11) and earlier, the log messages go into /var/log/system.log. Starting from Sierra (10.12), these messages are no longer written to system.log and instead can be viewed via:GUI, using Console application, located in Utilities folder. You need to enter process:kernel in the search box in order to filter the relevant messages.Command Line, using the log command. For example:log show --predicate process=="kernel" --start "2018-12-11 22:54:00"The start value needs to be several minutes in the past, so it would not flood the console. Here is a convenient command that prints the messages from the past 3 mintes:log show --predicate process=="kernel" --start "$(date -v-3M +'%F %T')"I've observed that Mac OS logging is unreliable (especially in Sierra). In some cases, the messages may come out garbled (looking like bad multi-threaded code). In other cases, either GUI or Command Line may be missing messages that were emitted. Sometimes, reloading the driver may fix the problem.

24.5.2. Using the lsusb Command

Only show icons if all icons to be shown are supported by the --encoding.Can be used as a library too with system profiler module, USB descriptor modules and display module for printing amongst others.--json output that honours filters and --tree.--headers to show meta data only when asked and not take space otherwise.--mask-serials to either '*' or randomise serial string for sharing dumps with sensitive serial numbers.Auto-scaling to terminal width. Variable length strings such as descriptors will be truncated with a '...' to indicate this. Can be disabled with config option 'no-auto-width' and a fixed max defined with 'max-variable-string-len'.Targets for Linux, macOS and Windows.DemoInstallRequirementsFor pre-compiled binaries, see the releases. Pre-compiled builds use native profiling backends and should require no extra dependencies.From crates.io with a Rust tool-chain installed: cargo install cyme --git (from GitHub as crates.io pinned at the moment). To do it from within a local clone: cargo install --path ..Package ManagersHomebrew 'cyme' which will also install a man page, completions and the 'libusb' dependency:Arch Linux official packageDebian packages as part of release - need a Debian maintainer for this.More package managers to come/package distribution, please feel free to create a PR if you want to help out here.Alias lsusbIf one wishes to create a macOS version of lsusb or just use this instead, create an alias one's environment with the --lsusb compatibility flag:alias lsusb='cyme --lsusb'Linux udev InformationNoteOnly supported on Linux targets.To obtain device and interface drivers being used on Linux like lsusb, one can use the --features udev feature when building - it's a default feature. The feature uses the Rust crate udevrs to obtain the information. To use the C FFI libudev library, use --no-default-features --features udevlib which will use the 'libudev' crate. Note that this will require 'libudev-dev' to be installed on the host machine.To lookup USB IDs from the udev hwdb as well (like lsusb) use --features udev_hwdb. Without hwdb, cyme will use the 'usb-ids' crate, which is the same source as the hwdb binary data but the bundled hwdb may differ due to customisations or last update ('usb-ids' will be most up to date).Profilers and Feature FlagsNativeUses native Rust nusb and udevrs for profiling devices: sysfs (Linux), IOKit (macOS) and WinUSB.It is the default profiler as of 2.0.0. Use --feature=native ('nusb' and 'udevrs' on Linux) or --feature=nusb to manually specify.LibusbUses 'libusb' for profiling devices. Requires libusb 1.0.0 to be installed: brew install libusb, sudo apt install

lsusb, is this command exist - LinuxQuestions.org

To view USB devices on Ubuntu is with the dmesg command. The dmesg tool is used primarily to view kernel logs on your system. As USB devices interact with your Ubuntu system, they’re talking to the Ubuntu Linux kernel, which means their information is in these logs.To use dmesg, you must first open up a terminal window. To do this, press Ctrl + Alt + T on the Ubuntu desktop. Alternatively, search for “Terminal” in the app menu and launch it that way.When the terminal window is open and ready to use, enter the dmesg command below with sudo privileges. Sadly, the Ubuntu Linux kernel logs cannot be viewed without root access, as dmesg interacts with system-level stuff.sudo dmesg | grep usbYou’ll 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.Want to save the dmesg 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.sudo dmesg | grep usb > ~/dmesg-usb-info.txtWith it redirected, you can view the text file using the cat command below. Or by opening up “dmesg-usb-info.txt” in your favorite text editor.cat ~/dmesg-usb-info.txtUbuntu list USB devices – Usb-devicesA third way you can view USB device information on the Ubuntu desktop is with the usb-devices command. It is similar to the lsusb tool. However, it is a bit more intricate and provides a lot more information in a much more organized way.To start, you must have a terminal window open up on the Ubuntu desktop. To open up a terminal window on the desktop, press Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in. What is the lsusb command and its purpose? The lsusb command is a command-line tool to show connected USB devices. Which package provides the lsusb command? The command lsusb is provided by the usbutils package. Relevant articles using the lsusb command. The following articles include an example on how to use lsusb and might be worth further

Lsusb Command for Windows - YouTube

Uclogic-tools is a collection of programs for collecting and analyzingdiagnostic information from UC-Logic graphics tablets (rebranded as Huion,Yiynova, Ugee, Monoprice, Turcom and others).InstallationDownload one of the release packages from the releasespage.Use your Linux distribution tools to install either .rpm or .deb packages.To build uclogic-tools from the source code, you will need the libusbdevelopment package installed. It is usually named libusb-1.0-0-dev orlibusbx-devel.If you're using a release tarball, you can build uclogic-tools by executingthis command in the unpacked source code directory:If you're building a development version downloaded with Git or via GitHub's"Download ZIP" link, you will also need autoconf and automake installed onall distros, as well as pkg-config on Debian-based systems. After that youshould be able to build uclogic-tools by executing the following in the sourcecode directory:autoreconf -i -f && ./configure && makeAfter building uclogic-tools from the source code, you can run the compiledprograms directly, or install them with this command, from the same directory:UsageUclogic-tools contains two utilities: uclogic-probe and uclogic-decode.Uclogic-probe dumps diagnostics information from UC-Logic (and rebranded)graphics tablets and attempts to enable additional functionality.Uclogic-decode attempts to extract tablet parameters from the informationdumped by uclogic-probe.Note that the additional functions might be incompatible with the tabletdriver you're currently using and the tablet might stop working properly afteryou execute uclogic-probe. To fix that simply reconnect the tablet.Uclogic-probe accepts two arguments: bus number and device address. You canfind them in lsusb output by looking for a device with vendor ID 256c andproduct ID 006e.For example, in this lsusb output:Bus 001 Device 003: ID 256c:006e Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubBus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubBus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubBus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubThe first line corresponds to a Huion tablet, and so its bus number is 1,device address is 3 and you probe it like this:The output will be something like this:M 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00P 31 00 30 00 35 00 39 00 34 00 00 00 00 00 00 00 00 00 00 00S 64 0E 03 40 9C A8 61 03 00 FF 07 A0 0F 08 00S 65 04 03 20 A0S 6E 04 03 00 30S 79 14 03 48 00 41 00 36 00 30 00 2D 00 46 00 34 00 30 00 30 00S 7A 08 03 01 08 00 00 00 00S 7B 0C 03 48 00 4B 00 20 00 4F 00 6E 00The above is what a driver developer would need when asking about auclogic-probe output.Uclogic-decode simply expects uclogic-probe output on its input. E.g. ifyou saved the output of uclogic-probe into a file named "probe.txt", thenthis command would decode it:uclogic-decode You can pipe uclogic-probe output directly to uclogic-decode too:sudo uclogic-probe 1 3 | uclogic-decodeFor the diagnostics dump above either of

Comments

User6061

On Ubuntu, you may (for one reason or another) wish to view information about all USB devices connected to the system. Unfortunately, Ubuntu doesn’t 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 view USB device information. In this guide, we’ll go over each of these tools, how they work, and how to use them.The number one way an Ubuntu user can view all connected USB devices is with the lsusb command. This command literally means “list USB,” and it does exactly that — it lists all of your USB devices, their IDs, names, etc.To get started, open up a terminal window on the Ubuntu desktop. To open up a terminal window on Ubuntu, press Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu and launch it that way.With the terminal window open and ready to use, execute the lsusb command in the terminal window. Once you enter it, it will print out detailed information about the USB devices connected to the system.lsusbIn the lsusb output, you’ll see “Bus,” followed by numbers, “Device,” more numbers, “ID,” some hex code (that’s your device’s ID code), and the name of the device. To locate any USB device, find the name at the end.If you’d 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 > command-line modifier. lsusb > ~/my-usb-devices.txtAt any time, you can view the “my-usb-devices.txt” file in the terminal with the cat command below.cat ~/my-usb-devices.txtOr, open up the text file in your home folder using your favorite text editor.Ubuntu list USB devices – DmesgAnother way

2025-04-16
User4743

O o /---o /---/---oo---/ \---\---o o \---o oCymeList system USB buses and devices. A modern cross-platform lsusb that attempts to maintain compatibility with, but also add new features. Profiles system USB buses and the devices on those buses, including full device descriptors.As a developer of embedded devices, I use a USB list tool on a frequent basis and developed this to cater to what I believe are the short comings of lsusb: verbose dump is mostly too verbose, tree doesn't contain useful data on the whole, it barely works on non-Linux platforms and modern terminals support features that make glancing through the data easier.The project started as a quick replacement for the barely working lsusb script and a Rust project to keep me up to date! Like most fun projects, it quickly experienced feature creep as I developed it into a cross-platform replacement for lsusb. It started as a macOS system_profiler parser, evolved to include a 'libusb' based profiler for reading full device descriptors and now defaults to a pure Rust profiler using nusb.It's not perfect as it started out as a Rust refresher but I had a lot of fun developing it and hope others will find it useful and can contribute. Reading around the lsusb source code, USB-IF and general USB information was also a good knowledge builder.The name comes from the technical term for the type of blossom on a Apple tree: cyme - it is Apple related and also looks like a USB device tree 😃🌸.FeaturesCompatible with lsusb using --lsusb argument. Supports all arguments including --verbose output - fully parsed device descriptors! Output is identical for use with no args (list), tree (excluding drivers on non-Linux) and should match for verbose (perhaps formatting differences).Default build is a native Rust profiler using nusb.Filters like lsusb but that also work when printing --tree. Adds --filter-name, --filter-serial, --filter-class and option to hide empty --hide-buses/--hide-hubs.Improved --tree mode; shows device, configurations, interfaces and endpoints as tree depending on level of --verbose.Controllable display --blocks for device, bus --bus-blocks, configurations --config-blocks, interfaces --interface-blocks and endpoints --endpoint-blocks. Use --more to see more by default.Modern terminal features with coloured output, utf-8 characters and icon look-up based device data. Can be turned off and customised. See --encoding (glyphs [default], utf8 and ascii), which can keep icons/tree within a certain encoding, --color (auto [default], always and never) and --icon (auto [default], always and never). Auto --icon will

2025-04-23
User5095

Libusb-1.0-0-dev or one's package manager of choice.Was the default feature before 2.0.0 for gathering verbose information. It is the profiler used by lsusb but there should be no difference in output between the two, since cyme uses control messages to gather the same information. If one wishes to use 'libusb', use --no-default-features and --feature=libusb or --feature=ffi for udevlib too.Note'libusb' does not profile buses on non-Linux systems (since it relies on root_hubs). On these platforms, cyme will generate generic bus information.macOS system_profilerUses the macOS system_profiler SPUSBDataType command to profile devices.Was the default feature before 2.0.0 for macOS systems to provide the base information; 'libusb' was used to open devices for verbose information. It is not used anymore if using the default native profiler but can be forced with --system-profiler - the native profiler uses the same IOKit backend but is much faster as it is not deserializing JSON. It also always captures bus numbers where system_profiler does not.TipIf wishing to use only macOS system_profiler and not obtain more verbose information, remove default features with cargo install --no-default-features cyme. There is not much to be gained by this considering that the default native profiler uses the same IOKit as a backend, can open devices to read descriptors (verbose mode) and is much faster.UsageUse cyme --help for basic usage or man ./doc/cyme.1. There are also autocompletions in './doc'.ExamplesTree tree.json# Then import the JSON file to view the system USB tree as it was when exported. All cyme args can be used with this static import as if it was profiled data.cyme --from-json tree.json"># List all USB devices and buses in a tree format with default display blockscyme --tree# As above but with configurations toocyme --tree --verbose# And with interfaces and endpoints - each verbose level goes futher down the USB descriptor tree. Using short arg here.cyme --tree -vvv# List all USB devices and buses in a tree format with more display blocks, all verbose levels and headings to show what is being displayedcyme --tree --more --headings# Export the tree to a JSON file - --json works with all optionscyme --tree --verbose --json > tree.json# Then import the JSON file to view the system USB tree as it was when exported. All cyme args can be used with this static import as if it was profiled data.cyme --from-json tree.jsonlsusb# List all USB devices and buses like 'lsusb'cyme --lsusb# lsusb verbose device dump including all

2025-04-16
User5959

A guide on how to setup fonts on macOS and Android.To check if the font you are using is setup correctly, try running the following snippet in a shell and see if that prints a folder icon. If it prints a box, or question mark or something else, then you might have some issues in how you setup the font or how your terminal emulator renders the font.If one does not want icons, provide a config file with custom blocks not including the any 'icon*' blocks - see the example config. Alternatively, to only use standard UTF-8 characters supported by all fonts (no private use area) pass --encoding utf8 and --icon auto (default). The --icon auto will drop the icon blocks if the characters matched are not supported by the --encoding.For no icons at all, use the hidden --no-icons or --icon never args.Known Issuessudo is required to open and read Linux root_hub string descriptors and potentially all devices if the user does not have permissions. The program works fine without these however, as will use sysfs/hwdb/'usb-ids' like lsusb. Use debugging -z to see what devices failed to read. The env CYME_PRINT_NON_CRITICAL_PROFILER_STDERR can be used to print these to stderr. --lsusb --verbose will print a message to stderr always to match the 'lsusb' behaviour.Users cannot open special non-user devices on Apple buses (VHCI); T2 chip for example. These will still be listed with 'native' and system_profiler but not --force-libusb. They will not print verbose information however and log an error if --verbose is used/print if --lsusb.

2025-04-08

Add Comment