9. Five Ways to Fix App Woes
Like any operating system, Linux occasionally experiences run-away processes -- a program that goes into an endless loop or stops responding. Although full system crashes are very rare in Linux, programs do occasionally act up. This installment is all about how to handle those situations. Here are five methods for diagnosing and solving Linux application woes:

1. If a single program freezes, crashes, or won't stop running when it should, use your Linux distro's desktop changer to change to a new desktop and press the Ctrl-Esc keyboard combination. That opens the Process Table, which shows all the processes running on your system. You may notice that some processes appear to be running several instances, and that's normal.

The first four columns of the Process Table are the most important. If you know the name of the process you're having trouble with, that makes things simpler. If you don't, the 3rd and 4th columns show what is consuming CPU cycles. Take note of the PID (Process Identifier) number for the culprit or likely culprit. If you see multiple processes with the same name, note the last PID number.

Navigate to yet another desktop window, open a Terminal or Console window, and type:

su {your root password}

That logs you in as root. Next type:

kill ####

Replace the #### with the PID number you noted earlier.

Rebooting is not required, and if you selected the right process, your job should be done.

Note: You can also change desktops by pressing Ctrl-F1, Ctrl-F2, Ctrl-F3, and Ctrl-F4.

2. If your desktop interface freezes completely, trying pressing Ctrl-Alt-F1. That exits your desktop GUI and opens an empty Terminal screen with a login prompt. (Note: There are 6 terminals available Al-F1 to Alt-F6.) Then login by typing "root" (not "su"). Then type:


That will give you a Process Table with the same data described above showing the PID numbers. Find the problem number, close top by pressing the Q key, and press Alt-F2. That opens another empty Terminal window. Login as root (by typing "root") and enter:

kill ####

Replace the #### with the PID number you noted earlier. To return to your graphical desktop, press Alt-F7.

3. When your desktop is down, another useful command is Ctrl-Alt-Backspace. It logs you out of your desktop session and returns you to your graphical login screen where you can restart KDE, Gnome, or other desktop.

4. Try the three tips above first. If they don't help, you can force a clean reboot with these steps: Press Ctrl-Alt-F1 to open a Terminal window, type "root" to login, and then type:


5. If all else fails, and your system doesn't respond to any input from you ... don't press Ctrl-Alt-Delete or hit the reset button! Under Linux, you do the Skinny Elephant trick. It recovers and restarts your system as safely as possible so that you lose no data. The trick is carried out by a series of commands entered in a specific order. To help you remember the commands and their prescribed order, use this mnemonic:

Raising Skinny Elephants Is Utterly Boring.

The first letter of each word in the mnemonic is for the command key you press in combination with Alt-SysRq. (SysRq is the other function on the PrtScn button.) In other words, press these keyboard commands in this order:

Alt-SysRq-R   (Puts keyboard in raw mode so kernel can receive commands)
Alt-SysRq-S   (Puts the hard drive in sync)
Alt-SysRq-E   (Stops all running processes)
Alt-SysRq-I   (Kills all remaining processes)
Alt-SysRq-U   (Unmounts the file system and mounts it in read-only mode)
Alt-SysRq-B   (Reboots the system)

You must use the left Alt key to make this work. It's also important to pause a moment after each command to ensure that the system has time to carry it out. Since there's no visual feedback as you're progressing through each command, just take your time to be sure. After the last command your PC will restart, and you should be in good shape.

Extra Tip: One last tip everyone should be clear on: If you use the Ext3 or ReiserFS file systems and you get a message on reboot to do a file-system check, do NOT press "Y" (for Yes) or any other key whatsoever. In fact, you should do nothing at all. Just wait for the journaling file system to do its thing and solve the problem automatically.