Wednesday, February 8, 2017

Linux PORTs and PIDs

Get PID of a process running on a given PORT



down voteaccepted

$ sudo netstat -nlp | grep :80
tcp  0  0  0.0.0.0:80  0.0.0.0:*  LISTEN  125004/nginx
You can also use lsof:
$ sudo lsof -n -i

No comments:

Post a Comment