Forcing Linux To Shutdown Or Reboot

shutdown -r NOW
halt
reboot

not working for you?

To force a shutdown:

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

And for a reboot:

echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger


Thanks to Nasser Heidari for the tip.

Tagged with:
Posted in Command Line Tricks, Servers, Tech Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>