• Home
  • How To
  • Mac
  • How To Use a Built-In Terminal Command to Keep Your Mac From Sleeping

How To Use a Built-In Terminal Command to Keep Your Mac From Sleeping

How To Use a Built-In Terminal Command to Keep Your Mac From Sleeping

While we usually want our Mac’s to go to sleep if they haven’t been used for awhile – saves energy, don’t ya know – there are times we don’t want it to go to sleep, such as when we’re getting ready to give a presentation and such.

While there are a number of third-party apps that will turn temporarily keep you Mac awake, or you can turn it off in System Preferences, there’s a quicker way to toggle Energy Saver modes on your Mac, and you can do it via a built-in command entered from the command line in Terminal.

Keep Your Mac Awake

Launch the Terminal app. You can find it in The “Applications” -> “Utilities” folder. You can also hit the “Command + Space Bar” hotkey combo and enter “Terminal” into Spotlight to run it.

When the Terminal prompt appears, enter the following command and press the Return key:

caffeinate

It will look like absolutely nothing happened, but you’ll notice the Terminal window’s status bar says “caffeinate,” which means the command is running.

How To Use a Built-In Terminal Command to Keep Your Mac From Sleeping

While caffeinate is running, you won’t notice anything different except for one thing, no matter how long you leave your Mac running, it will not go to sleep.

Now, when you’re finished with the reason you didn’t want your Mac to go to sleep, simply press “Control + C” simultaneously on your keyboard. The caffeinate command will stop running, and you’ll see the Terminal window’s status bar return to normal. You machine will now sleep according to the Energy Saver settings you have in place.

How To Use a Built-In Terminal Command to Keep Your Mac From Sleeping

For more tips and tricks on how to make better use of your Mac, iOS device, Apple Watch, or Apple TV, be sure to visit the “How To” section of our website.

(Via TekRevue)