A macOS equivalent to the Linux lsusb
command that displays USB devices in a formatted table with device names, product IDs, vendor IDs, vendor names, and connection speeds.
This script uses system_profiler
to gather USB device information and formats it in a clean, hierarchical table with color-coded speeds for easy identification. It provides a familiar lsusb
-like experience for macOS users who are accustomed to the Linux command.
- Color-coded speed indicators
- 🟢 Green: USB 3.x devices
- 🟡 Yellow: USB 2.0 devices
- 🔴 Red: USB 1.x devices
- Hierarchical device tree display with proper indentation
- Apple devices hidden by default (use
-A
flag to show them) - Graceful handling of missing device information
- Clean table formatting with proper alignment
- Clone this repository or download the
lsusb.sh
script - Make the script executable:
chmod +x lsusb.sh
- (Optional) Move to a directory in your PATH for system-wide access:
sudo mv lsusb.sh /usr/local/bin/lsusb
./lsusb.sh [-A]
-A
: Show Apple Inc. devices (hidden by default)
Show all non-Apple USB devices:
./lsusb.sh
Show all USB devices including Apple devices:
./lsusb.sh -A
- macOS (any recent version)
- Bash shell
system_profiler
command (included with macOS)
The script displays USB devices in a hierarchical table format with color-coded speeds:
--------------------------------------------------------------------------------------------------------------
Device | Prod ID | Vend ID | Vendor Name | Speed
--------------------------------------------------------------------------------------------------------------
USB2.1 Hub | 0x0610 | 0x05e3 | Genesys Logic, Inc. | Up to 480 Mb/s
USB2.0 Hub | 0x0608 | 0x05e3 | Genesys Logic, Inc. | Up to 480 Mb/s
USB 2.0 Hub | 0x2586 | 0x067b | Prolific Technology, Inc. | Up to 480 Mb/s
USB Receiver | 0xc531 | 0x046d | Logitech Inc. | Up to 12 Mb/s
USB 2.0 BILLBOARD | 0x0103 | 0x2109 | VIA Labs, Inc. | Up to 12 Mb/s
USB3.1 Hub | 0x0626 | 0x05e3 | Genesys Logic, Inc. | Up to 5 Gb/s
USB 10/100/1000 LAN | 0x8153 | 0x0bda | Realtek Semiconductor Corp. | Up to 5 Gb/s
GNU General Public License v3.0
Copyright (c) 2025 Rob Vella [email protected]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Feel free to submit issues and pull requests to improve this tool.
Rob Vella - [email protected]