Portable Macs by default are set up so that they will sleep whenever you close the lid, unless they are plugged into an external monitor, keyboard, and mouse. But, sometimes you want your Mac to be doing work while the lid is closed when you are not in this situation. With a simple Terminal command, you can easily make your Mac stay awake so that apps will remain running while you carry your MacBook around.
You can make your Mac put itself in Sleep mode automatically after a fixed period of time. If your Mac doesn’t detect any keyboard or mouse activity within the length of time you have designated, your computer will put itself into Sleep mode automatically. To make your computer go to sleep automatically, you need to. Mar 01, 2019 One question that new Mac users often ask is whether they should shut down their computers at the end of the day or just let them sleep. The quick answer is that sleep is better for your Mac, and in today’s Tech Tip we’ll show you why it’s better to just let your Mac go to sleep than shut it down each day. Terminal 101: Prevent your Mac from Sleeping. By MacLife 03 March 2014. Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application.
Adam monroe wurlitzer kontakt download free. While setting your Mac to automatically sleep after a period of inactivity has its energy-saving benefits, you may find that the system will go to sleep even when it is churning through data (e.g. Sleep apnea can lead to sleep deprivation from constant nightly interruptions and shallower overall sleep. Lack of sleep is associated with far-reaching health consequences that affect a person physically, mentally, and emotionally, and as a result, it comes as no surprise that sleep apnea has been tied to diverse health problems.
Caffeinate Your Mac
To begin running the caffeinate command and prevent your Mac from sleeping, open the Terminal located in /Applications/Utilities, then type the following command:
While this command is running, you will be able to close the lid on your Mac and still have OS X and your apps running and performing their tasks just as you would if the lid were to remain open.
Caffeinate Your Mac for a specified length of time
What if you only wish to caffeinate your Mac for a specific number of seconds? The caffeinated command can do your bidding here, as well:
With the command above, replace '600' with the number of seconds that you wish the caffeinated command to run. Running this command as-is will cause your Mac to prevent sleeping for 10 minutes (600 seconds).
Once starting this command, your Mac will be prevented from sleeping for the set amount of time, and will automatically terminate the caffeinate program afterwards, which will cause your Mac to go to sleep soon thereafter.
Once starting this command, your Mac will be prevented from sleeping for the set amount of time, and will automatically terminate the caffeinate program afterwards, which will cause your Mac to go to sleep soon thereafter.
Cancel the Caffeine
To make the caffeinate command stop running and return your Mac to normal using either of the methods above, simply return to the command line and press the Control + C keyboard combination.
A Warning
Caffeinateme 1 5 2 – Prevent Your Mac From Sleeping Mode
You shouldn't keep your Mac running with the lid closed and place it inside of a bag. Doing so will cause heat to build up and could cause damage to your MacBook.
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author on Twitter.
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author on Twitter.