Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Enterprise
Expertise: Advanced
Feb 17, 2017

Find Which Port Is Being Used by a Process

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    0.0.0.0:8081           0.0.0.0:0              LISTENING
  TCP    [::]:8081              [::]:0                 LISTENING
  UDP    0.0.0.0:8082           *:*
  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
M S Sridhar
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date