Netstat list services and open ports & more

List services with associated port the service is using

netstat -lntup
  • - l is used to list listening socket
  • - n is using to show port number
  • - t to show tcp connexions
  • - u to show udp connexions
  • - p display programme name

Show ESTABLISHED connexions

netstat -natu | grep 'ESTABLISHED'
  • - n is using to show port number
  • - a display all sockets
  • - t to show tcp connexions
  • - u to show udp connexions

Show ESTABLISHED connexions with a specific IP address

netstat -natu | 'ESTABLISHED' | 141.103.61.80

Show routing informations

netstat -r

Continuous listening for services

netstat -lntupc 

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store