Navigate back to the homepage

how to kill process using port in windows?

Infinitbility
Windows
July 8th, 2022 · 1 min read
how to kill process using port in windows?

Hi Friends 👋,

Welcome To Infinitbility! ❤️

To kill process using port in windows, open your cmd as administrator and do

  1. run netstat -ano | findstr :<PORT> (replace <PORT> with your port number )
  2. copy PID number which you want kill in the list
  3. run taskkill /PID <PID> /F (replace <PID> with your pid number )

That’s it.

Sometime’s we want to run some application like node, react, golang, graphQL and etc but windows show this port already in used in my case i want to start start react application on 3000 port but i’m not able to start because something working on 3000 port.

So let’s how do i kill process using port in windows steps wise.

Step 1: Start CMD as a administrator

To start cmd as a administrator

Automate Python Script In Windows
  1. click on window start button
  2. search CMD in your search bar
  3. Right click on CMD and select Run as a administrator
Run CMD as a administrator
Run CMD as a administrator

Step 2: Find process based on port

To find process based on port we are going to use netstat command.

Just run the netstat -ano | findstr :<PORT> command in my case it’s was like netstat -ano | findstr :3000.

Find port using netstat in windows
Find port using netstat in windows

The box area in read shows the PID (process identifier). Locate the PID of the process that’s using the port you want.

Step 3: kill the process

To kill process, we are going to use taskkill command.

Just run the taskkill /PID <PID> /F command in my case it’s was like taskkill /PID 15767 /F.

Kill process using taskkill in windows
Kill process using taskkill in windows

If process kill successfully it will show SUCCESS: The process with PID 15676 has been terminated..

I hope it helps you, All the best 👍.

Follow me on Twitter

Join our email list and get notified about new content

No worries, I respect your privacy and I will never abuse your email.

Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.

Looking For React Native Tutorial?

we are trying to create the best Tutorial for react native developers.

When you want a daily updates about React Native Tutorial or infinitbility update subscribe to our newsletter.

Read React Native Tutorial

Request New Tutorial or Article on mail infinitbilit[email protected]

Guide book

Guidebook: The Javascript Monorepo Photoshop Guide

Tutorials

Categories

More articles from Infinitbility

how to check empty string in node js?

how to check empty string in node js?

An example of check empty string in node js with a step-by-step example.

July 7th, 2022 · 1 min read
how to get length of string in node js?

how to get length of string in node js?

An example of get length of string in node js with a step-by-step example.

July 7th, 2022 · 1 min read
© 2020–2022 Infinitbility
About
Link to $https://medium.com/infinitbilityLink to $https://www.facebook.com/InfinitbilityLink to $https://github.com/infinitbilityLink to $https://twitter.com/infinitbilityLink to $https://www.buymeacoffee.com/infinitbilityLink to $mailto:[email protected]