Mac Terminal commands to prevent Mac from sleeping

This is the syntax I use throughout this document:

syntax description
$ a shell prompt
text in monospaced font a command or other terminal text
underlined text a parameter you must replace with a value

These are the Terminal commands to keep your Mac display, system, or disk awake;” in other words: prevent it from sleeping:

commands description
$ caffeinate -d prevent display from sleeping
$ caffeinate -i prevent system from idle sleeping
$ caffeinate -m prevent disk from going idle
$ caffeinate -s keep Mac awake while it is plugged into AC power
$ caffeinate keep Mac awake as long as the Terminal is running. To stop process: Ctrl ⌃ + C
$ caffeinate -t n in second to keep you Mac awake for a set number of second e.g $ caffeinate -t 600

If you would like to learn more commands, I’ve put together a cheatsheet with the commands I use on my Mac Terminal. This is the summary of the cheatsheet:

Hey, I’m writing a book to explain how platforms and applications get away with what they promise they will do (and don’t do); and what impact your usage has on your well-being. You can sign up here to get an email when the book is out.

Up next Mac Terminal command-line interface (CLI) cheatsheet Last updated on January 13th, 2021 syntax editing shortcuts navigation commands history commands file and directory management commands Update: added EtherCal (web-based spreadsheet), Etherpad (web-based word processor), Framadate (polls), Drop (file transfer) to list.romainaubert.com I maintain a list of products that respects people’s data, and are user-friendly. Generally, I add products that are a good alternative to Google’s
Latest posts Update: added CryptPad (web-based spreadsheet), Mark Text, Dillinger (Markdown editors) to list.romainaubert.com Update: added EtherCal (web-based spreadsheet), Etherpad (web-based word processor), Framadate (polls), Drop (file transfer) to list.romainaubert.com Mac Terminal commands to prevent Mac from sleeping Mac Terminal command-line interface (CLI) cheatsheet A roadmap to reclaiming my attention, relationships, intimacy and privacy Bypass cookie banners by toggling “reader view” in your browser Book review - alone together: why we expect more from technology and less from each other - by sherry turkle Update: added 2 Android OS, 2 phones, a search engine, a map app, 2 blog CMS, and a tool to delete Tweets to list.romainaubert.com Should people negotiate financial income from the use of their personal data? Peer-to-peer/decentralized network architectures and information commons as an alternative to a centralized internet Yelp is screwing over restaurants by replacing their phone numbers on listings and routing customers’ calls thru a referral marketing business. how to ditch Facebook, Twitter, Google News, Instagram, and LinkedIn — and still follow news, people and organizations you like Tour of Queyras (GR58), 140 km, 7,000m elevation, 7 days Facebook’s “privacy notifications” and “co creation strategies” to protect people’s privacy Privacy-friendly and open source alternatives to Google’s products Privacy 101: simple steps to protect your privacy online Bongo 9. twtxt Asynchronous communication for open source projects git - remote: Invalid username or password. fatal: Authentication failed for [remote’s URL] product development resources 10 Days in Silence: Vipassana Meditation Book review - un peuple de promeneur - alexandre romanès Book review - journey under the midnight sun (白夜行, byakuyakō) - keigo higashino Book review - how to fail at everything and still win big - scott adams Book review - the remains of the day - kazuo ishiguro Book review - man’s search for meaning - viktor e. frankl Book review - cosmos - michel onfray We don’t care about personas “Building a more private web” by Google — comment on Reddit Replacing Facebook with newsletters