Uses
A common use of the magic SysRq key is to perform a safe reboot of a Linux computer which has otherwise locked up. This can prevent a fsck being required on reboot and gives some programs a chance to save emergency backups of unsaved work. The QWERTY (or AZERTY) mnemonics: "Raising Elephants Is So Utterly Boring", "Reboot Even If System Utterly Broken" or simply the word "BUSIER" read backwards, are often used to remember the following Sysrq-keys sequence:
unRaw (take control of keyboard back from X), tErminate (send SIGTERM to all processes, allowing them to terminate gracefully), kIll (send SIGKILL to all processes, forcing them to terminate immediately), Sync (flush data to disk), Unmount (remount all filesystems read-only), reBoot.- Hold down the Alt and SysRq (Print Screen) keys.
- While holding those down, type the following keys in order, several seconds apart: REISUB
- Computer should reboot.
In practice, each command may require a few seconds to complete, especially if feedback is unavailable from the screen due to a freeze or display corruption.
When magic SysRq keys are used to kill a frozen graphical program, the program has no chance to restore text mode. This can make everything unreadable. The commands textmode
(part of SVGAlib) and reset
can restore text mode and make the console readable again.
On distributions that do not include a textmode
executable, the key command 'Ctrl'+'Alt'+'F1' may sometimes to force a return to a text console. (Use 'F1', 'F2', 'F3', ..., 'F(n)', where 'n' is the highest number of text consoles set up by the distribution. 'Ctrl'+'Alt'+ 'F(n+1)' would normally be used to reenter GUI mode on a system on which the X server has not crashed.)
Read more about this topic: Magic Sys Rq Key