Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❀ đŸ’»
We are community of people that helps each other.

If you think you have some skills to help others

help someone and become a part of our community - List Q & A

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

0 contributions
9 points

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?
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more