• Home

  • Productivity

  • App tips

App tips

2 min read

How to force your Mac to stay awake

Keep your Mac from sleeping with this simple trick

By Justin Pot · April 16, 2021
Hero image of the Mac terminal

Your Mac goes to sleep after a few idle minutes, which is a good thing—your battery wouldn't last very long otherwise. Every once in a while, though, that's not what you want. 

I ran into this once during a brainstorming session a few years ago. My coworker and I were looking at a document on their MacBook, which was connected to a TV. The Mac kept falling asleep, and my coworker was annoyed about having to get up and move the mouse every now and then. 

I walked over to the Mac, opened a window, typed one word, and the problem was solved. Am I a wizard? Yes, but that's not how I did this. I just know a tip you don't—until now. 

Amaze your friends with this one weird trick 

What I did wasn't complicated. First I opened the Terminal. You can find it in Applications > Utilities, but I find it fastest to press command+Space and type "Terminal." Here's what the Terminal looks like:

The Terminal on Mac

This might look scary, but don't worry—it's just a place you can tell the computer to do stuff by typing words. Think of it as the 1970s Siri. 

In this case, we're going to type "caffeinate" and hit return

Typing caffeinate into the Terminal on Mac

That's it. The Mac will now stay awake. You can end this by pressing control+C with the Terminal window open, or by closing the Terminal window. 

There are other ways you can do the same thing. A free app called Amphetamine can do this from the menu bar, along with some other tricks. And you can also go into Battery (Big Sur) or Energy Saver (older versions) in System Preferences and tell your Mac not to go to sleep there.

But neither of those approaches is great for temporarily preventing sleep on a Mac that's not yours. Changing the settings means someone has to remember to change them back, which is annoying at best. Installing software for a one-time thing can feel like overkill (and, depending on the situation, might not be possible without an admin password). 

The Terminal command caffeinate works on every Mac, is instant, and is easy to stop. And you don't even have to remember how to spell the word: just type "caf" and hit tab. The Mac will complete the word for you. 

It's effective, and it makes you look way cooler than you are. Try it sometime. 

Related reading:

  • How to take screenshots on a Mac

  • Tweak these settings to make your Mac feel bigger

  • Why we write "Best Mac" articles

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
See how Zapier works
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'