Tip — Caffeinate by Dr. Drang

ldstephens
Jul 27, 2017 · 1 min read

Since I started following Dr. Drang’s blog I have learned some great Mac tricks. Some I use everyday.

Here’s a new one. Keep your screen awake without having to install one of the popular apps like Caffeine or Amphetamine. Dr. Drang explains how to do this with a terminal command. No new app needed.

Dr. Drang, writing on his personal blog

But you know me. Why would I use a nice polished program with a GUI when I can run a Terminal command? And even though I own Bartender, I’d still rather keep my menubar apps to a minimum.

So I use the caffeinate command, whose name, I believe, was lifted from Caffeine in what must be Apple’s lamest piece of Sherlocking ever. It’s a sort of limited version of pmset, the older, more powerful, and considerably more complicated power management utility.

Caffeinate has only a few options and the ones I use are -d, which keeps the display from sleeping, and -t which sets a timer to stop caffeinate in case I forget to. The command I used tonight was

caffeinate -dt 6000

which kept the display awake for 100 minutes (6000 seconds), enough for the 90-minute class plus a cushion.

I highly recommend Dr. Drang’s blog.

[If you appreciate articles like this one, please follow my personal blog. That way you’ll never miss an article.]

ldstephens

Written by

I write here for my own entertainment and hopefully yours. Blogger at https://ldstephens.net

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade