Languages
[Edit]
EN

Windows - how to list all processes that use specific port with cmd?

9 points
Created by:
Kate_C
19800

Quick solution:

netstat -ano | findstr :your_port_number

1. Introduction

This article is focused to solve problem, how to find all processes ids (PIDs) that listen on specific ports under Windows CMD (Windows Command). Simple solution how to find opened ports with netstat command is described below.

2. netstat command example

This solution shows composition of two programs. netstat lists and prints all processes and findstr finds lines that contain :80 text. Redirection beetwen proceses with pipe (|) causes that only specific lines will be printed - lines with text passed in first argument of findstr.

Programs usage in cmd:

C:\>netstat -ano | findstr :80
netstat listing processes that uses port 80 - Windows CMD
netstat listing processes that uses port 80 - Windows CMD

 

Where:

  • for netstat:
    • -a displays all connections and listening ports,
    • -n¬†displays addresses and port numbers in numerical form,
    • -o¬†displays the owning process ID associated with each connection.
  • for findstr:
    • :80¬†is searching phrase in each line - printed lines contain it.

See also

  1. Windows - how to kill process that listen on specific port with cmd?
Native Advertising
50 000 ad impressions - 449$
ūüöÄ
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

‚̧ԳŹūüíĽ ūüôā

Join