Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Recently when I tried to open a video with VLC, my system slowed down, the open applications webbrowser, VLC and filemanager and others didn't react any longer. The mouse just reacted still very slowly.

On a windows machine i would press a keycombi CTRL-ALT-DEL to open the taskmanager, search the process which caused the hang and kill it.

Since i'm fairly new with the use of linux i haven't figured out the best practice for solve such a situation in Ubuntu.

Which quick and effective way would you recommend to identify the hanging process and close it, when the system already reacts very slowly on user input?

share|improve this question

3 Answers 3

up vote 19 down vote accepted

There are two primary ways to identify hung processes. One is via the System Monitor GUI and the other is via top in command-line.

System Monitor

This can be found in System > Administration

account

You can also create a keyboard shortcut for this in this article.

Once the GUI launches you can select the Processes tab which will list all the running processes. Sort by the CPU column to find the most CPU intensive task

cpu

Lastly you can right click that task and choose to end it, stop it, or kill it. Killing it will immediately stop and remove that process from the system.

kill

Command-Line

If you have a terminal open you can simply type top this will list all the running processes similar to that of the Processes tab in the GUI

top

Within top it is CPU sorted by default - so the top most CPU intensive tasks are at the top. At anytime you can press the letter k to kill a process

k

Simply type the PID of the process you wish to kill and press enter. It will ask for a Kill signal to send. To kill the process nicely use the default 15 - to kill it right away "Do not pass go, do not collect $200" use 9.

sigkill

The process will then be terminated.

If you are experiencing sluggish interface you can try to SSH in remotely if that is enabled - or switch to a virtual console via Ctrl+Alt+F# Where F# is a Function Key (F3, F4, F5, etc). To return to the Desktop environment switch to either F7 or F8 depending on your version of Ubuntu.

share|improve this answer
4  
Great answer. I usually assign the CTRL+ESC shortcut to the System Monitor. This gives me a quick access to kill process. –  Javier Rivera Jan 3 '11 at 17:02
    
@Marco Ceppi: where are gone images? –  enzotib Jul 12 '11 at 10:20
    
@enzotib The post has been updated –  Marco Ceppi Jul 12 '11 at 11:00
    
+1 for System Monitor. It could kill/stop a hanging VLC process, which htop could'nt do. –  Юнгвирт Тони yesterday

Add the System Monitor applet to your panel (right click on the panel, select Add to Pannel and search for System Monitor) the and right click on it to open the System Monitor application.

You can launch the System Monitor application by pressing Alt+F2 and start the program gnome-system-monitor.

Go to the "Processes" tab and right click the appliction you intent to kill.

share|improve this answer

Most already said (I like Marco Ceppi's answer) but there also is a "Force Quit" applet you can add to your GNOME Panel. Right click on the panel and choose "Add to panel...":

alt text

This lets you quit a hanging application by simply clicking on it's window. Very fast and efficient.


When running Unity in 11.04 of course this application will no longer be available. There is a replacement project Indicator-Forceclose but it is not included in the repositories.

Alternatively we could run xkill from a terminal.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.