macOS practical guide

How to keep your Mac awake

Use macOS settings for everyday behavior, Terminal’s caffeinate command for a quick session, or StayRunning when you need repeatable rules, battery limits, and closed-lid work.

The short answer

To keep a Mac awake right now, open Terminal and run caffeinate. For a visual control you can reuse without remembering commands, use a native keep-awake app. Your display can still turn off while the Mac continues downloads, builds, backups, SSH sessions, or remote access.

Option 01

Adjust macOS sleep settings

macOS includes separate controls for display sleep and automatic system sleep. The exact choices depend on whether you use a MacBook or desktop Mac and which macOS version is installed.

Start in System Settings under Lock Screen, Battery, or Energy. Apple documents the current controls in its sleep and wake settings guide.

Option 02

Use the caffeinate command

The built-in caffeinate command is ideal for a one-off session. It needs no installation and stops when you end the command.

caffeinateStay awake until stopped
caffeinate -t 3600Stay awake for one hour
caffeinate -i commandStay awake while a command runs

Option 03

Use StayRunning for repeatable work

StayRunning packages the same job into a native interface with one-click control, activity rules, battery guardrails, closed-lid mode, and local history. It is designed for work you repeat: long downloads, builds, backups, renders, SSH, and remote sessions.

See StayRunning and download it free

Common questions

Keeping a Mac awake

How do I keep my Mac awake temporarily?

For a quick built-in option, open Terminal and run caffeinate. It keeps the Mac awake until you stop the command with Control-C or close that Terminal session.

Can my display turn off while the Mac stays awake?

Yes. Display sleep and system sleep are separate. A keep-awake utility can let the display turn off while preventing the Mac itself from sleeping.

How do I keep a Mac awake for one hour?

Run caffeinate -t 3600 in Terminal. The number is the duration in seconds. A graphical utility is easier when you need this repeatedly.

Can StayRunning keep working with the lid closed?

StayRunning includes a closed-lid mode for downloads, builds, backups, SSH, and remote-access workflows, with battery guardrails you control.