CAFFEINATE(8)
π CAFFEINATE(8) β System Manager's Manual π
β¨ NAME β¨
caffeinate β bestie, it literally prevents the system from sleeping on behalf of a utility. π«Ά
β¨ SYNOPSIS β¨
caffeinate [-disu] [-t timeout] [-w pid] [utility arguments...]
β¨ DESCRIPTION β¨
okay so 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.
Available options:
-dβ creates an assertion to prevent the display from sleeping. π-iβ creates an assertion to prevent the system from idle sleeping. π΄π«-mβ creates an assertion to prevent the disk from idle sleeping. π½β¨-sβ creates an assertion to prevent the system from sleeping. this assertion is valid only when system is running on AC power. ππ-uβ creates an assertion to declare that user is active. if the display is off, this option turns the display on and prevents the display from going into idle sleep. if a timeout is not specified with'-t'option, then this assertion is taken with a default of 5 second timeout. πβοΈβ¨-tβ specifies the timeout value in seconds for which this assertion has to be valid. the assertion is dropped after the specified timeout. timeout value is not used when an utility is invoked with this command. β³-wβ waits for the process with the specified pid to exit. once the process exits, the assertion is also released. this option is ignored when used with utility option. π
β¨ EXAMPLE β¨
caffeinate -i make
caffeinate forks a process, execs make in it, and holds an assertion that prevents idle sleep as long as that process is running. literally iconic. π₯
β¨ SEE ALSO β¨
pmset(1)
β¨ LOCATION β¨
/usr/bin/caffeinate
okay bye bestie β this whole vibe is Darwin, dated November 9, 2012, and it's giving CAFFEINATE(8) energy fr fr π«Άπ
π¦ where this page comes from
- nixpkgs unstable: PowerManagement 1846.101.2
- Copyright (c) 2010-2012 Apple Inc. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms