List listening ports and applicationli

netstat -ano | egrep 'Proto|LISTEN'

  • -a Show the state of all sockets, including passive sockets used by server processes
  • -n Show network addresses as numbers
  • -o Show process Id

netstat -ano | grep 8080

Show which application is using that port:

netstat -anb | grep -A 1 "8080"

  • -b Display executable listening on port
  • grep
  • -A option is to display the preceding line after greps returned result

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s