How to keep your Mac from sleeping (temporarily or for good)
You're downloading a big file, sharing slides in an online meeting, or waiting for a long task to finish, and your Mac's screen goes dark and it falls asleep. Changing the settings every time is a hassle. Here's how to keep your Mac from sleeping, either permanently or just for a while.
Keep your Mac from ever sleeping
Desktop Macs
- Choose Apple menu → System Settings
- Open Displays → Advanced (or Energy Saver)
- Turn on "Prevent automatic sleeping when the display is off"
Mac laptops (MacBook)
- Open System Settings → Lock Screen
- Set options such as "Turn display off on power adapter when inactive" to Never
The names and locations of these settings vary a little by macOS version.
If your Mac never sleeps, you may worry about power use, battery wear and screen burn-in. It's better to stop sleep only when you need to.
Stop sleep temporarily
Option 1: The caffeinate command in Terminal
The caffeinate command that comes with macOS keeps your Mac awake only while it's running.
caffeinate -d
To stop it, press Control-C in Terminal. To keep your Mac awake for just one hour, give it a number of seconds.
caffeinate -d -t 3600
It's reliable, but you have to keep Terminal open.
Option 2: Leave it to the app
While a video is playing or a Keynote slideshow is running, the app often keeps your Mac awake by itself. But apps won't do that while you're waiting on a download or a long task.
Stop sleep with one button (Stello)
Stello's Timer card has a Keep Awake button.
- While it's on, your screen won't dim and your Mac won't sleep
- Turn it off and your usual settings are back
- It doesn't change System Settings, so there's nothing to forget to change back
How to use it
- Hold down the right ⌘ key to bring up the cards
- On the Timer card, click Keep Awake to turn it on
- When you're done, click it again to turn it off
The same card also has 5, 15, 25 and 45 minute timers, handy for breaking your work into blocks.
Summary
- To stop sleep for good, set display sleep to Never in System Settings
- To stop it temporarily, use
caffeinate -din Terminal - To turn it on and off with one button, use Keep Awake on Stello's Timer card