Site TIPS PAGE🔎 SEARCH  Ξ INDEX  MAIN MENU  UP ONE LEVEL
 OJB's Web Site. Version 2.4. Mac Tip.Location: tip228 tips mac owen2 
Tip

Discuss   Up to OJB's Mac Tips List

Keep a Mac Awake Using Terminal

This describes how to stop your Mac from sleeping without modifying the system settings.

Introduction

By default the Mac is set to sleep after a relatively short time. Also, some workplaces impose a short time period before the computer sleeps. There are two reasons you might want to maintain this setting quite small: it saves power by sleeping the computer, and it locks the screen to avoid unauthorised access when the user leaves it.

Note that in some managed environments you cannot change this, but if you do what to this time can be set by launching "System Settings", then clicking "Lock Screen", then changing the times available to make the sleep delay more useful.

Another approach involves temporarily telling the computer to stay awake longer for specific reasons, especially when the Mac is doing something that takes a longer time without the user doing anything, such as when viewing a movie, displaying a presentation, etc.

There are various friendly apps to do this, such as the free "Caffeinate" which just allows the user to set a time the computer should stay awake for. After the time period is complete, the usual sleep settings take effect again. If you need more features, such as allowing sleep after a process completes, you can use a more advanced app, like "Amphetamine" but that isn't free.

Using the command

Finally, you can stop your Mac sleeping using a built-in command from terminal. To do this, run Terminal (it's usually in the "Utilities" folder which is inside the "Applications", then type this: "caffeinate" (without the quotes) and press return.

You won't see much change but the Mac should then not sleep and you can use it normally (you must leave Terminal running, but you can hide it).

To terminate the command, just go back to Terminal and type control-C (hold down the control key and press C) and quite from Terminal.





I usually write a blog post about once a week. The latest post can be viewed here: Think for Yourself: In the end, everything is just an opinion. Be skeptical, and think for yourself! (posted 2026-04-25 at 21:12:02). Or go to the Home Page of My Blog to choose a post to view.

I do podcasts too! You can listen to my latest podcast, here: OJB's Podcast 2026-04-14 How Far is that Star?: How would we really know how big the universe is? Or subscribe to my podcast RSS feed, on my RSS Feeds page.

If you're not sure what to view from the thousands of pages on my site, here are some suggestions: My Latest Airshow Report (photos and movies from Warbirds Over Wanaka, 2026), My Favourite Wines and Beers (tasting notes for some of my favourites), An Interesting Astronomical Observation (learn a bit about astronomy from these observing notes), See Some Photos (A short rail journey through the Taieri Gorge), Read Some Mac Tips (Learn about how to use your Mac, and fix some problems).


Latest Site News and Notifications (Desktop): You are currently viewing OJB's web site, version 2.4 which has some major changes, and possibly errors! Please report any problems to ojb@mac.com.

 Site ©2026 by OJBRSS FeedWhy Macs are BestMade & Served on Mac 
Site Features: Blog RSS Feeds Podcasts Feedback Log07 Jun 2024. Hits: 1,001,443,074
Description: Mac TipLogged: nothingLoad Timer: 18ms