Maybe, almost every Mac user faced a situation when a computer “falls asleep”. It happens that you put some long task to accomplish (for example, downloading a large amount of information or working with video), go away, and upon returning you find that your Mac fell asleep. So, your task was not completed, and you have to spend your time once more to carry out it.
In this regard, it is a good practice to know how to make your Mac not sleep. You can stop both desktop computers and laptops with MacOS from sleeping. Moreover, you can even prevent laptops from entering sleep mode when closing the lid of the computer (at your own risk, of course; we will talk about this below).
3 ways how to stop Mac from sleeping
This can be done in the following ways on desktop computers and laptops:
- Using the system settings.
- Using a third-party application.
- Using the terminal.
How to stop Mac from sleeping using the system settings
To save energy, the transition to the sleep mode after a certain time is set by default. And you can easily disable it if necessary. To do this, follow these steps:
01. Go to system setting (the icon in the “Doc” panel at the bottom of the screen or the same in the Launchpad).

02. Select “Energy Saver”.

03. In the window appeared, firstly, turn the “Turn display off after” slider to the extreme right position (“Never”), and secondly, uncheck all boxes next to all items under this slider. As a result, the following picture should be obtained (the top item may be absent depending on the OS version, or it can be activated automatically when the slider is switched to the “Never” position):

Then we save the changes, and that’s all – now, the computer will obediently wait for you without falling asleep.
IMPORTANT. If you have a MacBook, you need to prevent Mac from sleeping separately for line supply and battery supply. For this purpose, you should follow the above steps for the “Battery” and “Power Adapter” tabs.

How to make your Mac not sleep using a third-party application
The “Jolt of Caffeine” app copes with this task very well. It is available in the AppStore and is offered free of charge. The advantage of this application is that you don’t need to go into the system settings: you only need to make a couple of mouse clicks before you leave Mac, and it won’t fall asleep.

After downloading the program, launch it through the Launchpad. During its operation, a cup icon is displayed in the upper right corner of Mac.

To prevent Mac from entering the sleep mode, simply click on this cup and select the desired time period for which you want to set the prohibition.

A notification appears about that your Mac will not sleep anymore, and the cup will fill with coffee.


To disable the sleep prohibition, click on the filled cup and select the appropriate item from the menu.

How to stop Mac from sleeping through the terminal
For this purpose, launch the terminal in a convenient way. For example, through Launchpad -> Others -> Terminal. Then in the window appeared, type “caffeinate -t 3600” and click “Return”.
In this case, 3600 is a number of seconds during which the sleep mode will be prohibited for your Mac. This figure can be arbitrary – you can enter as much as you need.

By the way, in order not to enter the command manually, you can simply copy and paste it into the Terminal window and change the numbers to the ones you need.
IMPORTANT. You don’t need to close the terminal so that the prohibition should work. You can just minimize it.
How to prevent Mac from sleeping when closing the lid
If, for example, you want to listen to music with the laptop lid being closed, you can do this only with the help of a third-party program. It will not be possible to establish such settings by standard means because it is not provided by a manufacturer. The fact is that when the lid is closed, the cooling of the laptop deteriorates, which means that the probability of overheating and loss of function is significantly increased.
SO, IT IS NOT RECOMMENDED TO DO THIS. If you really want to do this, you must know that you do it at your own risk.
For such purposes, you can download the “InsomniaX” program. Such a program is not, of course, available in AppStore. You have to search for the current released version of its program on the network yourself.

The operating principle here is the same, as in the case of the “Jolt of Caffeine” program. Click on the icon in the upper part (it is in the form of a crescent moon in the current released version) and activate the prohibition on entering the sleep mode for the MacBook.

The program does not work on all models and generations of laptops – as luck would have it (everything depends on your OS version). And it is understandable because, in fact, this is software that can harm your device, and the system simply may not allow it to change its parameters.
Pay attention once again: exercise extreme caution when using such programs. Overheating of the MacBook will lead to trouble.
So, we see that there are several ways to stop Mac from sleeping. And any user can choose the convenient one. Even a MacBook with a closed lid can be made to stay awake. But be careful with this.
Good luck, and let the technique only make you happy.