Terminal can be a super useful app. I’ve used it many times to perform a variety of tasks such as removing a time zone from Calendar (which is only possible through Terminal commands), stopping an iOS or iPadOS backup/sync, and more.
Here are two useful commands for Terminal.
- Closing an app.
- Keeping your Mac awake for a period of time.
There are times when you need to close an app that is not responding. If necessary, you can do that with Terminal. Once opened you will use the killall command, followed by the app name. For example:
killall Mail
The above will force the Mail app to close. You can repeat that for any app, again, just be replacing “Mail” with the app name.
Secondly, there are moments when you don’t want your Mac to go to sleep (updates, downloads, conferences, etc.). Here’s how you can do that using Terminal.
By using the command caffeinate -t followed by the number of seconds, yes, it is in seconds. For example, if you wanted the Mac to not sleep for two (2) hours you could use the following command:
caffeinate -t 7200
7,200 seconds = 2 hours. There are of course apps you can use which will perform the same command. But this allows you to do it yourself at no cost.