How to cancel shutdown on Linux? [closed] How to cancel shutdown on Linux? [closed] unix unix

How to cancel shutdown on Linux? [closed]


shutdown -c  is "cancel shutdown" on reasonably recent shutdowns.

The syntax also supports shutdown -c <message> for announcement purposes, so that's handy if other people use the machine.


You can use  ps  to find the shutdown process and abort it, for example with ps|grep shutdown.

Alternate and less eyeball-intensive versions of this:

pkill shutdownkillall shutdownkill `cat /var/run/shutdown.pid`


If you're a second late on the draw for shutdown -c, and already root on the console, a very fast # init 5 will cancel a shutdown after init changes runlevel.

NOTE: This answer is mostly obsolete now. init 5 isn't very useful on systemd, which, sadly, most systems now use.