How to Use the macOS ioreg Command to View the Hardware Registry

Unlike Microsoft Windows, which relies on a centralized, user-editable \”Registry,\” macOS handles hardware tracking dynamically through the I/O Kit. The I/O Kit creates a live, hierarchical tree representing every single physical and virtual device currently connected to the Mac—from the internal CPU and logic board sensors to a plugged-in USB mouse. When administrators or developers need to interrogate this hardware tree directly to find vendor IDs, power states, or deeply hidden device properties, they use the macOS ioreg command.

Why Use the ioreg Command?

The standard graphical \”System Information\” app (or the command-line equivalent, system_profiler) provides a curated, high-level summary of your hardware. However, it filters out low-level engineering data. The ioreg (I/O Registry) command does not filter anything. It dumps the exact mathematical state of the hardware tree as the kernel sees it. This is essential for debugging failing USB controllers, verifying if a custom kernel extension (kext) successfully attached to a specific PCI device, or monitoring internal battery telemetry.

Step 1: View the Entire I/O Registry Tree

Because the registry is massive, running the base command without flags will overwhelm your terminal.

  1. Open the macOS Terminal.
  2. To view the raw tree, run the basic command, but pipe it into less so you can scroll through it manually:
ioreg | less

Use the arrow keys to scroll up and down. You will see a heavily indented structure. The indentation represents the physical connection hierarchy. For example, a USB mouse will be indented underneath a USB hub, which is indented underneath a USB controller, which is indented underneath the main PCI bus. Press q to exit the viewer.

Step 2: List Only Device Classes

To cut through the noise, you can filter the output to show only specific types of hardware (classes).

  1. To see only the USB devices currently attached to the system, use the -c (class) flag:
ioreg -c IOUSBDevice

This filters out the CPU, graphics, and storage controllers, displaying only the tree branches relevant to USB.

Step 3: Extract Detailed Device Properties

The standard tree only shows device names. To see the actual data (voltages, vendor IDs, serial numbers) associated with a device, you must view its properties.

  1. Add the -l (long) flag to dump the property dictionary for every device:
ioreg -l -c AppleSmartBattery

This specific command isolates the Mac’s internal battery. The output will list exact mathematical properties such as \"CurrentCapacity\", \"DesignCapacity\", and \"CycleCount\", providing raw telemetry often hidden by the graphical UI.

Step 4: Search for a Specific Keyword

If you do not know the exact \”Class\” of a device but know its name (e.g., \”Bluetooth\”), you can search the registry by name.

  1. Use the -n (name) flag:
ioreg -l -n \"Bluetooth\"

This will dump the property dictionary only for devices whose registry name matches \”Bluetooth\”, allowing you to quickly isolate the exact hardware component you are trying to debug.

By mastering the ioreg command, macOS administrators gain direct, unfiltered access to the hardware layer, enabling advanced diagnostics and system auditing.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.