So your Linux box has locked up and you can’t get a response… step in SysRq!

This wonderful key is on most keyboards and i bet you’ve hit it a low more times than you realise as it’s usually paired up with the PrtSc (PrintScreen) key. What does it do?

Well it allows you to send system requests to a linux kernel, effectively allowing you to bypass the usual GUI/CLI layers.

Unfortunately to be able to utilise this magic key it has to be compiled into the kernel with the following option enabled CONFIG_MAGIC_SYSRQ. The good news is that the majority of kernels have this option enabled but from a security point of view maybe this isn’t a good thing.

Alt + SysRq + [YourChoice] are the magic key presses required. Shown in the below table are the usual steps you should take to try to rescue a Linux system:

unRaw - Force any application with keyboard/mouse control to give it back to you
tErminate - send SIGTERM to all processes
kIll - send SIGKILL to all processes
Sync - send remianing data buffers to disk
Unmount  - remount all filesystems read-only
reBoot - finally a reboot

And the way i remember this is BUSIER backwards.

Leave a Reply