Force Linux to reboot

How to force Linux to reboot when the reboot command does not work.

asked Jul 23, 2013 by anonymous

1 Answer

Best answer

Enable the use of the magic SysRq option:

# echo 1 > /proc/sys/kernel/sysrq

Reboot the machine:

# echo b > /proc/sysrq-trigger
answered Jul 23, 2013 by anonymous

Even if you could not log on the system but sshd is working, you can force the Linux to reboot by:

ssh root@server_home \
'echo 1 > /proc/sys/kernel/sysrq; echo b > /proc/sysrq-trigger'
commented May 6, 2014 by Eric Z Ma (44,280 points)

You can find a list of all the SysRq commands at:

For example, shut off a system by 'o', invoke OOM killer by 'f'.

commented Jul 30, 2015 by Eric Z Ma (44,280 points)

If you want to force Linux to shut down, use o instead of b:

echo 1 > /proc/sys/kernel/sysrq; echo o > /proc/sysrq-trigger
commented Dec 11, 2016 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost