How to shutdown your computer in a desired time



Do you sometimes watch a movie or listen to music on your computer before sleeping? Well, I do and pretty often I fall asleep. My poor computer keeps playing on until morning wasting electricity. The obvious solution is to set a shutdown timer via terminal with the shutdown command. For users who are not very well versed in handling the command line my tutorial might be useful.


Windows users can use the command shutdown /s /t 3600 to initiate the shutdown in 60 minutes. If you want to initiate the shutdown in 120 minutes you'll need to add 7200 seconds instead of 3600.
There is also a cool chrome extension for Windows that can simplify this process.

Mac users need to use the command sudo shutdown -h +60 to initiate the shutdown in 60 minutes. For 120 minutes you should add +120.