Skip to content

Magic "SysRq" commands in Linux

The System Request key, "SysRq" in English keyboards ("Pet Sis" in Spanish ones, short for "Petición de Sistema") is the "seemingly useless" key sitting right next to your "Pause" key (also "seemingly useless").

However, this key plays an important role for a Linux System administrator, because it can be used to send system calls directly to the kernel. Sometimes, speaking directly to the kernel is the only way to save the day.

For example... imagine that suddenlty your whole system hangs. It's frozen... there's some process using 100% of the resources of the system.. your mouse doesn't move.. the Control+Alt+F2 key doesnt work... you can't do anything! Arghh!! what to do!!??

In Windows the only possible solution to this situation would be to forcefully disconnect your PC, make it loose any data you had sent and take the risk to damage your hard disk, motherboard, CPU and all the hardware that you were using at that time.

However, if you are using the Linux kernel, there's still some chance for salvation.... sending a System Request...

  • Press AltGr+SysRq+R (unRaw, releasing your keyboard from X control)
  • Press AltGr+SysRq+E (tErminate, sending a SIGTERM to close gracefully the running programs)
  • Press AltGr+SysRq+I (kIll, send a SIGKILL to inmediatelly close the remaining programs)
  • Press AltGr+SysRq+S (Sync, saving the data to the disk so that you won't loose the last changes)
  • Press AltGr+SysRq+U (Unmount all the disks, so that they won't be damaged)
  • Press AltGr+SysRq+B (reBoot the system)

Mnemonics ​

If you are like me, you'll forget this shortcuts easily. You can do like me, and write a post about it... or try to remember it by using some hints. Here are some of them:

  • "Reboot Even If System Unbelievably Broken"
  • "BUSIER" backwards
  • "Raising Elephants Is So Utterly Boring"

You can also Sync the disks before terminating programs if you want:

  • "Raising Skinny Elephants Is Utterly Boring" (because if they are fat it would rather be utterly deadly...)

Note: if you are not using a QWERTY keyboard the keys can be different for you You can also read more about other SysRq shorcuts here: https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html

Personal page