For example, you might want to prevent your Mac from going to sleep while you export a video.Īll you have to do is type caffeinate path_to_the_core_of_the_app. You can also target a specific application. For example, if you want to prevent your Mac from going to sleep for an hour you will type in caffeinate -t 3600.Ĭhange the timer ( in this example is 3600 ) to whatever you need. You can also set a sleep timer to caffeinate. To stop it you will need to kill the process with ctrl+ c while inside the Terminal. You can check if it’s running, using bpytop which can be installed via Homebrew.ĪLSO READ HOW TO: Background and Foreground Processes If you run the command by itself, you will prevent your Mac from going to sleep as long as the command is active. To prevent your Mac from going to sleep using the built-in caffeinate app, all you have to do is to open up the Terminal, type caffeinate and press enter. You can follow the same steps using an older Mac running an older version of macOS. NOTE: you don’t need an M1 Mac running macOS Monterey for caffeinate to work. How to use caffeinate to prevent your Mac from going to sleep Even a complete noob can use caffeinate. And it completely eliminates the need to install yet another app. What were the chances, right?ĭon’t worry about the command line part though. It’s a command line program called caffeinate. And it’s been available for the last 10 years or so. What some macOS users don’t know, is that this functionality is built-in into macOS. There is Caffeine which is a free popular option, but there’s also paid options. When it comes to preventing your Mac from going to sleep, most macOS users immediately think of an app. And changing the settings back and forth can be annoying. Of course, you can also fine-tune this feature in System Preferences > Battery.īut there are times when you might only want to prevent your Mac from sleeping until a certain task is completed. You can prevent your M1 or M2 Mac running macOS Monterey from going to sleep with a built-in tool. Computers go to sleep as a way to save energy and prevent unnecessary wear on your hardware.
0 Comments
Leave a Reply. |