Top community members
All Wiki Articles Create Wiki Article

In the past we had a dream,
to have place where we could share IT knowledge,
to ask questions without fear that someone will judge us.

Now we are a group of people who make this dream come true. ‚̧ ūüíĽ

If you think sharing knowledge and helping other is valuable.

join our community - Click here

Windows - how to kill process that listen on specific port with cmd?

0 contributions
3 points

Quick solution:

netstat -ano | findstr LISTENING | findstr :your_port_number
taskkill /PID your_PID_number /F

1. Introduction

This article is focused to solve problem, how to kill process (PID) that listens on specific port under Windows CMD (Windows Command). Simple solution how to do it with taskkill command is described below.

2. taskkill program example

Do following steps:

Step 1. Run cmd.exe as Administrator

Step 2. Execute netstat command:

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

 Step 3. Execute taskkill command:

C:\>taskkill /PID 548 /F
taskkill apache2 killing process example - Windows CMD
taskkill apache2 killing process example - Windows CMD


  • for netstat -ano | findstr LISTENING | findstr :80¬†double fitering is used: by¬†LISTENING and later by :80; more detailed description can be found here,
  • for taskkill:
    • /PID 548¬†represents killed process id,
    • /F stopd process event it does not responds.

Note: read more about netstat -ano here.

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