Created by Ethan Nay


caffeinate creates assertions to alter system sleep behavior. If no assertion flags are specified, caffeinate creates an assertion to prevent idle sleep. If a utility is specified, caffeinate creates the assertions on the utility’s behalf, and those assertions will persist for the duration of the utility’s execution. Otherwise, caffeinate creates the assertions directly, and those assertions will persist until caffeinate exits.

2023-07-12Execution Defense Evasionbash zsh


  • /usr/bin/caffeinate

Use Cases

Fork a process

Make caffeinate fork a process and hold an assertion that prevents idle sleep as long as that process is running

caffeinate -i /tmp/evil

Prevent a sleep

Prevent a macOS from going to sleep for 4 hours (14400 seconds)

caffeinate -u -t 14400


  • No detections at time of publishing