Prevent your Mac from sleeping for one hour

Temporarily stop macOS from sleeping without changing Energy settings.

macOSPower & SleepTerminalLow risk
Run the command below. Your Mac stays awake for 3600 seconds (1 hour) and sleeps normally afterwards. Press Ctrl+C to stop early.

01Command

Command
$ caffeinate -t 3600

02What it does

caffeinate creates a temporary power assertion that keeps macOS awake while it runs — the same mechanism used by long installs and Time Machine. The display may still dim per your settings; only system sleep is prevented. Change 3600 to any number of seconds you need.

03Risk

RiskLow risk
CompatibilitymacOS 10.8 Mountain Lion – 15 Sequoia

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2025-11-12 · Category: System & Settings

06Related solutions