macOS pmset Commands: Complete Guide to Power Management in Terminal

What Are pmset Commands?

macos pmset commands let you control your Mac’s power settings from the Terminal. You can check battery health, adjust sleep timers, and prevent wake events. These commands also allow you to schedule automatic startups. When your macbook pro battery draining fast after update, using macos pmset commands gives you fine‑grained control that System Settings does not offer.

For basic battery drain fixes, start with our pillar post. Intel Mac owners should also check our Intel Mac SMC reset guide for battery issues. This guide is designed for users who are comfortable with Terminal.


How to Open Terminal and Run pmset Commands

First, open Terminal from Applications > Utilities. Then type pmset followed by options. Read‑only commands (like checking battery status) do not need sudo. However, commands that change settings require sudo and your admin password.

Check all current power settings:
pmset -g

See what is preventing sleep (useful for battery drain diagnosis):
pmset -g assertions

View scheduled wake events:
pmset -g sched

These macos pmset commands give you a snapshot of your Mac’s power behavior. For more Terminal tricks, see our MacBook battery terminal commands (cluster post #18).


View Battery Info Using pmset Commands

You can check your battery percentage, state (charging or discharging), and health using macos pmset commands. This method is faster than opening System Settings. Additionally, it works even when the GUI is unresponsive.

Check battery status:
pmset -g batt

Output example:

text

Now drawing from 'AC Power'
 -InternalBattery-0 (id=1234567)  85% charged  (charging)

Check battery cycle count (using system_profiler):
system_profiler SPPowerDataType | grep "Cycle Count"

For a deeper explanation of cycle counts, see our MacBook battery cycle count guide. If your battery needs replacement, read our when to replace MacBook battery.


Control Sleep Behavior with pmset Commands

You can adjust how long your Mac waits before sleeping. These macos pmset commands separate battery and power adapter settings. Consequently, you can have different behaviors when plugged in versus on the go.

Set display sleep delay (on battery):
sudo pmset -b displaysleep 10 (10 minutes)

Set computer sleep delay (on battery):
sudo pmset -b sleep 20 (20 minutes)

Set display sleep delay (on power adapter):
sudo pmset -c displaysleep 30 (30 minutes)

Set computer sleep delay (on power adapter):
sudo pmset -c sleep 60 (60 minutes)

Prevent sleep temporarily:
caffeinate (press Ctrl+C to stop)

For more on sleep settings, see our macOS battery settings guide and Mac sleep settings guide.


Manage Wake on Network Access via pmset Commands

Wake on network access allows your Mac to wake for file sharing or AirDrop. Disabling it can save battery. Use these macos pmset commands to check and change this setting.

Check current status:
pmset -g | grep womp

Disable wake on network access (on battery):
sudo pmset -b womp 0

Disable wake on network access (on power adapter):
sudo pmset -c womp 0

For most users, turning this off reduces unexpected battery drain. See Fix 9 in our pillar post for more details.


Reset Power Settings Using pmset Commands

After a macOS update, corrupted power preferences can cause your battery to drain fast. Resetting them with macos pmset commands often helps. Therefore, try this before more drastic steps.

Reset all power settings to factory defaults:
sudo pmset -a restoredefaults

Run this command, then restart your Mac. This is a good step after an SMC reset (for Intel Macs) and before reinstalling macOS. For SMC instructions, see our Intel Mac SMC reset guide for battery issues. For NVRAM, see our Mac NVRAM reset for battery.


Schedule Wake or Shutdown with pmset Commands

You can schedule your Mac to wake, sleep, or shut down at specific times. This is useful for backups or updates. However, be careful not to schedule shutdowns during active work.

Schedule wake every weekday at 7:30 AM:
sudo pmset repeat wake MTWRF 07:30:00

Schedule sleep every night at 11 PM:
sudo pmset repeat sleep MTWRFSU 23:00:00

Cancel all scheduled events:
sudo pmset repeat cancel

Check current schedule:
pmset -g sched


Set Charge Limit Using pmset Commands

On macOS Tahoe 26.4 or later (Apple Silicon only), you can set a maximum charge limit using macos pmset commands. This helps extend battery lifespan. For example, keeping the battery at 80% when plugged in reduces chemical aging.

Set charge limit to 80%:
sudo pmset -a maxpercent 80

Remove charge limit (back to 100%):
sudo pmset -a maxpercent 100

Check current limit:
pmset -g | grep -i maxpercent

For a full guide, see our MacBook charge limit guide.


Enable Low Power Mode with pmset Commands

Low Power Mode reduces background activity and extends battery life. You can toggle it with macos pmset commands. This is especially useful on long trips or when you forget a charger.

Enable Low Power Mode on battery:
sudo pmset -b lowpowermode 1

Disable Low Power Mode on battery:
sudo pmset -b lowpowermode 0

Enable on power adapter (Apple Silicon only):
sudo pmset -c lowpowermode 1

For a complete explanation, see our macOS Low Power Mode explained.


pmset Commands Quick Reference Table

TaskCommand
Check battery percentagepmset -g batt
See what is preventing sleeppmset -g assertions
Disable wake on network accesssudo pmset -a womp 0
Reset all power settingssudo pmset -a restoredefaults
Set display sleep to 10 min on batterysudo pmset -b displaysleep 10
Set computer sleep to 60 min on adaptersudo pmset -c sleep 60
Schedule wake weekdays at 8 AMsudo pmset repeat wake MTWRF 08:00:00
Cancel all scheduled eventssudo pmset repeat cancel
Enable Low Power Mode on batterysudo pmset -b lowpowermode 1
Set charge limit to 80% (macOS 26.4+)sudo pmset -a maxpercent 80
Prevent sleep temporarilycaffeinate

For more Terminal commands related to battery, see our MacBook battery terminal commands (cluster post #18).


Frequently Asked Questions

Q: Do all pmset commands need sudo?
No. Commands that only display information (like pmset -g batt) do not need sudo. Commands that change settings do need sudo.

Q: Will resetting power settings erase my battery cycle count?
No. Cycle count is stored on the battery hardware. Resetting pmset only changes power preferences.

Q: Why does pmset -g show different values than System Settings?
pmset shows the live underlying settings. System Settings may simplify them. Trust pmset for precise control.

Q: I have an Intel Mac. Does pmset control SMC?
No. pmset controls software power settings. SMC is hardware. For SMC resets, see our Intel Mac SMC reset guide for battery issues.

Q: Can pmset fix a battery that is not charging?
Sometimes. Run sudo pmset -a restoredefaults, then restart. If that fails, try an SMC reset. For persistent issues, see when to replace MacBook battery.

Q: What is the difference between pmset and caffeinate?
pmset changes permanent power settings. caffeinate temporarily prevents sleep for a single Terminal session.

Leave a Reply

Your email address will not be published. Required fields are marked *