Emergency Reboot/Power off

I posted it before on an old blog but I thought I would put it here. Nowadays most machines run as VM’s so it is not an issue to reboot them but just in case you have physical server that you do not have access to or it is stuck in a server room.

You can force an immediate reboot with the following:

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

For an immediate power off

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