强制删除linux
How to force Linux to reboot when the reboot
command does not work.
当reboot
命令不起作用时,如何强制Linux重新reboot
。
Enable the use of the magic SysRq option:
启用魔术SysRq选项:
# echo 1 > /proc/sys/kernel/sysrq
Reboot the machine:
重新启动机器:
# echo b > /proc/sysrq-trigger
Even if you could not log on the system but sshd is working, you can force the Linux to reboot by:
即使您无法登录系统但sshd仍在运行,也可以通过以下方式强制Linux重新启动:
ssh root@server_home
'echo 1 > /proc/sys/kernel/sysrq; echo b > /proc/sysrq-trigger'
You can find a list of all the SysRq commands at:
您可以在以下位置找到所有SysRq命令的列表:
https://en.wikipedia.org/wiki/Magic_SysRq_key
https://zh.wikipedia.org/wiki/Magic_SysRq_key
For example, shut off a system by ‘o’, invoke OOM killer by ‘f’.
例如,通过“ o”关闭系统,通过“ f”调用OOM杀手。
If you want to force Linux to shut down, use o
instead of b
:
如果要强制关闭Linux,请使用o
代替b
:
echo 1 > /proc/sys/kernel/sysrq; echo o > /proc/sysrq-trigger
强制删除linux