A full system crash is very rare in Linux, most of the times it is only one program that acts up. There are several ways to recover from a crashed program.
1). If a program blocks, crashes or runs-away ( does not want to close or stop running ), change desktop and press the Ctrl+Esc keys. You will get the Process Table with all processes running on your system ( some processes may appear several times, that is normal ) the first four columns are the most important, if you know the name of the process things are simple, if you don't: in the 3rd and 4th you can see what is consuming all that cpu. Now remember or note down the PID number ( Process IDentifier ) you will need this. ( for multiple processes with the same name only the last one is the one you're after ).
Now go to yet another desktop open a terminal/console type < su > ( without the <> ) and give your root password, then type < kill 4246 >; ( if 4246 was the pid number ).
That's all, job done ! ( rebooting like in Windows is NOT needed in Linux !)
(There are other ways with names instead of numbers, terminal instead of gui process table, but this is the most general way to save your butt )
2). If all your desktops are blocked ( when X crashes): Press Ctrl+Alt+F1, you will go out of X, and get an empty terminal screen, fully black with a login prompt. ( there are 6 terminals available F1 to F6 ) Then log in as "root" ( not "su" this time ) and type <top>, you will get the same process-table with the PID numbers, find the number that's hurting, close top with the"Q" key, press Alt+F2, you will get a second black screen ( terminal ) to log in to, log in as root and < kill 4246 >.
For returning to X, press Alt+F7 !
3). Also you can try Ctrl+Alt+Backspace . . . it will log you out of X and bring you back to the graphical login screen where you can start KDE or Gnome again.
4). If even this does not help or you can not find the process and PID number just type "reboot" at the root-prompt ( of a Ctrl+Alt+F1 terminal ) and you will get a clean reboot.
5). If even this last step does not work...( Or: If All Else Fails )
In addition to the PID story in Run-Away Processes If all is blocked and even Ctrl+Alt+backspace ( what should be a last resort ) does not react, if your system does not react on any action ( like I said before, very rare in Linux ) remember the next line:
Raising Skinny Elephants Is Utterly Boring
Here is how you "raise the elephant":
Alt+SysRq+r ( The LEFT Alt key ) ( SysRq is on the same button as print screen )
Alt+SysRq+s
Alt+SysRq+e
Alt+SysRq+i
Alt+SysRq+u
Alt+SysRq+b
Give a little time between keystrokes.
The r stands for put keyboard in raw mode
The s for sync the disk
The e for terminate all processes
The i for kill all processes
The u for remount all filesystems read only
The b for reboot the system
THIS IS THE VERY LAST SAVE YOUR BUTT PROCEDURE ! ONLY IF ALL ELSE FAILS !
PS: If your filesystem is Ext3 or ReiserFS and on reboot it wants you to do a filesystem check, don't touch any key when it asks you to press "Y" and let it recover the journal automatically.
NOTE: For the skinny elephants to work you need to have the sysrq-key enabled in the kernel. (CONFIG_MAGIC_SYSRQ)
You can check if it is enabled by typing 'ls /proc/sys/kernel/sysrq' if it's there, it's enabled.
Thanks to Mischa for pointing this out.
**NOTE: This was copied directly from
www.brunolinux.com **