3 ms·
The basic command for keeping the machine awake is `caffeinate`, and has a few other nice options like changing what kind of sleep is prevented (disk, display,
by paxswill 10y ago
The basic command for keeping the machine awake is `caffeinate`, and has a few other nice options like changing what kind of sleep is prevented (disk, display, system) and also waiting on a PID (looks like that was added in 10.10).
Related to that is `pmset -g assertions` which will list all the various things that are keeping your machine from sleeping.
- therealmarv 10y agostrange, I always used `pmset noidle` instead of `caffeinate`. But seems it does the same. I somehow assumed `caffeinate` is the same as this app store thing called Caffeine.
- paxswill 10y agoUsing `pmset noidle` is now deprecated in favor of `caffeinate` according to the pmset man page.
- therealmarv 10y agoGood to know!