Home > OS >  How to make a linux pc go to sleep after a period of time?
How to make a linux pc go to sleep after a period of time?

Time:04-23

I'm running an Arch Linux KDE PC, and I like to listen to calming music before sleeping.

What command/script that I can run on my PC to make the device go to sleep (Or shutdown) after a period of time?

Example: Shutdown in 1.5h OR Sleep in 1.5h

CodePudding user response:

To shutdown, use the relative format ( m) and schedule a shutdown in a defined number of minutes from the time you run the command. The command syntax is:

sudo shutdown  m

For example, to shut down the system in 20 minutes, run:

sudo shutdown  20
  • Related