1
0
mirror of https://github.com/cheat/cheat.git synced 2025-05-23 08:36:06 +02:00

cheatsheets/netstat: Which process is listening on a port

This commit is contained in:
Amit Saha 2013-09-12 09:59:20 +10:00
parent 64cba079f9
commit 50fd4c6638

@ -3,3 +3,9 @@ sudo netstat -lnptu
# To view routing table (use -n flag to disable DNS lookups):
netstat -r
# Which process is listening to port <port>
netstat -pln | grep <port> | awk '{print $NF}'
Example output: 1507/python