How to Use the macOS system_profiler Command to Check Hardware Specs

If you are upgrading the RAM in an older Mac, verifying warranty coverage, or troubleshooting a specific driver issue, you need exact, highly detailed information about your Mac’s internal hardware. While you can click the Apple Logo and select “About This Mac,” the graphical interface only provides a surface-level overview (processor name, total memory, and macOS version).

To generate a comprehensive, forensic-level report of every single hardware component, bus, and peripheral connected to your machine, you must use the system_profiler command in the macOS Terminal.

In this guide, you will learn how to use this command to extract detailed hardware specifications.

The Basic system_profiler Command

The system_profiler command accesses the same underlying data as the System Information app, but formats it for the command line.

  1. Press Command + Space to open Spotlight Search.
  2. Type Terminal and press Return.
  3. Type the following command and press Return:
    system_profiler

If you run the command without any arguments, it will dump the absolute entirety of your system’s hardware and software configuration to the screen. Because this report is often tens of thousands of lines long, it is entirely unreadable in this format.

Use Case 1: Extracting Specific Data Types

To make the command useful, you must tell it to only output specific categories of information (called Data Types).

First, you need to know what Data Types are available. Run this command to list them:

system_profiler -listDataTypes

You will see a list of categories like SPAudioDataType, SPDisplaysDataType, and SPStorageDataType.

If you only want to see detailed information about your Mac’s battery health (cycle count, maximum capacity, and condition), run:

system_profiler SPPowerDataType

If you are troubleshooting a monitor that will not connect properly and need to see exactly what resolution and refresh rate the Mac thinks it is outputting, run:

system_profiler SPDisplaysDataType

Use Case 2: Generating a Text Report

System administrators often need to generate a complete hardware report for a fleet of Macs to inventory them or send the logs to Apple Support for diagnostics.

Instead of trying to read the massive output in the Terminal, you can redirect the output into a standard text file on your Desktop.

system_profiler > ~/Desktop/MacHardwareReport.txt

This command silently runs the profiler in the background and saves every line of text into a file named MacHardwareReport.txt on your desktop. You can then open this file in TextEdit, search it, or email it to IT support.

Use Case 3: Outputting to XML for Automation

If you are writing an automated script to audit Macs on a corporate network, standard text formatting is difficult to parse. You can instruct system_profiler to format its output as strict XML (an Apple plist file) using the -xml flag.

system_profiler -xml SPStorageDataType > ~/Desktop/StorageInfo.plist

This file can now be instantly parsed by Python scripts or mobile device management (MDM) software to automatically track hardware configurations across hundreds of machines.

Get the best tech tips delivered straight to your inbox.

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