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

I started some processes with nohup and they do not work correctly, so I need to find and kill them, but I do not know pid or anything else.

+6
source share
2 answers

SSH, and then use the ps command to display the running processes in combination with the grep command to filter this list of results to what you need:

ps aux | grep something 

"ps aux" returns a list of all running processes. "grep something" accepts this list (via the pipe ("|")) and simply displays lines that match "something."

So for example, if you want to find an httpd process, you can use

 ps aux | grep httpd 

The results will contain a PID that you can use to destroy them.

+12
source

No need for any pipes with pgrep:

 pgrep -l httpd 
+2
source

Source: https://habr.com/ru/post/905763/


All Articles