But what about if the entire screen has hung and it's too slow to do anything? Well, there's several options here. You can press Ctrl+Alt+Backspace to restart your X window server, but that's overkill. A better idea is to press Ctrl+Alt+F2 to take you to a virtual terminal. You can log in by entering your username, then you'll be prompted for your password. Once you've logged in, enter the following command:
This displays a list of the running applications. It includes details of how much memory and CPU each is using. Look for the application you want to stop, and note the PID (process ID) number. Then press Q to exit top.
Now you know this number, it's easy to kill the process from the command line. If this number was 1234 for the program you wanted to stop, you'd enter the following:
Easy! Now press Ctrl+Alt+F7 and you'll be back at your desktop as usual, minus the hung application.