Saturday, October 27, 2007

What to do when your linux system hangs

If you ever experience your whole linux system locking up, there are a few ways to try to fix it without having to cut the power.

First, you can try to restart the X-server, using the key combination Ctrl+Alt+Backspace. This is the best thing to do, if it works. The only thing it will do, is shut down the X-server, killing all applications currently running in it. The good thing is, it will only take a couple of seconds before it is started again, and you can log on.

Second, if the X-server restart does not work, you could try the good old Ctrl+Alt+Delete. That tries to restart your system as if you pushed the restart button within the X-server, or ran "reboot" from the console. Although this rarely works, I believe it to be worthy of a try.

When all the other options fail, and your system seems to be unresponsive to all key combinations you try, there is one a bit complicated one left to try. If you hold down the Alt and the PrintScreen/SysRq button while typing "REISUB", you would also restart your system properly, shutting for example your harddisks down without any data loss. This seems to work almost every time, although sometimes its just totally dead.

The last resort would be to cut the power, holding the power-on button on your computer in for a few seconds until the computer shuts down. This is not advised though, as it could mess up your harddisks if they are written to at the time it shuts down.


DanielStinebaugh said...

Thanks this is exactly the keypress's I was looking for!

Worked a treat!

Umang Jain said...

One can also try... ctrl+alt+F1... it takes you to terminal console and you can kill the hanged up process there.. it sometimes work...

- use ps command to list the processes running and use kill -kill to kill the process hanged up..


Anonymous said...

Perfect! saved a day & not to mention, night :).. Thanks alot.. the REISUB worked like a charm.

- Varun