In Windows, when your system hangs, you can always press Ctrl-Alt-Delete, wait for the Task Manager to open, and kill the process that doesn’t respond. However, Ctrl-Alt-Delete don’t always work the way you want it to leaving you no other option but to do a hard-reset, and perhaps as a result corrupt your data kissing your important files goodbye.
In Linux, when your entire system freezes, there are plenty of safe ways to exit and get back on track immediately. Alt + SysRq + (a selection of other keys) will do the magic trick. Note: 'SysRq' key is equivalent to the 'Print Screen' key.
In Linux, when your entire system freezes, there are plenty of safe ways to exit and get back on track immediately. Alt + SysRq + (a selection of other keys) will do the magic trick. Note: 'SysRq' key is equivalent to the 'Print Screen' key.
Alt + SysR + K
Kill all processes (including X), which are running on the currently active virtual console.
Alt + SysRq + E
Send the TERM signal to all running processes except init, asking them to exit.
Alt + SysRq + I
Send the KILL signal to all running processes except init.
Alt + SysRq + L
Send the KILL signal to all processes, including init.
Alt + SysRq + S
Run an emergency sync (cache write) on all mounted filesystems. This can prevent data loss.
Alt + SysRq + U
Remount all mounted filesystems as read-only. This has the same effect as the sync combination above, but with one important benefit: if the operation is successful, fsck won't have to check all filesystems after a computer hardware reset.
Alt + SysRq + R
Turn off keyboard raw mode. This can be useful when your X session hangs. After issueing this command you may be able to use .
Alt + SysRq + B
Reboot immediately without syncing or unmounting your disks. Using this, you will likely end up with filesystem errors, so this is not highly recommended.
Alt + SysRq + O
Shut the system off right away.
If all these ‘Alt + SysRq’ keyboard combo are hard to remember, you can press Alt + SysRq + H to display a helpful list of the shortcuts above.
alt+sysrq+h = launch a metric f%$-ton of screen shot save requests.
ReplyDeleteThe first thing you should try in something hangs, is just Alt-SysRq-K (or Ctrl-Shift-Backspace while in a graphic X environment, which is a little less brutal). But mostly plain patience will do the trick.
ReplyDeleteA great way to use these keys is holding down Alt-SysRq while slowly typing REISUB (BUSIER backwards). This will reboot your system in a safe way (just look at the explanations above).
Also note: Alt-SysRq-H only helps you out in the command line.
Linux can freeze? wow
ReplyDeleteI`ll stick with my MS Windows 95®
An easy mnemonic for the sequence of keys: just remember 'REISUB', or 'BUSIER' backwards.
ReplyDeleteAlthough I use only 'SUB' and never had any problems.
I was under the impression that we were to "Raise the elephants." RSEIUB
ReplyDeleteBut wait...
ReplyDeleteFrom all the FUD I thought Linux NEVER froze up...
You all lied?
Only fanboys lie no system is "safe" or crash free. If your truely interested in an OS you should research it a good way to do that is to read tech support forums for said OS.
ReplyDeleteRaising Skinny Elephants Is Utterly Boring.
ReplyDeleteNo, no, no,
ReplyDeleteits
Raising
Elephants
Is
So
Utterly
Boring
Alt + SysReq + REISUB
Yeah, I think that I'll be writing a post to link to this page. I often suggest Linux to friends as an alternative to Windows but the truth is, EVERY OS is going to run into situations that bring grief.
ReplyDeleteI like the longer interval between those situations in Linux. But that means that I tend to forget how to get out of the jams.
Good one... ;) Screenies for everyone... And lots of them too... ;)
ReplyDeleteThe lockups happen so seldom that I can never remember these key sequences. But Ctrl+Alt+Delete? I'll NEVER forget that one.
ReplyDeleteVery useful!
ReplyDeleteFor Fedora you need to use
AltGR + SysReq + ....
otherwise you get a print screen image dump window if you are running X.
A pitty that there is no "print" button/layout on this page to print out these useful shortcuts :(
ReplyDeleteReboot
ReplyDeleteEven
If
System
Utterly
Broken
"But wait...
ReplyDeleteFrom all the FUD I thought Linux NEVER froze up...
You all lied?"
Nope, you just didn't get it.
Linux, the kernel, does not crash. Only the applications crash. And since the kernel don't crash you can happily recover (by being able to reboot gracefully) from any application crash.
Of course, Linux does make a "kernel panic" in which most of the time hardware issues are to blame.
I have experienced kernel panics mostly when I am compiling my own kernel. While the BSODs simply became part of any Windows users daily routine.
well, I too tried the alt+sysrq+h command and had a plethoria of screen captures open up slowing down my display making it appear frozen.
ReplyDeleteMy simple solution was ctrl-alt-backspace which restarts the x window session) (killing all child processes in the meantime - including the screen capture one).
I logged back in and was ready to carry on work again. The computer didn't ahve to be rebooted. All my drive mappings were still there.
I reopened firefox and all the pages I was reading were reloaded.
I reopened my music play and the song I was listening to was queued and ready to start playing again.
Total time - to productivity again - perhaps 15 seconds.
If you're having the screenshot (screen capture) try this; it worked for me in Ubuntu:
ReplyDeleteadd this line to the end of /etc/sysctl.conf
kernel.sysrq = 1
then reboot.
For it to work properly, you need to press alt+sysrq simultaneously, then press your exit code (eg k) while holding the other keys down.
Ctrl+Alt+Esc usually do the thrick for me ;)
ReplyDeleteAnyone know what the sysrq button is on a macbook keyboard?
ReplyDeleteWindows 95? There hasn't been a new security update for that in close to a decade, but there are new attacks against it almost day. Having a Windows 95 box hooked to the internet is akin to walking naked into a prison carrying a carton of cigarettes.
ReplyDeleteLinux can freeze for a reason, whereas
ReplyDeleteWindows freeze for no reason, even bythemselves.
There is no such thing as "unfreezable" system.
But lets say that one new computer user can harm Windows much more easily than a linux distribution...
All the above in my opinion of course..
For no reason, right. Windows has this randomly firing freeze driver.
ReplyDeleteAs if the common user would know why his Linux box freezes!
ctrl + alt + backspace. definitely the way to go.
ReplyDeleteI had heard about it but to be completely honest I thought it was a myth.
ReplyDeleteYes Virginia there Really Are WindBlows FanBoys.
did you try CTRL+SHIFT+ESC to open Task Manager??? so you wrote "However, Ctrl-Alt-Delete don’t always work the way you want it to leaving you no other option but to do a hard-reset"... But if you try CTRL+SHIFT+ESC, you can reach Task manager easyly..
ReplyDeleteLoved reading these comments. Its so unusual, but not impossible for a linux desktop to lockup. This blog is nice reminder that a linux desktop can be safely terminated and system restarted in an orderly manner. Yah now!
ReplyDelete