Finding of the process using a specific port
- By
- On 03/09/2017
- Comments (0)
- In Unix/Linux
$ sudo ss -lptn 'sport = :80'
State Local Address:Port Peer Address:Port
LISTEN 127.0.0.1:80 *:* users:(("mhi",pid=125004,fd=12))
- You can also use the same invocation you're currently using:
$ sudo netstat -nlp | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 125004/mhi
-You can also use lsof:
$ sudo lsof -n -i :80 | grep LISTEN
nginx 125004 mhi 3u IPv4 6645 0t0 TCP 0.0.0.0:80 (LISTEN)