Get Targeted Hardware Reports with system_profiler
Print only the hardware section you need — serial number, battery, storage, network — as text or JSON.
Run `system_profiler SPHardwareDataType` for the machine summary, or add `-json` for scriptable output.
01Command
Command
$ system_profiler SPHardwareDataType02What it does
system_profiler is the engine behind System Information.app, and each DataType flag prints one section: SPHardwareDataType (model, serial, chip), SPPowerDataType (battery), SPStorageDataType, SPNetworkDataType, and dozens more. `system_profiler -listDataTypes` enumerates them all, and `-json` makes the output trivially parseable with jq. Full reports take seconds per section — always request specific types instead of running it bare.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- SYSTEM_PROFILER Command: Report macOS system hardware and software configurationEvidence: Documents system_profiler data types, -json output, and -detailLevel for targeted hardware reports.
Last verified: 2026-09-17 · Category: System & Settings