Merge pull request #89 from amitsaha/netstat_update

cheatsheets/netstat: Which process is listening on a port
This commit is contained in:
Chris Lane 2013-09-13 17:48:50 -07:00
commit dc5dbdbb02

View file

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