Friday, July 11, 2008

How to reboot or shut when Linux system freezes?

After I press ctrl alt F2 and it drops me into the manual login.
Alternately you can use Ctrl+Alt+Backspace to restart X and return to the login screen.
Carrying on with Ctrl+Alt+F2 method, just login to the VT session and type in
sudo killall appname
Then return to your X session (Ctrl+Alt+F7), then continue with your duties.

Another alternative is to restart X (the graphical interface). When X freezes, simply push ctrl-alt-backspace. This will restart X without restarting the computer, then you can login again. Be aware though that you lose any unsaved data in any open applications.

If ctrl-alt-backspace won't do anything you can use a terminal (getting to it as you described) and then after login issuing

sudo /etc/init.d/gdm restart
If that doesn't do the trick either (which is rare) you can raise a skinny elephant. It's a silly name for a simple meme.

Hold down alt + SysRQ (often also labeled Print Screen) and press the following keys in order:

R - raising (switches keyboard from raw mode)
S - skinny (sync all mounted filesystems)
E - elephants (shuts down all processes except init)
I - is (terminates all processes except init)
U - utterly (remounts all filesystems in read-only mode)
B - boring (immediately reboots the system)

This is for when nothing else works.

Other description:

Should your system completely lock up, and you need to do a hard reboot - do this instead. It works by sending signals directly to the linux kernel, to unmount all partitions, kill processes, etc, relatively safely:

Holding ALT, tap [sys rq], r, e, i, s, u, b.

Wait a couple seconds between each of the letters to ensure it finishes the operations before starting the next. ‘b’ causes a reboot, so no need to touch the power button. On laptops like mine, you may need to hold the [fn] button while hitting [sys rq] - don’t hold it for any other buttons.


Shutting down from the terminal:
sudo init 0


Wht is the SysRq key?

Keyboard shortcut (compare to Ctrl+Alt+Del in Windows):
Shut of the system: Alt + SysRq + o
Reboot the system: Alt + SysRq + b
SysRq is on my keyboard the same key as Prt Scr (Print Screen).

No comments:

Blog Archive

About Me

Exclusion of liability Regarding StillStupid: The use you make of the guides, tips and downloads that you listed on this web site or on another website to which I refer is entirely at your own risk. In no way can I be held liable for damage or consequential damages of any kind, which occurs as a result of that use.