fosswire » fix a frozen system with the magic sysrq keys
fosswire » fix a frozen system with the magic sysrq keys
enter your search terms
submit search form
web
fosswire
all
apps
games
news
programming
tips & tutorials
welcome to fosswire, a blog about free and open source software. fosswire offers news, tutorials, and articles for the open-sourced individual and/or enterprise.
about fosswire
fosswire archives
advertise
subscribe via email
fosswire chat
advertise here
top postsspeed up amarok with mysqlpeter describes how using mysql with amarok can give your player a performance boost.installing sun java on linuxpeter walks you through the process of installing sun java on a linux system from the self-extracting installer available from sun's website.my server backup solutionpeter shares his personal backup solution to save your pc.tagsbooks
bsd
cli
desktop effects
development
drm
dual boot
enterprise
fedora
firefox
foss on mac
foss on windows
foss politics
fosswire
fosswire news
fsf
fundamentals
gnome
gnu
gui
hardware
interoperability
interviews
kde
licensing/legal
links
linux
lists
mainstream adoption
moodle
multimedia
openoffice.org
opinion
podcasts
pre-release
reference
releases
reviews
screencasts
screenshots
security
server
virtualisation
vle
web
today at
fix a frozen system with the magic sysrq keys
by jacob on 8 sep 2007 in tips & tutorials
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.
hold down the alt and sysrq (print screen) keys.
while holding those down, type the following in order. nothing will appear to happen until the last letter is pressed: reisub
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.
like this article? subscribe to fosswire now (via email and in your feed reader) - it's free, easy and safe, and you'll stay updated with all the latest news, tutorials and articles!
comments (57) to “fix a frozen system with the magic sysrq keys”
comments may be delayed.
tom wrote:
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
# posted on 09-sep-07 at 2:18 am
jimmee wrote:
r e i s u b - is just the word busier in reverse.
# posted on 09-sep-07 at 4:03 am
reiniciar linux en caso de bloqueo wrote:
[…] 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: […]
# posted on 09-sep-07 at 4:16 am
lee doyle wrote:
great tip. ill be sticking this to my monitor now…. damn xubuntu always screws up on me.
thanks again
# posted on 09-sep-07 at 4:35 am
serge van ginderacht wrote:
check out wikipedia for a full explanation:
http://en.wikipedia.org/wiki/magic_sysrq_key
# posted on 09-sep-07 at 4:49 am
techhairball.com » blog archive » fix a frozen system with the magic sysrq keys wrote:
[…] read more | digg story […]
# posted on 09-sep-07 at 5:06 am
diabolic preacher wrote:
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.
# posted on 09-sep-07 at 5:30 am
dusty wrote:
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.
# posted on 09-sep-07 at 5:44 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.
# posted on 09-sep-07 at 5:46 am
dusty wrote:
@ 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”..
# posted on 09-sep-07 at 5:53 am
derrick wrote:
@yoda
i usually use a thick book to wedge the fn button on the laptop if i need to do such a complicated sequence.
# posted on 09-sep-07 at 8:07 am
niko wrote:
@ 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.
# posted on 09-sep-07 at 8:33 am
alexis wrote:
“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.
# posted on 09-sep-07 at 8:37 am
proales wrote:
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!”
# posted on 09-sep-07 at 8:58 am
solarwind wrote:
very nice and interesting sequence. there’s a lot more to the linux kernel that meets the eye.
# posted on 09-sep-07 at 9:05 am
simon wrote:
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.
# posted on 09-sep-07 at 9:06 am
david v wrote:
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?!
# posted on 09-sep-07 at 10:49 am
oe wrote:
@ 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.
# posted on 09-sep-07 at 11:15 am
ricky wrote:
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…
# posted on 09-sep-07 at 11:58 am
infrid wrote:
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..
# posted on 09-sep-07 at 12:58 pm
fix a frozen system with the magic sysrq keys « irrevocable stuff wrote:
[…] read more | digg story […]
# posted on 09-sep-07 at 1:03 pm
howto: raising skinny elephants is utterly boring… at femtolicious wrote:
[…] (snagged this tip via fosswire) […]
# posted on 09-sep-07 at 1:15 pm
steve pearce wrote:
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
# posted on 09-sep-07 at 3:48 pm
ian wrote:
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 ;^)
# posted on 09-sep-07 at 4:01 pm
dirty alpha » blog archive » alt and sysrq and reisub wrote:
[…] credit to: fosswire […]
# posted on 09-sep-07 at 4:02 pm
dirty alpha » blog archive » alt and sysrq and reisub wrote:
[…] all credit to jacob @ fosswire […]
# posted on 09-sep-07 at 4:17 pm
ragingmon wrote:
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.
# posted on 09-sep-07 at 8:14 pm
:: eliax blog - para mentes curiosas... :: wrote:
cómo reiniciar a linux de manera segura cuando se tranca…
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 …
# posted on 09-sep-07 at 8:38 pm
links for 2007-09-10 « donghai ma wrote:
[…] fosswire » fix a frozen system with the magic sysrq keys (tags: cool linux tips) […]
# posted on 09-sep-07 at 9:16 pm
werner wrote:
there we need the gene scientists, that they make people with 3 hands
# posted on 10-sep-07 at 5:34 am
this might be helpful « some random words wrote:
[…] lesser mortals might have occasional crashes. for you there’s the magic sysrq key. the sequence described here will reboot a linux box that’s locked up unless something pretty major has happened to the […]
# posted on 10-sep-07 at 6:12 am
raising skinny elephants is utterly boring at delusions of grandeur wrote:
[…] 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…. tag cloudaside foss nix [?] share […]
# posted on 10-sep-07 at 6:30 am
scott cann wrote:
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)
# posted on 10-sep-07 at 8:47 am
t wrote:
quit being a bunch of whiners and be glad we have the magic keys. it isnt _that_ hard to do.
# posted on 10-sep-07 at 9:17 am
linux freezes? « 0ddn1x: tricks with *nix wrote:
[…] linux freezes? filed under: linux — 0ddn1x @ 2007-09-10 22:00:50 +0000 http://fosswire.com/2007/09/08/fix-a-frozen-system-with-the-magic-sysrq-keys/ […]
# posted on 10-sep-07 at 3:00 pm
lightningcrash wrote:
i recently saved a coworker’s computer via this method.
it was definitely worth its weight in gold.
# posted on 10-sep-07 at 6:00 pm
links for 2007-09-11 « geek notes wrote:
[…] fix a frozen system with the magic sysrq keys this is really helpful to remember. (tags: linux howto tips kernel reference hardware) […]
# posted on 11-sep-07 at 2:27 am
linux tip: gently restart a frozen system · techblogger wrote:
[…] remembering this key sequence with the phrase “raising elephants is so utterly boring.” fix a frozen system with the magic sysrq keys […]
# posted on 12-sep-07 at 9:20 am
restart properly : buffer overflow wrote:
[…] fosswire » fix a frozen system with the magic sysrq keys […]
# posted on 12-sep-07 at 9:33 am
diabolic preacher wrote:
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.
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?
# posted on 12-sep-07 at 2:32 pm
reboot your frozen linux machine–krishwords wrote:
[…] fosswire has this cool tip to restart a frozen linux machine. i haven’t tried it yet because i haven’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. […]
# posted on 12-sep-07 at 3:30 pm
linux: quick little key command for a frozen system. « kylistah’s weblog wrote:
[…] 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 […]
# posted on 12-sep-07 at 3:41 pm
steve miller’s web sites of interest » links for 2007-09-13 wrote:
[…] 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) […]
# posted on 12-sep-07 at 9:23 pm
how to restart a frozen system? | my linux way wrote:
[…] thanks god, this useful tip comes from fosswire.com […]
# posted on 13-sep-07 at 2:31 am
senshi’s weblog » alt+sysrq wrote:
[…] [via fosswire] […]
# posted on 13-sep-07 at 3:39 am
digg “linux nation” for thursday september 13th 2007 | fsckin w/ linux wrote:
[…] fix a frozen system with the magic sysrq keys […]
# posted on 13-sep-07 at 4:51 pm
linux tip: gently restart a frozen system at aoortic! dot com wrote:
[…] remembering this key sequence with the phrase “raising elephants is so utterly boring.” fix a frozen system with the magic sysrq keys […]
# posted on 14-sep-07 at 12:35 am
sathya says » blog archive » fix a frozen system with the magic sysrq keys wrote:
[…] source & author: jacob from fosswire […]
# posted on 14-sep-07 at 12:52 pm
diario de un linux3ro » reiniciar linux en caso de bloqueo wrote:
[…] fosswire | […]
# posted on 14-sep-07 at 1:35 pm
leif dalands blogg - it & produktivitet » del.icio.us: ukens anbefalte lenker wrote:
[…] 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 å tvinge en avslutning via av-knappen, noe som kan være både irriterende og fatalt for operativsystemet. […]
# posted on 15-sep-07 at 12:56 am
anthony lawrence wrote:
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
# posted on 15-sep-07 at 4:40 am
rhololkeolke wrote:
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?
# posted on 15-sep-07 at 7:55 am
name: wrote:
thanks, that’s very interesting, i’m surprised i’d never heard of it before.
# posted on 16-sep-07 at 10:37 pm
thak’s cool links » magic sysrq keys wrote:
[…] fosswire » fix a frozen system with the magic sysrq keys. hmm. pretty interesting. i think i’ve only had a “non-responsive linux system” once in the past five years, but it’s good to know… […]
# posted on 18-sep-07 at 7:27 am
blendor » restart linux without the power button wrote:
[…] just learned a new linux trick […]
# posted on 24-sep-07 at 7:47 am
fix a frozen system with the magic sysrq keys « linux and unix top news wrote:
[…] read more | digg story […]
# posted on 03-oct-07 at 5:01 am
mika hynnä » blog archive » reisub pelastaa wrote:
[…] http://fosswire.com/2007/09/08/fix-a-frozen-system-with-the-magic-sysrq-keys/ […]
# posted on 26-oct-07 at 5:15 am
post a comment
name: *required
email: *required (never published)
website:
message:
your comments may take a few minutes to appear.
ready?
© 2006-2007 fosswire and each post's respective author. / designed by van patten digital media.
Acceuil
suivante
fosswire » fix a frozen system with the magic sysrq keys Windows Vista Team Blog : Partners helping fix Vista Software ... Objet Publicitaire : Magnet Magic fix - ALB01.com Indonesia's three divas fix the nation's finances International ... Rob Galbraith DPI: EOS-1D Mark III sub-mirror fix announced in USA ... KompoZer - Easy web authoring Mr. Fix It (2006) XML.com: Using XSLT to Fix Swing [Profil de fix] OverBlog - Le blog des blogs Fix Your Money Screw-Ups - Kiplinger.com frontline: the wall street fix PBS Portail Internet de la Haute Autorité de santé - H-FIX PDS Your Freebie Fix - All the latest Freebies, Coupons and Online Deals はてなブックマーク - FIX Bug Fix Weekend finished :: pnCommunity :: Support at your fingertips Windows Mobile 5.0 Fix Site - Home Tena Fix - Incontinence Google to fix blog noise problem The Register BBC/OU Open2.net - Can Gerry Robinson Fix The NHS? Two charged with hacking PeopleSoft to fix grades - Network World Bike Shop Frederick, Maryland Bike Repairs, Bike Sales --BICYCLE ... Object Fix Zip - Freeware for repairing damaged ZIP archives with ... Ajaxian » IE’s Memory Leak Fix Greatly Exaggerated IPython fix for Leopard - O'Reilly ONLamp Blog Fix all Ajax cross-browser problems then deploy Wiki Autrans - Fix FIX-IT - bedrijvengids - handelsgids - webdesign - Pc repair ... PC Fix Error Doctor Registry Cleaner PC Diagnostics PC Checkup SF Gate: Columnists: Mark Morford Archive PNG in Internet Explorer: How to Use Registry Repair, Clean Up & File Fix for Windows Why Blog Post Frequency Does Not Matter Anymore Marketing Profs ... serious fix 4.1 How to Fix CGI - majordojo GRC CIH Virus Recovery You receive an access violation error and the system may appear to ... FIX: Update to enable DirectX Video Acceleration (DXVA) of Windows ... Video Coldplay - Fix You - coldplay, fix, you, clip ... Free Registry Fix 3.9 for Windows Solar shield could be quick fix for global warming - earth - 05 ... adaptive path » 8 quick ways to fix your search engine Fix for COM Surrogate Has Stopped Working Error in Vista :: the ... Oral Fixation Mints / Get Your Fix Nail Fungus Onychomycosis - Fix My Fungus Pierre Fix-Masseau affiches sur AllPosters.fr Fixit Guide Series - DIY Mac & iPod Repair Dura Fix Aluminum Welding Aluminum Brazing Aluminum Soldering ... The Simple Dollar » 31 Days To Fix Your Finances: A Wrapup Gallery 2.2.3 Security Fix Release Gallery What To Fix VCOM: V Communications. Security, Web, OS Management, Partitioning ... Fix for securityd hogging RAM when reauthorizing apps' Keychain ... Cafe Hayek: Just Fix It DriverAgent.com Fix Your Driver Problems Instantly with Driver Agent Federal 'fix' knocks ca.gov for a loop NetworkWorld.com Community macosxhints.com - Twenty steps to help diagnose and fix system issues ca-fix program description. Fix your Exposé keys - WOW Insider IndieHIG » Blog Archive » Fix the Leopard Folders (FTLF or FTFLF) Blogger Buzz: A Layout Solution M·A·C Cosmetics Studio Fix Powder Plus Foundation