Un port en particulier (5015)
germain@pop-os:~/sandboxes$ lsof -i :5015
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 131051 germain 8u IPv4 416188 0t0 TCP localhost:5015 (LISTEN)
Tous les ports TCP
germain@pop-os:~/sandboxes$ netstat -atn | grep LISTEN
tcp 0 0 0.0.0.0:57621 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5015 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5725 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:59203 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5096 0.0.0.0:* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 127.0.0.1:63671 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 127.0.0.1:36461 :::* LISTEN
Tuer le process qui écoute sur un port
lsof -ti tcp:5015 | xargs kill
lsof -i :5015