
You can check many details about your Mac’s hardware directly in Terminal, including the model identifier, serial number, chip, memory, storage devices, displays, batteries, and connected USB or Thunderbolt devices. Terminal is especially useful when you need information in a copyable text format or want to inspect a specific hardware category.
Quick Answer
- Open Terminal from Applications > Utilities.
- For a broad hardware summary, run:
system_profiler SPHardwareDataType
- For storage details, run:
system_profiler SPStorageDataType
- For a compact Mac model and serial-number check, run:
sysctl -n hw.model
system_profiler SPHardwareDataType | grep -E 'Model Name|Model Identifier|Chip|Processor Name|Memory|Serial Number'
These commands only read information. They do not change settings, delete files, or require administrator access.
Open Terminal safely
Open Finder, select Applications in the sidebar, open Utilities, and then double-click Terminal. You can also press Command-Space, type Terminal, and press Return.
Terminal displays a command prompt. Type or paste commands after that prompt, then press Return. A command may produce several lines of output, and some commands may take a few seconds to finish.
The commands in this guide are information-only commands unless specifically noted. They do not modify your Mac’s hardware configuration.
View your Mac’s main hardware information
The system_profiler command reports information collected by macOS. SPHardwareDataType limits the report to the Mac’s primary hardware details.
system_profiler SPHardwareDataType
Typical fields can include:
- Model name
- Model identifier
- Chip or processor information
- Total memory
- System firmware version
- Serial number
- Hardware UUID
The exact fields depend on the Mac and the information macOS makes available. Do not assume that every Mac will display the same labels.
Understand the most useful fields
Model Name is the general product name, such as a MacBook Pro or Mac mini.
Model Identifier is a technical identifier used to distinguish hardware families. It is useful when a support document asks for a specific identifier.
Chip or Processor Name identifies the main processor. Macs with Apple silicon generally report a chip name, while other Macs may show processor information.
Memory is the installed system memory reported by macOS.
Serial Number uniquely identifies the Mac. Treat it as sensitive information when sharing Terminal output publicly.
Hardware UUID is another unique identifier used by macOS and some management or support tools. Avoid posting it online unless necessary.

Display only selected hardware fields
A complete hardware report may be longer than necessary. You can use a pipe (|) to send the output of one command to grep, which keeps only lines matching specific words.
The following command displays the model, processor or chip, memory, and serial-number lines when those labels are present:
system_profiler SPHardwareDataType | grep -E 'Model Name|Model Identifier|Chip|Processor Name|Memory|Serial Number'
This command only filters text that has already been reported. It does not alter the hardware report or system settings.
Because field names can differ between Macs, a line may be omitted if your Mac uses a different label. If you need the complete report, run system_profiler SPHardwareDataType without grep.
Check the model identifier separately
The sysctl command reads kernel-managed system information. The following option returns the hardware model identifier without displaying the rest of the report:
sysctl -n hw.model
The -n option suppresses the variable name and prints only its value. This is useful for copying the identifier into a support request or compatibility check.
Check the Mac’s serial number
To display only the serial number reported in the hardware profile, run:
system_profiler SPHardwareDataType | grep 'Serial Number'
Some macOS versions or hardware configurations may use a slightly different field label. If this command returns nothing, display the complete hardware section instead:
system_profiler SPHardwareDataType
A serial number is identifying information. Before sending Terminal output to another person, remove the serial number and any hardware UUID unless the recipient specifically needs them.
Check memory information
To display the installed memory information from the hardware profile, run:
system_profiler SPHardwareDataType | grep 'Memory'
For a more detailed memory report, use the memory data type:
system_profiler SPMemoryDataType
On some Macs, especially systems with unified memory, the report may not resemble the removable memory layout found in older Intel-based Macs. A shorter or different report does not necessarily indicate a problem.
To see memory pressure and current memory use rather than installed memory, use:
memory_pressure
This command reports the system’s current memory condition. It is different from SPMemoryDataType, which describes installed memory hardware.

Check storage devices and volumes
To list storage devices and volumes recognized by macOS, run:
system_profiler SPStorageDataType
This report can include the startup volume, other mounted volumes, capacity, available space, file-system information, and storage-device details. The exact output depends on your Mac’s disks, partitions, containers, and mounted volumes.
For a concise list of disks, partitions, and containers, run:
diskutil list
diskutil list is a read-only listing command. It does not erase, partition, mount, or unmount anything.
To inspect one specific disk after identifying it in the list, replace /dev/disk0 with the device identifier shown on your Mac:
diskutil info /dev/disk0
This reports information about that disk, such as its device name, size, partition map, connection type, and whether it is internal or external.
Do not guess a disk identifier when using other diskutil commands. Commands such as eraseDisk, partitionDisk, and some repair operations can change data or disk structure. They are outside the scope of this hardware-information guide.
Check battery information on a Mac notebook
To display battery details, run:
system_profiler SPPowerDataType
Depending on the Mac, the report may include battery condition, cycle count, full charge capacity, current charge, charging status, and power-source information.
To display only lines commonly associated with battery health, run:
system_profiler SPPowerDataType | grep -E 'Cycle Count|Condition|Maximum Capacity|Full Charge Capacity|State of Charge|Charging'
Field names vary by Mac and macOS version. If the filtered command omits useful information, use the complete SPPowerDataType report.
These commands do not change charging behavior or battery settings. They only read power information.
Check displays
To list connected displays and their reported properties, run:
system_profiler SPDisplaysDataType
The output may include the display name, resolution, connection type, vendor information, and graphics processor details. Built-in and external displays may appear in separate sections.
For a shorter display-and-resolution search, run:
system_profiler SPDisplaysDataType | grep -E 'Chipset Model|Graphics|Display Type|Resolution|Connection Type'
The available labels depend on the graphics hardware and display connection. Use the complete report if you need information that does not appear in the filtered result.
Check USB and Thunderbolt hardware
To inspect USB devices connected to the Mac, run:
system_profiler SPUSBDataType
This can help identify connected hubs, keyboards, storage devices, cameras, and other USB hardware.
For Thunderbolt and USB4-related connections, run:
system_profiler SPThunderboltDataType
The report may include connected docks, displays, storage devices, and other Thunderbolt hardware. If nothing is connected or recognized, the report may be short.
Both commands are read-only. They do not disconnect devices or change connection settings.

Save hardware information to a text file
If you need to share a report with support, save it to a file in your home folder. The following command writes the main hardware report to a file named mac-hardware.txt on your Desktop:
system_profiler SPHardwareDataType > ~/Desktop/mac-hardware.txt
The > symbol redirects the command’s output into the file. If a file with that exact name already exists, this command replaces its contents. It does not modify hardware, but check the filename before running it if you already have a report you want to keep.
To save a broader report containing several categories, use:
system_profiler SPHardwareDataType SPMemoryDataType SPStorageDataType SPPowerDataType SPDisplaysDataType SPUSBDataType > ~/Desktop/mac-hardware-report.txt
The report may contain identifying information, including a serial number, hardware UUID, device names, and volume names. Review and redact sensitive details before sharing it.
To remove a report you created on the Desktop, use Finder or run:
rm ~/Desktop/mac-hardware.txt
This permanently deletes that report without moving it to the Trash. Confirm the filename carefully before pressing Return. If you are unsure, delete the file through Finder instead.
Troubleshooting Terminal hardware commands
Terminal says “command not found”
The commands in this guide—system_profiler, sysctl, diskutil, and memory_pressure—are included with macOS. If Terminal reports that one is unavailable, check that the command was typed correctly and that no extra punctuation was included.
Do not paste the output into a command. Only enter the command itself.
A command returns no output
A filtered command using grep returns nothing when none of the requested labels appear. Run the unfiltered command to see the complete report:
system_profiler SPHardwareDataType
This also helps when a field uses a different label on your Mac.
The report is very long
Use a category-specific command instead of requesting all available system information. For example:
system_profiler SPDisplaysDataType
You can also filter a report with grep, but filtering may hide fields you need.
Storage information seems incomplete
system_profiler SPStorageDataType focuses on storage information recognized by macOS and may not present every device in the same way. Compare it with:
diskutil list
If an external disk does not appear in either report, check its cable, adapter, power supply, and connection. Avoid running erase or partition commands while diagnosing the connection.
You need a hardware fault diagnosis
Hardware-information commands identify components and report their current status, but they do not perform a full hardware test. If you suspect a hardware problem, you can also learn how to run Apple Diagnostics on a Mac.
Frequently Asked Questions
Is it safe to check Mac hardware in Terminal?
Yes. The commands in this guide read information and do not change your Mac. Be careful when copying commands that redirect output or delete files, and avoid unrelated diskutil commands that erase or modify disks.
Which Terminal command shows the Mac model?
Run:
system_profiler SPHardwareDataType
For only the technical model identifier, run:
sysctl -n hw.model
How do I find my Mac’s serial number in Terminal?
Run:
system_profiler SPHardwareDataType | grep 'Serial Number'
If no line appears, display the complete hardware report and look for the serial-number field.
How do I check RAM in Terminal?
For installed memory details, run:
system_profiler SPMemoryDataType
For current memory pressure, run:
memory_pressure
These commands answer different questions: installed memory versus current memory conditions.
Can Terminal show the Mac’s storage capacity?
Yes. Run:
system_profiler SPStorageDataType
For a device and partition list, run:
diskutil list
Can I share the hardware report with support?
You can, but review it first. Remove the serial number, hardware UUID, computer name, volume names, and other identifying information unless support specifically requests them.
Final Thoughts
Terminal provides a quick, repeatable way to check Mac hardware information. Start with system_profiler SPHardwareDataType for a general overview, then use category-specific commands for storage, memory, battery, displays, and connected devices. Because these commands are read-only, they are useful for everyday troubleshooting without changing your Mac’s configuration.