• 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)

Related

  1. How to Track Santa From Your Mac, iPhone, or iPad
  2. Mac/iOS Tip: Create An Auto-Response Vacation Message For iCloud
  3. Adobe Posts Sneak Preview of Photoshop CS6 (Video)
  4. How To: Show the New iTunes Widget in the OS X Yosemite Notification Center
  5. Mac Tip: Make The Dashboard Translucent Again In Mac OS X Lion
  6. New Retina MacBooks to Feature Up to 16GB RAM, 768GB Flash
Apple Giveaways

iPhone X Giveaway

$999

Enter

MacBook Pro Giveaway

$1499.00

Enter

10.5″ iPad Pro Giveaway

$649.00

Enter

iPhone 8 Plus Giveaway

$800.00

Enter
Share