Apple designed macOS for maximum power efficiency; therefore, by default, your Mac tries to preserve energy as much as possible to prolong its battery life. As a result, when you stop using your Mac for a certain amount of time, it automatically goes to sleep.

However, you might not want your Mac to go to sleep when you have an important ongoing task. This guide will show you different ways to stop your Mac from sleeping and keep it awake when needed.

How to Turn Off Sleep Mode on Your Mac

macOS lets you control how and when you want your Mac to go to sleep. However, with the arrival of System Settings in macOS Ventura, you might not find those options under Energy Saver settings since it isn't available. Nevertheless, follow these simple instructions to turn off your Mac from going to sleep in macOS Ventura:

  1. Open System Settings on your Mac.
  2. Click Lock Screen from the left sidebar.
    Lock Screen settings on macOS Ventura
  3. Choose Never from the dropdown menu next to the "Turn display off on battery when inactive" option.
  4. Similarly, select Never from the dropdown menu next to the "Turn display off on power adapter when inactive" option.
    Set display off settings to Never in Lock Screen settings on macOS Ventura

Setting these options to "Never" will turn off the sleep mode on your Mac completely, even when it's plugged in. But if you want it set to a particular time, macOS provides a few options in the same dropdown menus. Although it's not permanent, you can always revert to the old settings when needed.

Prevent Your Mac From Sleeping Using Terminal

If you want your Mac to stop going to sleep temporarily, you'll need to use the Terminal app.

  1. Open the Terminal app on your Mac.
  2. Type the following command, followed by the Return key.
            caffeinate -d
        
    Enter the caffeinate -d command in the Terminal and press Return

Once you run this command, your Mac will not go to sleep as long as you don't close the current Terminal session.

Use Third-Party Apps to Stop Your Mac From Going to Sleep

Some third-party apps are available if you want extra control over the sleep behavior of your Mac. Here are a few good recommendations from our end to help you with the same:

1. KeepingYouAwake

KeepingYouAwake app on macOS Ventura

KeepingYouAwake is a menu bar app based on the caffeinate command-line tool, designed to prevent your desktop Mac or MacBook from sleeping. It's a suitable replacement for the now-defunct Caffeine app. The app lets you choose from multiple preset options, including keeping your Mac awake for 5, 10, 15, or 30 minutes.

After installing, Control-click the menu bar icon and choose Activate for Duration > Indefinitely or for a certain period. You can add your custom preset and choose to automatically deactivate the app if the battery level falls below a particular threshold. It's also possible to automatically activate the app when you connect an external screen to your Mac.

Download: KeepingYouAwake (Free)

2. Lungo

Lungo app on macOS Ventura

Lungo is a modern menu bar app to keep your Mac awake. It comes with a built-in dark theme to match macOS's dark mode. The app provides a concise list of pre-defined periods to stave off sleep on launch.

Instead of just being a menu bar tool, you can control Lungo using anything that supports URL opening with a custom scheme, shell scripts, shortcuts built into macOS Monterey, and the Terminal app. The Shortcuts app makes it possible to automate endless tasks. So, read our guide to learn how to use Shortcuts for Mac.

For example, run the following command to activate the app for 10 minutes:

$ open --background ’lungo:activate?minutes=10’

In the same way, type in the following to activate Lungo for 1 hour and 30 minutes.

$ open --background ’lungo:activate?hours=1&minutes=30’

The app supports commands like activate, deactivate, or toggle and parameters like hours and minutes. You can configure the app to launch automatically or pause when the screen gets locked.

Download: Lungo ($2.99)

3. Sleep Control Centre

Sleep Control Center app on macOS Ventura

Sleep Control Centre is probably the only app that gives you fine controls on whether to allow or prevent sleep under various states or conditions. At its most basic, the app keeps your Mac awake under specific working conditions.

The icon in the status bar displays the current state: if you see an open eye in the menu bar, your Mac will not enter sleep mode.

In system sleep mode, the display turns off, but the system continues to work. When you close the laptop lid, your Mac will automatically sleep. You can set a timer from the list of pre-defined sessions to configure the sleep mode according to your preferences.

You can also choose to activate the app based on different events. For example, while connecting an external disk or when the battery reaches a critical level. Or prevent sleep even when you shut the laptop lid when connected to a power adapter. It's also possible to set up a Hot Corner action to activate the app, fade the display, launch a screensaver, lock the screen, or deactivate sleep.

While the app is powerful, with thorough parameters and pre-defined conditions, the lengthy menu structure makes the interface convoluted. It'll take time to figure out all the options and decide what works best.

Download: Sleep Control Centre ($7.99, free trial available)

4. Amphetamine

Amphetamine app on macOS Ventura

Amphetamine is a utility app that can prevent your Mac from sleeping for a specific duration or in certain situations you define. The app is based on the principle of "sessions." To get started, Control-click the menu bar icon and choose a default duration (set to Indefinitely by default).

Or, you can select a situation to ensure your Mac keeps running until the task gets completed. For example, when you're running a particular app to monitor a task, downloading a file, or transferring data to an external drive.

The app offers you a robust set of configuration options. Head to Preferences to customize the app as per your needs. You can create a trigger by defining a set of criteria. Navigate to Preferences > Triggers and check Enable Triggers. Give your criteria a name and click the plus (+) button. From the list that appears, choose an option and proceed.

Since the App Store app is sandboxed, it cannot get a list of every app and process running on your Mac. Amphetamine Enhancer is a helper tool that allows you to use all running processes with triggers and app-based sessions. The app lets you customize the appearance, change notification parameters, view sleep mode statistics, and more.

Download: Amphetamine (Free)

Don't Let Your Mac Sleep

Your Mac should not go to sleep when you're in the middle of completing a task. The above methods and apps will let you keep your Mac awake and configure standby times precisely based on your preferences.

You might face unique problems like this, especially when you're a new Mac user and finding your way around macOS. Fortunately, you can overcome most of them with ease.