Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Saturday, February 28, 2009

find the process id of an application in linux

In one of my previous posts, I talked about killing unresponsive processes in Linux. It is pretty straightforward to find the process ids of applications if you're the only user, but if that's not the case you have to find a clever way. Assume that we want to find the process id of bash. We write
ps -A
to the terminal for seeing all active processes but we don't have 1 hour to inspect all processes. We just want to see the process id of bash. We will use the pgrep command which's basically a grep variant for processes.
pgrep bash
will give us the process id (PID) of bash.

Tuesday, February 3, 2009

ready to kill some processes/applications in linux?

In Linux -as in all modern Operating Systems-, applications become unresponsive and you may want to kill the process pertaining to them. To do this, open the terminal and write this:

killall applicationName

If that does not work try

killall -9 applicationName

If you don't have an idea about the application name, you can take look at the current processes by writing

ps

then to kill the processes you want

kill processID

If that does not work then try

kill -9 processID

Another possibility is to use xkill (for applications with gui). The window of the application waiting to be killed should be visible. Then, open Terminal and type

 xkill 
and later choose the window of the application to be killed.