Site TIPS PAGE🔎   UP ONE LEVEL
 OJB's Web Site. V 2.1.tip tips mac owen2 
Tip

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.



My latest blog post: What They Got Right: I think it is important to acknowledge what they got right. (posted 2025-08-23). My latest podcast: OJB's Podcast 2025-08-07 What is Anything?.
 ©2025 by OJBRSS FeedMacs are BestMac Made
T: 10. H: 698,546,820
Features: RSS Feeds Feedback LogMod: 07 Jun 2024