Submitted by: M S Sridhar(sridhar.ms@gmail.com)

Friday Feb 17th 2017 by M S Sridhar

Language: Enterprise||Expertise: Advanced

There are many instances when we struggle to find out which port is being used by our applications.

On Windows, you can use the same netstat command, where the filtering is performed by findstr

netstat -an | findstr :80

Sample output on Windows:

C:\Users\sridharnetstat -an | findstr :80
  TCP               LISTENING
  TCP    [::]:8081              [::]:0                 LISTENING
  UDP           *:*
  UDP    [::]:8082              *:*

On Linux, you can use the following command. grep is basically a filter and in the below command, it filters the results with the keyword :80

netstat -an | grep :80
Mobile Site | Full Site