Listing USB from terminal

How to List USB Devices on macOS Using Terminal

If you’ve ever plugged in a USB device on your Mac and wondered how to see what’s connected behind the scenes, you’re not alone. Whether you’re troubleshooting, verifying hardware, or just curious, macOS gives you several powerful command-line tools to list USB devices directly from the Terminal.

🔌 The Essential Commands

Here are the most useful commands you can run:

  • Detailed USB Report
    system_profiler SPUSBDataType

    This command provides a full breakdown of all connected USB devices, including vendor IDs, product IDs, and device details.

  • Low-Level USB View
    ioreg -p IOUSB -l -w 0

    For those who want a deeper, technical look, this command queries the I/O Registry and shows verbose information about each USB device.

  • Mounted Disks (Including USB Storage)
    diskutil list

    While not USB-specific, this command lists all mounted disks, which is handy for identifying USB drives.

⚡ Quick Filtering Tip

If you want a cleaner output that highlights just the device names, you can pipe the results through grep. For example:

system_profiler SPUSBDataType | grep "Product ID"

This way, you’ll get a concise list without all the extra details.

🎯 Why This Matters

Knowing how to list USB devices is especially useful for:

  • Debugging hardware connections
  • Checking if external drives are recognized
  • Verifying device IDs for development or automation
  • Keeping your system behavior explicit and clutter-free

✅ Final Thoughts

macOS hides a lot of useful information under the hood, but with a few Terminal commands, you can make your USB connections completely transparent. Next time you plug in a flash drive, hub, or peripheral, try these commands and see exactly what your Mac sees.

Comments

Popular posts from this blog

Chatbot conversation

What “create .env.local (do not commit)” really means

Chatbot session