How to power off Ubuntu and restart after x seconds automatically

Published: 06 April 2020
on channel: PaBlo Tech
474
7

Most of you don't power off their PC when it's not in use. That waste a lot of energy. With 'rtcwake' you can power off your PC for e.g. 2 hours or more and after that time has expired the machine starts up as regular. So If you know you don't use you PC from 11PM till 8AM, you can add entry to your crontab which powers the machine off at 11PM and automatically up after 9 hours.

Command:
$~ sudo rtcwake -m off -s [delay-in-seconds]

Ressources:
http://manpages.ubuntu.com/manpages/b...
https://en.wikipedia.org/wiki/Advance...