How to Use the macOS ‘pmset’ Command to Customize Power Management and Sleep Behavior

The Limits of the System Settings App

Apple has significantly simplified the power management interface in macOS over the years. In modern versions like macOS Ventura and Sonoma, the “Displays” and “Energy Saver” panes in System Settings offer only a handful of basic toggles, such as “Prevent automatic sleeping when the display is off” and “Wake for network access.”

However, beneath that simple interface lies an incredibly complex power management architecture. Mac power users and IT administrators who need granular control over exactly when and how a Mac sleeps, hibernates, or manages battery life can bypass the GUI entirely using the native Terminal command: pmset (Power Management Settings).

Understanding the pmset Command

Because modifying power states affects the core hardware, most pmset commands require administrator privileges (using sudo).

macOS maintains three distinct power profiles. You must specify which profile you want to modify using a specific flag:

  • -c (Charger): Settings applied when the Mac is plugged into the wall.
  • -b (Battery): Settings applied when the Mac is running on battery power.
  • -u (UPS): Settings applied when running on a connected Uninterruptible Power Supply.
  • -a (All): Applies the setting to all three profiles simultaneously.

Viewing Current Settings

Before you change anything, it’s a good idea to see how your Mac is currently configured. Open your Terminal (Applications > Utilities) and type:

pmset -g

This prints a list of the current power management variables for your active power source. You will see variables like displaysleep, disksleep, and sleep, along with their timeout values in minutes.

Useful pmset Configurations

1. Adjusting Sleep Timers Granularly

While the GUI only gives you a slider, pmset lets you specify exact minutes. If you want your Mac to turn off the display after 15 minutes, but not put the actual system (CPU/RAM) to sleep until 60 minutes have passed (useful if you are rendering video in the background), you would use:

sudo pmset -a displaysleep 15 sleep 60

2. Disabling Sleep Entirely on AC Power

If you are using a Mac mini as a home media server, it must never go to sleep when plugged in. You can force this state by setting the sleep timer to 0 (which means “never”).

sudo pmset -c sleep 0 displaysleep 0 disksleep 0

3. Controlling Hibernation Modes

By default, MacBooks use “Safe Sleep” (hibernatemode 3). It keeps RAM powered on for fast waking, but also writes a copy of RAM to the SSD just in case the battery dies. If you want your MacBook to sleep exactly like a desktop (never writing to the SSD, saving wear and tear, but risking data loss if the battery dies), you can change it to mode 0.

sudo pmset -a hibernatemode 0

Warning: Only change hibernatemodes if you fully understand the consequences. Mode 25 (true hibernation) is available but makes waking the Mac very slow.

4. Disabling “Wake on LAN” (Network Access)

If your Mac keeps waking up randomly in the middle of the night, it is often due to network broadcast traffic triggering a wake. You can disable this specifically for battery power to save juice:

sudo pmset -b womp 0

(womp stands for Wake On Magic Packet. 0 disables it, 1 enables it).

Scheduling Automatic Sleep and Wake

Perhaps the most powerful feature of pmset is its ability to schedule precise power events. If you want your office Mac to automatically wake up at 8:00 AM every weekday, and shut down completely at 6:00 PM, you can set a recurring schedule.

sudo pmset repeat wake MTWRF 08:00:00 shutdown MTWRF 18:00:00

Note: MTWRF stands for Monday, Tuesday, Wednesday, Thursday, Friday. Use pmset -g sched to view your current schedule, and sudo pmset repeat cancel to wipe it.

Conclusion

The macOS System Settings app provides a sanitized, user-friendly approach to battery life. However, by mastering the pmset command in the Terminal, power users unlock the absolute, granular control necessary for configuring headless servers, optimizing battery degradation, and automating daily workflows.

Get the best tech tips delivered straight to your inbox.

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