Friday, July 18, 2008

Magic Keys (Alt + SysRq)


When your Linux install completely refuses to respond and no amount of coaxing and cajoling brings it back to life you can try -
  • Alt + SysRq + k
This will kill all running programmes and will drop you back to the login screen.

Even this fails? The try this -

  • Alt + SysRq + r + e + i + s + u + b
This is easy to remember with the help of the mnemonic "Raising Elephants Is So Ultra Boring".

Explanation -
  • Alt + SysRq + r = raw keyboard mode
  • Alt + SysRq + e = ends all programmes
  • Alt + SysRq + i = kills all programmes that did not terminate nicely
  • Alt + SysRq + s = syncs the disks
  • Alt + SysRq + u = remounts all filesystems as read-only
  • Alt + SysRq + b = reboots
But for this to work two things are required
  1. Your kernel must support magic keys
  2. The following line must be appended to /etc/sysctl.conf
  • kernel.sysreq=1
So when your Linux box simply refuses to respond (yes, even a Linux box does sometimes act up), you can safely tide over the situation if you follow these instructions.

No comments: