Table of Contents
This tip is about the how to turn off our Mac using Terminal. So read this free guide, How to turn off our Mac using Terminal step by step. If you have query related to same article you may contact us.
How to turn off our Mac using Terminal – Guide
I grew up up loving the shutdown timer feature on my television. I used to use diffuse TV until I heard some program at dawn, often I couldn’t sleep. Things haven’t changed much since then: I still keep a season or two of The Office, Rick and Morty or The Sopranos on Google Drive to put me to sleep.
But I recently started watching Twitch streamers when they hit the sheets and unlike a standard episode these guys can go on for hours which means my laptop will stay for hours. At a certain point it becomes more of a sleep disorder than a sleep aid – so much so that I start to miss the good old shutdown timer. Unfortunately, Macs don’t come with a built-in shutdown timer app. There is a schedule feature from Energy Saver, but personally I find it very boring to use. But don’t worry – there’s an easy way to set it up.
Shut down our Mac from the command line with “shutdown”
The shutdown command allows us to shut down our Mac from the command line using the “-h” property along with the word “now” so that the Mac will ask for the password and automatically process the shutdown. The complete command to be able to shut down our Mac from the command line is: sudo shutdown -h now
Schedule the shutdown of our Mac in XX minutes from the command line
As we saw in the previous section, using the now command we can directly shut down our Mac from the Terminal. But if we change the “now” property to +30, we will configure our Mac to shut down after 30 minutes. The complete command to schedule our Mac to shut down in 25 minutes would be: sudo shutdown -h +25
Shut down our Mac from Terminal using «halt»
Another command that we can use to shut down our Mac is “halt”, a command with which our Mac will shut down directly as in the first option I showed you in this article. The full command would be: sudo halt
Final note
I hope you like the guide How to turn off our Mac using Terminal. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.