Fix a Frozen System with the Magic SysRq Keys

You finally got your Linux environment to crash. Ctrl+Alt+Backspace does nothing, nor do the F-keys. You know you shouldn't have installed that bad driver, but you did it anyway.

So you reach for the power button.

Stop.

Mashing in the power button to reboot could cause a problem if your hard drive is still being written to, and usually causes more problems than it solves. The Linux kernel includes a secret method of restarting your PC should it ever stop doing its job.


  1. Hold down the Alt and SysRq (Print Screen) keys.
  2. While holding those down, type the following in order. Nothing will appear to happen until the last letter is pressed: REISUB
  3. Watch your computer reboot magically.

What the individual keys do in that sequence are not as important as what it does as a whole: stops all programs, unmounts all drives, and reboots. A lot safer than just cutting the power.

Here it is again: REISUB. Remember that, as it will save you a lot of time when you are configuring a system and something gets messed up. Need a mnemonic? Try Raising Elephants Is So Utterly Boring.

As an aside, don't try this if you just want to reboot. A normal reboot, if it can be done, should always be used instead of the REISUB keys.

R-E-I-S-U-B.

Avatar for jacob Jacob Peddicord - http://jacob.peddicord.net/

Jacob is a web developer, student, and programmer from Ohio. He is a staff member at the Ubuntu Forums and is most likely a fanboy of the distribution. He loves to write in code and words, play video games, and rant about topics most would have abandoned long ago. Jacob uses GNOME and is never seen running stable software, much to the demise of his laptop.

Home » Articles »

Discussion: Fix a Frozen System with the Magic SysRq Keys

  1. Tom (guest)

    # Posted on 09 September 2007 at 02:18 AM

    I heard of this trick before at Linuxquestions.org but the poster of the tip there used the order: "Raising Skinny Elephants Is Utterly Boring"

    R gives back control of the keyboard S issues a sync E sends all processes but init the term singal I sends all processes but init the kill signal U mounts all filesystem ro to prevent a fsck at reboot B reboots the system



  2. jimmee (guest)

    # Posted on 09 September 2007 at 04:03 AM

    R E I S U B - is just the word busier in reverse.



  3. # Posted on 09 September 2007 at 04:16 AM

    [...] Reiniciar Linux en caso de bloqueo ¿Que hacer cuando se nos bloquea nuestro Linux? Si el sistema está tan colgado que no funciona la opción de Control + Alt + Backspace ni podemos mover el ratón, podemos recurrir a este curioso truco que me he encontrado en FOSSwire: [...]



  4. Lee Doyle (guest)

    # Posted on 09 September 2007 at 04:35 AM

    Great tip. Ill be sticking this to my monitor now.... Damn xubuntu always screws up on me.

    Thanks again



  5. Serge van Ginderacht (guest)

    # Posted on 09 September 2007 at 04:49 AM

    Check out Wikipedia for a full explanation: http://en.wikipedia.org/wiki/Magic_SysRq_key



  6. # Posted on 09 September 2007 at 05:06 AM

    [...] read more | digg story [...]



  7. Diabolic Preacher (guest)

    # Posted on 09 September 2007 at 05:30 AM

    when does this key combo exactly work? is there a specific option to be enabled while the kernel is compiled. where exactly are we supposed to type alt+sysrq? i'm using kde based vector linux.



  8. dusty (guest)

    # Posted on 09 September 2007 at 05:44 AM

    i'd put the sync after sending all processes the term signal to give the processes time to decide if they needed to 'finish up' any data storage. i'd also put two syncs because some systems need them both to actually commit the data to disc.



  9. Yoda Callmesome (guest)

    # Posted on 09 September 2007 at 05:46 AM

    On my (laptop) keyboard, the PRTSCN key is a function key. Therefore my sequence is ALT-Function-PRTSCN (keys at opposite ends of the keyboard) while typing R-E-I-S-U-B with my nose.



  10. dusty (guest)

    # Posted on 09 September 2007 at 05:53 AM

    @ diabolic preacher: this will work right now with your system presumably running stably. but if the system is suffering with some runaway process that makes the system unresponsive is the better time to use it.

    after doing the sysreq (alt+prtscrn) you will not see a command prompt in which to type this. will will not see any output at all, save hopefully a few flashes of the harddrive activity light after pressing the "s" of the sequence, and the machine rebooting after the "b"..



  11. Derrick (guest)

    # Posted on 09 September 2007 at 08:07 AM

    @Yoda

    I usually use a thick book to wedge the Fn button on the laptop if I need to do such a complicated sequence.



  12. niko (guest)

    # Posted on 09 September 2007 at 08:33 AM

    @ diabolic preacher

    You don't type Alt+SysRq, it's a key combination. While holding down the Alt key (should be one on either side of the SPACE bar), you press (and hold) the SysRq key. The SysRq key SHOULD be to the right of F12, above the Insert key, but could be somewhere else, depending on your keyboard layout. It may labelled "Prt Scr". See: http://en.wikipedia.org/wiki/SysRq

    Now, without letting go of either of those keys, you type R-E-I-S-U-B.



  13. Alexis (guest)

    # Posted on 09 September 2007 at 08:37 AM

    "Yoda Callmesome wrote: On my (laptop) keyboard, the PRTSCN key is a function key. Therefore my sequence is ALT-Function-PRTSCN (keys at opposite ends of the keyboard) while typing R-E-I-S-U-B with my nose."

    I'll pay if one of our helpdesk technicians do that.



  14. proales (guest)

    # Posted on 09 September 2007 at 08:58 AM

    Its so damn important that the designers of the system kept it a huge secret! Thats how critical it is that you use this method.. they thought "oh no, people will mess up their systems if they turn of the computer normaly lets hide and never mention a ultra secret method of preventing that!"



  15. solarwind (guest)

    # Posted on 09 September 2007 at 09:05 AM

    Very nice and interesting sequence. There's a lot more to the Linux kernel that meets the eye.



  16. Simon (guest)

    # Posted on 09 September 2007 at 09:06 AM

    Some keyboards are really bad at letting you press alt-sysrq-key combinations (three keys) at once. This has lead to the false notion that there is actually a "sysrq mode" -- there isn't, it's just that your keyboard forgot to send the up-event in some cases.

    If it doesn't work on some keyboards, try alt-sysrq, release sysrq and keep holding alt, and then press a letter. If it seems to get "stuck on" (any other letters pressed print a sysrq help line or do the action), press alt-sysrq again. Again, this is just a result of keyboards which use wire matricies to avoid having to run a wire to every individual key.



  17. David V (guest)

    # Posted on 09 September 2007 at 10:49 AM

    Wow, that's a great way to get a cramp in your hands in addition to the headache that you got when your system froze up. Why doesn't someone come up with a way to safe reboot that only requires you to stick half of the keyboard up your ass while typing THIS IS RIDICULOUS??? Could someone have made this anymore difficult?!



  18. OE (guest)

    # Posted on 09 September 2007 at 11:15 AM

    @ Diabolic preacher

    Yes, it's a compile time option in the kernel (CONFIG_MAGIC_SYSRQ). I don't use Vector, but I know it's based on Slackware, and CONFIG_MAGIC_SYSRQ is not set on the Slackware kernels. This might be your problem.



  19. Ricky (guest)

    # Posted on 09 September 2007 at 11:58 AM

    Actually this combo isn't too hard. People always think of pressing the keys with their main fingers... but just hold alt and print screen with your pinkies (or function with your left pinky, alt with your left ring finger, and print screen with your right pinky) and then type the letters. No big deal, really. Or you can think of a bunch of other ways to easily press the keys. I mean, it's not that hard people, just cause you have 2 hands and this is three keys...



  20. infrid (guest)

    # Posted on 09 September 2007 at 12:58 PM

    Is there an equivalent in darwin/os x?

    Would be so useful - though I must say I already doubt it as it seems like it's low level linux kernel stuff.. but I am an endless optimist, so maybe.. ;-)



  21. # Posted on 09 September 2007 at 01:03 PM

    [...] read more | digg story   [...]



  22. # Posted on 09 September 2007 at 01:15 PM

    [...] (snagged this tip via FOSSwire) [...]



  23. Steve Pearce (guest)

    # Posted on 09 September 2007 at 03:48 PM

    What a great find, thanks. I've often found my Kubuntu 7.04 box freeze over when transferring heavy amounts of files between desktop and laptop while doing work on that machine at the same time using NFS. Its a rare occasion but yeah I had to result to the power. Sometimes causing a fsck being needed.

    Again thanks, though "hopefully" we shouldn't ever need it ;)



  24. ian (guest)

    # Posted on 09 September 2007 at 04:01 PM

    err...i don't think this is going to work on gutsy gibbon as expected. rather, when the OS is running normally, the alt+prt scrn takes a screen shot. even if you're holding the function key in there, it's still going to take a screen shot as soon as you hit prnt scrn. i'm sure it works fine when you start additionally pressing the r+e+i+s+u+b keys,..not going to try it right now as i don't need it, but just wanted to let people know that if you're going to "practice" the first key combos, if you're holding them down for a few seconds, it'll open up a TON of screen capture dialog boxes...and then you MAY need to use that reisub part after all ;^)



  25. # Posted on 09 September 2007 at 04:02 PM

    [...] Credit to: FOSSwire [...]



  26. # Posted on 09 September 2007 at 04:17 PM

    [...] ALL credit to Jacob @ FOSSwire [...]



  27. ragingmon (guest)

    # Posted on 09 September 2007 at 08:14 PM

    ian is right.

    holding down Alt+SysRq in Ubuntu for a few seconds, opens up ton of screen dialogs boxes and it goes 100% processor use. then you must continue pressing the REISUB part. hehe

    btw, Im using Ubuntu Edgy.



  28. # Posted on 09 September 2007 at 08:38 PM

    <strong>Cómo reiniciar a Linux de manera segura cuando se tranca...</strong>

    Si alguna vez Linux se te tranca de tal manera que aparenta no responder ni siquiera al teclado, entonces no trates de simplemente apagarle la energía eléctrica a la máquina, porque el kernel de Linux está diseñado para esa eventualidad y hay una ...



  29. # Posted on 09 September 2007 at 09:16 PM

    [...] FOSSwire » Fix a Frozen System with the Magic SysRq Keys (tags: cool linux tips) [...]



  30. werner (guest)

    # Posted on 10 September 2007 at 05:34 AM

    There we need the gene scientists, that they make people with 3 hands



  31. # Posted on 10 September 2007 at 06:12 AM

    [...] lesser mortals might have occasional crashes.  For you there&#8217;s the Magic SysRq key.  The sequence described here will reboot a Linux box that&#8217;s locked up unless something pretty major has happened to the [...]



  32. # Posted on 10 September 2007 at 06:30 AM

    [...] calls for a series of key strokes while holding down some other keys. I suggest you pop on over to FOSSwire now to check out the full how to&#8230;. Tag cloudAside FOSS Nix [?] Share [...]



  33. Scott Cann (guest)

    # Posted on 10 September 2007 at 08:47 AM

    REISUB Do I type these as capitals or will lowercase do? ( I can just see me using my toes to get the shift in there too)



  34. T (guest)

    # Posted on 10 September 2007 at 09:17 AM

    Quit being a bunch of whiners and be glad we have the magic keys. It isnt that hard to do.



  35. # Posted on 10 September 2007 at 03:00 PM

    [...] Linux&nbsp;freezes? Filed under: Linux &#8212; 0ddn1x @ 2007-09-10 22:00:50 +0000 http://fosswire.com/2007/09/08/fix-a-frozen-system-with-the-magic-sysrq-keys/ [...]



  36. LightningCrash (guest)

    # Posted on 10 September 2007 at 06:00 PM

    I recently saved a coworker's computer via this method.

    It was definitely worth its weight in gold.



  37. # Posted on 11 September 2007 at 02:27 AM

    [...] Fix a Frozen System with the Magic SysRq Keys This is really helpful to remember. (tags: linux howto tips kernel reference hardware) [...]



  38. # Posted on 12 September 2007 at 09:20 AM

    [...] remembering this key sequence with the phrase &#8220;Raising Elephants Is So Utterly Boring.&#8221; Fix a Frozen System with the Magic SysRq Keys [...]



  39. # Posted on 12 September 2007 at 09:33 AM

    [...] FOSSwire » Fix a Frozen System with the Magic SysRq Keys [...]



  40. Diabolic Preacher (guest)

    # Posted on 12 September 2007 at 02:32 PM

    i should have mentioned the word 'pressed' instead of 'type' but i'll let y'all know what i didn't actually know.

    Now, without letting go of either of those keys, you type R-E-I-S-U-B.

    "without letting go"...didn't do it that way.

    CONFIG_MAGIC_SYSRQ is not set on the Slackware kernels. This might be your problem.

    for the time being i am using a binary kernel package and don't have the source for it. but i never knew the purpose.

    thank you dusty, niko and OE. :D

    p.s. the coloring of the sysrq text and the Fn key on the laptop being same suggests that i should be pressing Fn instead of alt. am i right? i've never used the Fn keys on linux. is it recognized?



  41. # Posted on 12 September 2007 at 03:30 PM

    [...] FOSSwire has this cool tip to restart a frozen Linux Machine. I haven&#8217;t tried it yet because I haven&#8217;t got a frozen linux machine yet. You finally got your Linux environment to crash. Ctrl+Alt+Backspace does nothing, nor do the F-keys. You know you shouldn’t have installed that bad driver, but you did it anyway. [...]



  42. # Posted on 12 September 2007 at 03:41 PM

    [...] at one time or another (or several times), I know I have. I came across a neat little article from FOSSwire that will help out in these situations. Installing a bad driver can cause utter frustration when [...]



  43. # Posted on 12 September 2007 at 09:23 PM

    [...] FOSSwire » Fix a Frozen System with the Magic SysRq Keys (tags: admin articles boot commands computer computing cool crash reference ubuntu kernel tips reboot howto linux) [...]



  44. # Posted on 13 September 2007 at 02:31 AM

    [...] Thanks god, this useful tip comes from FOSSwire.com [...]



  45. # Posted on 13 September 2007 at 03:39 AM

    [...] [via FOSSwire] [...]



  46. # Posted on 13 September 2007 at 04:51 PM

    [...] Fix a Frozen System with the Magic SysRq Keys [...]



  47. # Posted on 14 September 2007 at 12:35 AM

    [...] remembering this key sequence with the phrase &#8220;Raising Elephants Is So Utterly Boring.&#8221; Fix a Frozen System with the Magic SysRq Keys [...]



  48. # Posted on 14 September 2007 at 12:52 PM

    [...] Source &amp; Author: Jacob from FOSSwire [...]



  49. # Posted on 14 September 2007 at 01:35 PM

    [...] fosswire | [...]



  50. # Posted on 15 September 2007 at 12:56 AM

    [...] Linux: Fix a Frozen System with the Magic SysRq Keys - Hvis systemet fryser og Ctrl + Alt + Backspace ikke fungerer har FOSSwire en metode som er langt bedre en &aring; tvinge en avslutning via av-knappen, noe som kan v&aelig;re b&aring;de irriterende og fatalt for operativsystemet. [...]



  51. Anthony Lawrence (guest)

    # Posted on 15 September 2007 at 04:40 AM

    I remember this instead:

    So Everything Is Unusual - Boot!

    Alt+SysRq+s - sync the disk Alt+SysRq+e - try to nicely kill processes (wait a little bit here) Alt+SysRq+i - no more mister nice guy Alt+SysRq+u - unmount disks (wait a bit here, too) Alt+SysRq+b - reboot

    If you find holding three keys difficult, you can make SysRq "sticky": see http://aplawrence.com/Words2005/2005_04_13.html



  52. rhololkeolke (guest)

    # Posted on 15 September 2007 at 07:55 AM

    Does this work with all linux distros and desktops or just certain ones. I tried it on my laptop I held down alt+function+sys rq. While holding that down I pushed reisub. Nothing happened. Am I doing something wrong?



  53. Name: (guest)

    # Posted on 16 September 2007 at 10:37 PM

    Thanks, that's very interesting, I'm surprised I'd never heard of it before.



  54. # Posted on 18 September 2007 at 07:27 AM

    [...] FOSSwire » Fix a Frozen System with the Magic SysRq Keys.  Hmm.  Pretty interesting.  I think I&#8217;ve only had a &#8220;non-responsive Linux system&#8221; once in the past five years, but it&#8217;s good to know&#8230; [...]



  55. # Posted on 24 September 2007 at 07:47 AM

    [...] just learned a new Linux trick [...]



  56. # Posted on 03 October 2007 at 05:01 AM

    [...] read more | digg story [...]



  57. # Posted on 26 October 2007 at 05:15 AM

    [...] http://fosswire.com/2007/09/08/fix-a-frozen-system-with-the-magic-sysrq-keys/ [...]



  58. # Posted on 25 November 2007 at 02:39 AM

    [...] remembering this key sequence with the phrase &#8220;Raising Elephants Is So Utterly Boring.&#8221;Fix a Frozen System with the Magic SysRq Keys [...]



  59. # Posted on 09 January 2008 at 10:11 PM

    [...] January 10, 2008 by jaewook77 http://fosswire.com/2007/09/08/fix-a-frozen-system-with-the-magic-sysrq-keys/ [...]



  60. # Posted on 09 January 2008 at 10:14 PM

    [...] 10, 2008 by jaewook77 Fix a Frozen System with the Magic SysRq Keys by Jacob on 8 Sep 2007 in Tips &amp; [...]



  61. William (guest)

    # Posted on 17 January 2008 at 03:59 PM

    Just a note, I always try and ssh into a frozen system and reboot remotely before issuing the REISUB command.

    If just the "Desktop" is frozen sometimes you can CTRL-ALT-BACKSPACE to restart X Windows. If the windows environment is always freezing you can CTRL-ALT-F1 to drop to a command line interface. Once you've fixed the issue you can get back to the windows environment by pressing CTRL-ALT-F7.

    CTRL-SysReq REISUB is always the last resort of last resorts.



  62. # Posted on 10 February 2008 at 10:28 AM

    [...] löytyi myös aika läheltä liippaava säie ja lisäksi toisesta säikeestä vinkkilinkki: Alt + SysRq (Print Screen) + R E I S U B (kirjaimet näppäillään yksi toisensa jälkeen) käynnistää tietokoneen uudestaan [...]



  63. # Posted on 29 February 2008 at 06:21 AM

    [...] lo lei en El Webmaster k lo leyo en Bocabyte k lo leyo en Fosswire [...]



  64. # Posted on 05 March 2008 at 07:54 PM

    [...] Wikipedia: Magic SysRq Key Fosswire: Fix a Frozen System with the Magic SysRq Keys [...]



  65. # Posted on 15 March 2008 at 02:01 PM

    [...] via Digg and FOSSwire [...]



  66. # Posted on 15 March 2008 at 07:45 PM

    [...] Visto en FossWire [...]



  67. # Posted on 25 March 2008 at 12:22 AM

    [...] FOSSwire » Fix a Frozen System with the Magic SysRq Keys The Linux kernel includes a secret method of restarting your PC should it ever stop doing its job. [...]



  68. # Posted on 02 April 2008 at 01:40 AM

    [...] go find us some lentils&nbsp;yonder When it comes to rebooting a frozen Linux system, QWERTY keyboard users have it easy; spell &#8220;busier&#8221; backwards or simply raise some elephants. [...]



  69. # Posted on 11 May 2008 at 05:25 PM

    [...] to own things like ATi graphic cards&#8230;), you can unfreeze back into the world of the living, without the (hard) reset button! [...]



  70. # Posted on 02 June 2008 at 06:23 AM

    [...] principal: Fosswire RSS Filed under: Trucos [...]



  71. # Posted on 04 June 2008 at 03:40 PM

    [...] principal: Fosswire RSS Filed under: Trucos [...]



  72. Kinox (guest)

    # Posted on 29 September 2008 at 06:09 AM

    To be doubly safe, I do RSEISUB. :)



  73. nix (guest)

    # Posted on 08 December 2008 at 10:39 AM

    Just some other additional notes: alt+print screen + REISUB = reboot alt+print screen + REISUO = shutdown

    PS: To the commenter that asked if you have to use shift? No.



  74. # Posted on 18 February 2009 at 06:42 PM

    [...] FOSSwire » Fix a Frozen System with the Magic SysRq Keys [...]



  75. Shazni (guest)

    # Posted on 26 February 2009 at 04:48 AM

    Awesome!. This is what I was looking for.Great thing to know.But I don't know why that any linux related books or documents openly state about such an important tip.



Home » Articles » Fix a Frozen System with the Magic SysRq Keys

Sign In