Skip to content

Check MacBook battery health from Terminal: three commands

Three Terminal commands for battery health on a Mac: capacity, condition and cycle count, live charge, and raw battery values.

4 min read

How do I check battery health in Terminal?

system_profiler SPPowerDataType | grep -E "Cycle Count|Condition|Maximum Capacity"

This gives the same Maximum Capacity and Condition as Settings, plus cycle count.

How do I see the live charge?

pmset -g batt

How do I see raw battery values?

ioreg -rn AppleSmartBattery | grep -E '"(CycleCount|Voltage|Amperage|IsCharging)" ='

ioreg battery fields explains each value.

Common questions

What command shows Mac battery cycle count?

system_profiler SPPowerDataType | grep "Cycle Count"

Can I see battery health without opening Settings?

Yes. system_profiler SPPowerDataType prints Maximum Capacity and Condition in Terminal.

Read next