caffeinate:tldr:37eb7
caffeinate: Prevent from sleeping for 1 hour (3600 seconds).
$ caffeinate -u -t ${3600}
try on your machine
The caffeinate
command is used to prevent a Mac computer from going to sleep or turning off the display or hard disk for a specified period of time. It is commonly used when you want to keep your computer awake for a certain task or script.
Here is the breakdown of the command:
caffeinate
: The main command used to start the caffeine mode.-u
: This option prevents the display from sleeping.-t ${3600}
: This option is used to specify the time in seconds (3600 seconds = 1 hour) for which the computer should stay awake.
So, when you execute the command caffeinate -u -t ${3600}
in the Terminal, it will activate the caffeine mode, preventing the display from sleeping or turning off for one hour. You can replace ${3600}
with any other duration in seconds according to your requirement.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.