Identifying a running process

Ray Leventhal ubuntu at
Thu Jun 18 19:15:49 UTC 2009

GaryT wrote:
> Ray Leventhal wrote:
>> GaryT wrote:
>>> I want to learn how to identify and then stop a process - for example 
>>> today I tried to restart a program that had just crashed and Ubuntu gave 
>>> me a message along the lines of "XYZ is still running but not 
>>> responding. Stop the process or reboot before trying again" or words to 
>>> that effect.
>>> Rebooting was highly undesirable because it meant shutting down other 
>>> programs.  Too bad!
>>> Can someone help save the search and point me to some appropriate 
>>> reading matter?
>>> Much appreciated
>>> GT
>> Hi Gary,
>> In terminal, try this:
>> ps auxxxx|grep XYZ
>> the first column of the response will be the process ID (PID) of the 
>> offending process.  Once that's known you can
>> sudo kill <pid>
>> and you'll have stopped the hung process.
>> HTH,
>> -Ray
> Many thanks, Ray.
> Much appreciated.
> I've been experimenting with and learning about ps ever since I saw your 
> response.
> Magic stuff!
> GT
> ]

I'm glad its working out for you but PLEASE heed Markus' very poignant 
warning about using the kill with sudo.  As he rightly stated:

> If you have started process to be killed yourself, there's (probably) no
> need to use sudo.
> In fact, using sudo then is a bad idea. With sudo, if you mis-type the
> process ID, you might, for example, accidently kill a system process.

My bad for not pointing that out at first.


More information about the ubuntu-users mailing list