3

For a long a long time its been a problem for me (the human) to go to sleep early. A part of the problem is definitely that I often been to long by the computer at night I mess up my day rhythm and my life.

How can I solve this I would love to tell my computer to turn of at a certain time of the day? And give me a count down and be able to turn on again if I really need to turn it on afterwards and then be put to sleep again. Is there a thing like that?

I found this but I don't know how to implement it. I'm a bit noob at Linux.

muru
  • 207,228

2 Answers2

4

the easiest way would be through the command line:

try sudo shutdown -P 60 to shut down the machine in 60 minutes.

Alternatively you could set a time to shut down, using 24h format. For example sudo shutdown -P 1:00 will shut down the machine at 1:00 AM in the morning.

sudo shutdown -P now will shut down the CPU right away, e.g. now.

Hope that helps.

BenjB
  • 223
2

This also works: with the -h option:

sudo shutdown -h 17:00 "Shutting down my Linux."

Here is the output:

Broadcast message from maestro@maestro-5567
    (/dev/pts/10) at 15:28 ...

The system is going down for halt in 92 minutes!
Shutting down my Linux. 
TheWanderer
  • 19,525
  • 12
  • 52
  • 65
JLM
  • 21