Magic Tricks To Get Out of Trouble With the Sysreq Key
Restore, Kill, Sync, and More
December 17, 2008
The SysReq key is hidden up the top right of your keyboard, and looks a bit
like a relic from a former era of computing. (Which, indeed, it is.) But
there's a bunch of things you can still do with it that may come in
handy. Note that this is documented only on i386 on Linux, and you need your kernel to
have been compiled with the "Magic SysRq Key" option. Find out if it has been
by looking at /proc/sys/kernel/sysrq ��� if it exists and contains
the value 1, all possible requests are allowed.
Press Alt-Sysreq, then one of the following letters:
Unraw: Restores the keyboard after an X crash or
Changes console loglevel to 0 and so reduces
System attention key: Kills all processes on the current
Terminate: Kills all processes except init on the current
Kill: Kills all processes except init, everywhere.
Sync: Attempts to sync all mounted filesystems. Outputs OK
and Done when it's managed. This can reduce the chances of needing to
run fsck at a later stage so it can be useful if you're having
Umount: Attempts to remount all mounted filesystems
Reboot: immediately reboots the system without syncing or
unmounting disks. Not a good idea unless in extremis! This may
lead to data loss.