
You can stop your Mac from sleeping if you want it to stay on indefinitely. This might prove handy if you find it locking when you don’t want it to, like during a class or meeting. You don’t need to wiggle the mouse every few minutes to keep the screen on.
There are a few different ways to set this up. The simplest and most permanent way is to disable sleep entirely in your Mac’s System Settings. However, if you just want a quick way to disable sleep temporarily, there’s a simple command you can enter in the Terminal. Or, if you want something more user-friendly and customizable, there’s a free app you can download that you can toggle on and off from your Mac’s menu bar.
Here are the three best solutions if you want to stop your Mac from sleeping.
How to stop your Mac from sleeping
When you don’t use your Mac for a while, it turns off the display and enters sleep mode to save energy. It also locks your account, requiring your password to use it again. This happens automatically after a few minutes — you can change the duration in System Settings.
However, there are some situations where you may want your Mac to stay open, even if you’re not actively typing or mousing around. If you’re in class or an important meeting, you might pause to listen for a while — but when you need to jot notes down again, you don’t want the friction of typing in your password. And wiggling the mouse every ten minutes to keep it awake is distracting. There are three different ways to fix this.
Table of contents: How to stop your Mac from sleeping
- Disable automatic sleep in System Settings
- Temporarily stop Mac from sleeping in the Terminal
- Stop your Mac from sleeping with a menu bar app
- More Mac tips
Disable automatic sleep in System Settings

Screenshot: D. Griffin Jones/Cult of Mac
Open System Settings and click Lock Screen in the sidebar. Set “Turn display off when inactive” to Never. On older versions of macOS, this same setting is in System Preferences > Energy Saver.
Alternatively, if you want your Mac to stay awake but you don’t want the display on, you can go to System Settings > Energy and enable “Prevent automatic sleeping when the display is off.”
Temporarily stop Mac from sleeping in the Terminal

Screenshot: D. Griffin Jones/Cult of Mac
If you don’t need to stop your Mac from sleeping permanently, and only want a quick, temporary solution, there’s another method.
Open the Terminal app and type in caffeinate
and hit Return. Your Mac will stay awake for as long as you let it. If you want the display to stay on, too, type caffeinate -d
. You can minimize or hide the Terminal and your Mac will still stay awake.
When you’re done, switch back to the Terminal. You can either hit Control-C (⌃C) to stop caffeinate
without closing the Terminal, or you can click the red Close button and click Terminate.
There are additional options available:
caffeinate -t 3600
will keep your Mac awake for an hour (3,600 seconds). Replace3600
with a different number to keep it awake for shorter or longer.caffeinate -i
prevents the system from sleeping due to inactivity, but allows you to go to > Sleep or hit Control-Command-Q (⌃⌘Q) to enter sleep.caffeinate -s
prevents the Mac from sleeping, but only while it’s plugged in.
You can combine multiple options in a single command: caffeinate -i -d -t 7200
, for example, keeps the Mac awake with its display on, unless you manually activate sleep, for the next hour.
Stop your Mac from sleeping with a menu bar app

Screenshot: D. Griffin Jones/Cult of Mac
Your third option is Amphetamine, a free app you can use to keep your Mac from sleeping. Amphetamine puts a tiny icon in your Mac menu bar, in the top right. Click it to start a “session” that will keep your Mac awake.
You can customize the duration, from a few minutes to several hours to indefinitely — until you turn off tha app. Alternatively, you can set a session that runs as long as a particular app is running — as long as you’re running Final Cut Pro, for example.
Most clever of all, you can set a session that runs as long as a big file is downloading. Point it to a file, and as long as the file size changes a little bit every few minutes, Amphetamine will keep your Mac awake.
You can set up Amphetamine to start a session automatically, based on criteria like a time of day, a particular Wi-Fi network, app, display, external hard drive, USB device and more. Find this in Amphetamine > Settings > Triggers.
Drive Alive is another feature of Amphetamine that keeps any disk (internal or external) from sleeping. This proves especially handy for spinning hard drives, as they can take a while to wake up from idle, keeping you waiting — and potentially freezing the app you’re using.
Price: Free
Download from: Mac App Store
More Mac tips
After you learn how to stop your Mac from sleeping, check out these other pro tips: