What You Need To Know About Linux’s Magic SysRq Key

The magic SysRq key can help you deal with a frozen and unresponsive system. It avoids doing a hard reboot along with, hopefully, avoiding potential loss of data. The SysRq key is actually a handy bit of knowledge to keep handy.

NOTE: The information in this article is for those who use the QWERTY keyboard. If you use Dvorak, AZERTY, etc., be sure to click the link in the opening paragraph because it will be different for you.

There are times when your system appears frozen but it actually isn’t. You can test this situation with the Shift Lock key. If the light (assuming you have one) comes on, the system isn’t technically frozen – it’s probably just not accepting inputs. But, if it’s so far gone that the light doesn’t change then it’s possible that this will not work.

There are all sorts of reasons why your system may appear to have halted. This article has nothing to do with that, nor is it about preventing a frozen session. It’s about using the magic SysRq key to get out of a situation where your system has stopped responding. 

The purpose, at least as far as this article is concerned, is to reboot without corrupting your data. This gives you a tidier reboot that reduces the risk of data loss. It’s quick and easy to learn and memorize.

The SysRq Key:

Look at your keyboard. Look carefully. The key we’re looking for is the ‘SysRq‘ key. You may not know why it is there, and may think it has no purpose, but it’s there and there for a reason.

The key is often doubled with the PrtScr (print screen) and doesn’t get used often. It’s used in combination with the Alt. If you’re using a keyboard with an Fn, you don’t normally need to use it to perform this keyboard function. Look around your keyboard and you should find the SysRq key. It’s bound to be there somewhere!

What you’re going to learn and is ‘REISUB’. This is easy to remember, because it’s ‘BUSIER’ backwards. When your computer is no longer responding, press (and hold) Alt, while holding SysRq, and then press R E I S U B in order shut everything down properly and reboot without (or with less chance of) data loss.

You can try it right now. However, you’re going to reboot if you do so. Leave about a second between each keypress.

You don’t actually need to use all the letters. If you give zero poops about data loss, you can go straight to Alt + SysRq +​ B​. But, that’s not giving the system the chance to perform all the shutdown processes.

If you want to (hopefully) not lose data, use REISUB. This is what those letters do:

R puts keyboard in raw mode.
E sends SIGTERM (except init).
I sends SIGKILL (except init).
S syncs mounted filesystems.
U (read-only) remount of mounted filesystems.
B reboots the system immediately.

Those should reboot the system for you, after sending all the other commands. Again, it’s easily remembered as being ‘BUSIER’ backwards and you should press them immediately after one another, allowing a second between each.

Closure:

This makes yet another article in the books, and now you know how to reboot your system when it is frozen. The magic SysRq key works well enough, even though there are some situations where it won’t work. A computer can be so frozen that it’s no longer accepting any input at all. It works well up until you’ve reached that point.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.