Skip to content

Instantly share code, notes, and snippets.

@nepsilon
Last active February 19, 2017 12:37
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nepsilon/4d928239255a9eb62043 to your computer and use it in GitHub Desktop.
Save nepsilon/4d928239255a9eb62043 to your computer and use it in GitHub Desktop.
5 netstat tips — First published in fullweb.io issue #12

5 netstat tips

netstat has some very neat features we could make use of more often! Here is 5.

Note: examples here may not apply to BSD based systems

1. The classic: list local listening TCP/UDP ports and their process:

$ sudo netstat -tulpn

2. Get a tail -f behaviour with:

$ sudo netstat -c

3. Show network transactions:

# including RX/TX and MTU
$ sudo netstat -i

4. Display the routing table:

$ sudo netstat -r

5. Show statistics by protocol:

$ sudo netstat -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment