News
Mastering Mac Sleep Settings: Preventing Unnecessary Naps
A little caffè for our Mac.

- July 23, 2023
- Updated: July 2, 2025 at 1:38 AM

The macOS sleep mode, which we usually refer to simply as the Mac going to sleep, is a feature that allows our computer to reduce its power consumption during periods of inactivity. A tremendously useful feature that, although more noticeable on laptops, on all Macs makes power consumption – just as we can maximize iPhone battery life – as minimal as possible without ever losing functionality.
At some times, however, what we need is for our Mac to stay awake and not turn off the screen, or put the storage to sleep or anything like that. One way is to be in front of the computer using it, of course, but another is to configure it using different resources.
How to prevent your Mac from sleeping with the lock screen settings
To prevent our Mac from sleeping we need to configure the options of the Lock Screen section in the System Settings. It is something that we can do very easily, the steps to follow are as follows:
- From the Apple menu () choose System Settings.
- In the sidebar we enter Lock Screen.
Here we will find different options depending on whether we are on a laptop or a desktop. In the first case, the second and third options will allow us to adjust the time it takes for the screen to turn off while the computer is plugged in or running on battery power. In the second case, we will only find one of the options, since the computer will always be plugged in.
By adjusting both, we can increase the time that elapses before the Mac goes to sleep, as, in fact, sleep happens a few minutes after the screen is turned off.
It is also a good idea to review the Displays section of the System Settings sidebar. Here, by tapping the Advanced button, we can activate the option that allows us to prevent the computer from going to sleep with the screen off. An option, it must be said, that is not available on all Mac models.
How to prevent your Mac from sleeping with the Terminal
If we are looking for a less definitive way to make our Mac stay awake,
So far, the methods we have seen remain active until, manually, we enter the Settings app and change the settings we consider.
Alternatively, we can use the Terminal app so that, from time to time, our Mac does not sleep. Through a specific command, conveniently called “caffeine” we can configure how long we want our Mac to stay awake. The steps for this are as simple as this:
- We open the Terminal app on our Mac. We can use it in the Utilities folder inside Applications or using Spotlight.
- Type, without quotes, the following command: “caffeinate -ids”.
- Press Enter (↵).
From now on, until we close the Terminal window, our Mac will remain awake. In the meantime, we can minimize the window. Only after finishing the command, the Mac will go back to sleep as it normally would.
We have to finish by saying that, in addition to the built-in macOS settings and the Terminal’s caffeinate command, we can also find several third-party applications in the Mac App Store that will help us to keep the Mac awake. Apps that also provide additional functionality such as scheduling specific times to keep the Mac awake, simple interactions through the menu bar and much more.
There are several ways to keep our Mac from sleeping while we are not actively using it. The ones we have just seen are, among all the options, the simplest and also versatile by allowing us a regular configuration and also exceptions for when we really need our Mac to stay awake.
Algunos de los enlaces añadidos en el artículo forman parte de campañas de afiliación y pueden representar beneficios para Softonic.
Architect | Founder of hanaringo.com | Apple Technologies Trainer | Writer at Softonic and iDoo_tech, formerly at Applesfera
Latest from David Bernal Raspall
- Generative AI vs Generative Design: What Each Technology Can (and Can’t) Do in Architecture
- The Software Behind the Success of Zootopia 2: How Autodesk Maya and Flow Production Tracking Brought It to Life
- The Web You Remember Is Waiting Here: Share Your Memory and Win a Trip to Switzerland
- Wonder 3D in Autodesk Flow Studio levels up the game: check out the AI that models anything in seconds
You may also like
ArticleMortal Kombat II could be the movie of the summer and the proof is its first movie
Read more
ArticleThe best adaptation of Hannibal Lecter is coming to streaming to whet our appetite again
Read more
NewsA year later, Oblivion Remastered still has some bugs that make it "somewhat annoying and unplayable"
Read more
NewsXbox is a failure in Japan and, according to a Japanese developer, it's not just because they don't sell
Read more
NewsShigeru Miyamoto claims that finishing the first Super Mario was quite a challenge
Read more
NewsThe Solo Leveling video game will receive a new expansion while there are no news about a third season of the anime
Read more