0

I use Fedora 25 with Xfce. So I want to shutdown my PC using a timer. I use:

shutdown -P 30

But the PC will power off even if I am still working. How can I send a warning that the PC will be shutdown in 1 minute?

shutdown -P 30 and somethig else?

What can I do?

2
shutdown -P +1

The above command will schedule a system shutdown for one minute from its execution, and will send a warning using wall to all terminals with a logged in shell. To alter the message accompanying the warning, use:

shutdown -P +1 "Your Message Here"

The 30 you specified in your command schedules a shutdown (with periodic warnings) for 30 minutes from the time you execute the command; since you asked for a one minute delay in your question, that is what I used in the above examples.

shutdown will issue the warnings immediately upon execution, as well as at intervals approaching the scheduled shutdown (e. g. at one hour, five minutes, one minute, and immediately).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.