< Back to index

The magic SysRq key is a key combination in the Linux kernel which allows
the user to perform various low level commands regardless of the system's
state using the SysRq key. It is often used to recover from freezes, or to
reboot a computer without corrupting the filesystem.

The key combination consists of Alt, SysRq and another key,
which controls the command issued:

* k kills all processes on the current virtual console (and thus can be used to kill X and svgalib programs). This was originally designed to imitate a Secure Access Key.

* b immediately reboots the system, without unmounting partitions or syncing.

* c reboots kexec and outputs a crashdump.

* o shuts off the system.

* s attempts to sync all mounted filesystems.

* u attempts to remount all mounted filesystems in read-only mode.

* p outputs the current registers and flags to the console.

* t outputs a list of current tasks and their information the the console.

* m outputs current memory information to the console.

* v outputs Voyager SMP processor information.

* 0 through 9 sets the console log level, which controls the types of kernel messages that are output to the console.

* e sends the SIGTERM signal to all processes except init (PID 1).

* i sends the SIGKILL signal to all processes except init.

* l sends the SIGKILL signal to all processes, including init.

* h, or any key which is not bound to a command, outputs a terse help document to the console.

The feature is controlled both by a compile-time option in the kernel
configuration, CONFIG_MAGIC_SYSRQ, and a sysctl kernel parameter,
kernel.sysrq. Some distributions only enable the compile-time option, while
others, such as Ubuntu, enable the feature by default.

Raising Skinny Elephants Is Utterly Boring


"Raising Skinny Elephants Is Utterly Boring" is a mnemonic device for remembering a particularly important keystroke sequence for SysRq:
* R takes the keyboard out of raw mode
* S synchronizes the disk
* E terminates all processes (Except init)
* I kills all processes (Except init)
* U remounts all filesystems read-only
* B reboots the machine
This entry uses material from from Wikipedia, the leading user-contributed encyclopedia. It is licensed under the GNU Free Documentation License. Disclaimer.