Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to catch or stop a Linux shut down after a reboot, halt or shutdown command has been entered?

sudo shutdown -r +10

I should now have 10 minutes before the computer shuts down. If I change my mind and decide that I still want to continue running, how could I stop the shut down?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted
sudo shutdown -c

This will cancel a scheduled shutdown. You don't have to run it in the same terminal as the original shutdown request.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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