How to Kill Unresponsive Programs in Linux.

Post image for How to Kill Unresponsive Programs in Linux.

by bharat on March 30, 2010

How does it feel when our system hangs and stop responding to our requests ? in windows system all we do is press ctrl+alt+del combination and see which process is consuming CPU and not allowing other processes to get served  , we may kill this process from here as well.

System Monitor tool

This is simililar to windows task manager with tht exception that it gives lot more information regarding the system state and you can easily find the misbehaving process and kill it immediadely.following pic shows it

Using Kill command

Most of times when system hangs you can not use Gui base tools like system monitor tool, in this case you can use shell base tools, to go to shell press ctrl+alt+F1 and login to command prompt , here you can run

kill <processID>

to know process id run

ps -ax |more and look for your process name and process id will be written adjacent to it .

Hopefully after that you can restore your GUI so just execute Ctrl + Alt +F7 to go back to GUI mode.

Pkill command :-

Most of the time is happens that we dont  know the process id and feeling too lazy to run ps command and look for our process , geeks in linux community have the solution run

pkill <processname>

Pgrep command :-

To know the process id we can also directly issue pgrep command following is the example.

Xkill command :-

When GUI is responding  you can use xkill command and mouse pointer will get convert into a X  pointer , you just click on the application which is not responding  application should get terminated immediately,

Using the ‘killall’ command

Last but not the least, there is the killall command. Terrifying as it may seem, it doesn’t kill all the processes running on the computer. Instead it is used to kill multiple instances of the same program. eg killall firefox will kill all windows and Firefox profiles that might be currently executing.

There is lot more for these commands to learn, you can search for manual of these commands and learn more tricks , Meanwhile what do you do when your  Linux system becomes unresponsive ? Do leave your comments.

Leave a Comment

Previous post:

Next post: