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

StackOverflow https://stackoverflow.com/questions/8827405

  •  27-10-2019
  •  | 
  •  

문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

No need for any pipes with pgrep:

pgrep -l httpd
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top