How to turn off our Mac using Terminal – Guide

The shutdown timer feature on my television used to help me sleep. Now, I keep a season or two of The Office, Rick and Morty or The Sopranos on Google Drive to put me to sleep.

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”

Shutting down your Mac from the command line is easy with the “-h” property. Just type “sudo shutdown -h now” and your Mac will ask for the password and automatically process the shutdown. ..

Schedule the shutdown of our Mac in XX minutes from the command line

To configure your Mac to shut down after 30 minutes, use the now command with the +30 option. ..

Shut down our Mac from Terminal using «halt»

Another way to shutdown our Mac is to use the “halt” command. This command will shut down our Mac as if it were a computer system that was running in “halt” mode.

Final note

How to turn off our Mac using Terminal If you’re ever faced with a problem on your Mac that you can’t solve, or if you just want to be able to use your computer without any problems, then you need to know how to turn off our Mac using Terminal. In this guide, we’ll show you how to do just that. First of all, open up Terminal and type in the following command: /usr/sbin/shutdown -h now