How can I see what processes are running on a remote ubuntu server and kill them?

fancy picture fancy · Jan 11, 2012 · Viewed 31.3k times · Source

I started some processes with nohup and they aren't working correctly so I need to find and kill them but I dont know the pid or anything.

Answer

TheOx picture TheOx · Jan 11, 2012

SSH in and then use the ps command to list running processes in conjunction with the grep command to filter that result list down to what you need:

ps aux | grep something

"ps aux" returns a list of all processes currently running "grep something" takes that list (via the pipe ("|")) and just outputs strings that match "something".

So for example if you wanted to find the httpd process you could use

ps aux | grep httpd

The results will contain the PID you can use to kill them.