Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to shutdown timer using Terminal/cmd on windows 10 and Linux & Mac OSX

Initial Steps

*1) Press Windows Key + R. *2) Enter CMD and press Enter.

Execute it

Write command in the cmd:

shutdown /s /t 3600

OR

shutdown -s -t 3600

This command will shutdown your windows pc in one hour, or 3600 second which I specified in example above. You can change it as you need! It's simple.

More details:

Text Action
-s Shutdown and Power off the computer
-c "Comment" Add a comment
-t xx Time before shutdown
-a Abort

Example:

SHUTDOWN -s -c "Ha Ha, I Shut Down your computer!!!!" -t 60

That will Turn your computer off in 60sec and display the message. WARNING: After you start this, you can not stop it!!!! (unless you know how..... -a |Abort ;) )


On Unix/Linux/Mac OSX

On the terminal you should type:

e.g. to reboot the machine immediately

sudo shutdown -r now

e.g. to shutdown the machine in 60 minutes

sudo shutdown -h +60

More details here.

Written with StackEdit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment