How to Kill a Process on Port on Windows 11

How to Kill a Process on Port on Windows 11.

Every course of that’s run on Windows makes use of a unique port. So, suppose you’re attempting to run an software that should make the most of a selected port that’s already in use. In that case, it’s possible you’ll find yourself receiving an error message that goes one thing like – “Port 8080 is being used” or “The port number you provided is already in use.” 

The solely option to get round this error is to manually kill the method that’s occupying stated port at the moment. The article beneath reveals how one can establish which port is being utilized by which course of and the totally different strategies that can allow you to kill it so you may liberate that port. 

First up, open Command Prompt. Press Start, sort cmd, right-click on ‘Command Prompt’, and choose Run as administrator.

Type the next command to get a listing of all of the ports in use. 

netstat -ano

Press Enter.

You will now get a listing of all of the energetic ports in your system. The previous couple of digits of an deal with (after the final colon) make up a port quantity. While its corresponding PID is the distinctive ID variety of the method that’s linked to it. 

To discover if a selected port is in use, sort the next command:

netstat -ano | findstr :port-number

Replace “port-number” with the precise port quantity and press Enter.

If it’s in use, you will note a PID on the proper, together with the phrases Listening or Established. 

To discover the method, open Task Manager by urgent Ctrl+Shitf+Esc. Then search for the method with that PID. 

If you don’t see the PID column, right-click on one of many columns and choose PID. 

Alternatively, you may make use of Resource Monitor to seek out the method. Press Start, sort useful resource monitor and open it.


Expand Network and search for the method with the PID.

How to Kill a Process on Port

Here are just a few methods that can can help you establish which course of is using which port and the way to kill it.  

Method #1: Via Command Prompt

Once Command Prompt (as proven earlier) and sort the next command:

To liberate a port and kill the method related to it, sort within the following command:

taskkill /PID <sort PID right here> /f

Then press Enter. You ought to now get a message saying that the method has been terminated.

This methodology is essentially the most generally used methodology to seek out and kill processes which can be on contentious ports reminiscent of port 8080 or 3000 which a number of processes and applications may need to entry. 

Method #2: Via PowerShell

Terminating the method related to the port will also be performed by way of PowerShell. This is how:

Press Start, sort Powershell, right-click on the outcome, and click on on Run as administrator. 

Similarly to the Command Prompt, sort the next command in PowerShell:

netstat -ano

Then Press Enter. You will get a listing of all energetic connections.

Once you may have the port, and its corresponding PID, you may know which course of is linked to it (proven earlier). Take observe of the PID that’s using up a selected port.

To kill the method, sort the next command:

taskkill /PID <enter PID right here> /f

Press Enter. You will now get a message telling you that the method has been terminated. 

Method #3: Via Task Manager

This methodology works provided that you already know the PID that’s linked to the port, for which function you’ll invariably need to go to confer with the command immediate or Powershell. But as soon as you discover the port and the PID related to it, you may as well finish its related course of by way of Task Manager. Here’s how to take action. 

Press Ctrl+Shift+Esc to open up Task Manager. Here, if you happen to don’t already see a PID tab, right-click on one of many tabs and choose PID.

Now discover the method that’s related to the PID that you simply need to kill. Right-click on the method and choose End Task.

That’s it. You have now freed up the port that was linked to that course of/PID.

Method #4: Via CurrPorts (Third Party Software)

There are just a few third-party apps that allow you to kill a course of that’s related to a port with only a click on. One of them is CurrPorts, a free software program that will get the job performed in a jiffy.

Download: CurrPorts

On the aforementioned hyperlink, scroll down and click on on Download CurrPorts.Once the file is downloaded, extract its contents after which run the cports.exe file. 

The foremost web page of CurrPorts will offer you all the data to a given course of, together with its PID and the port being utilized. Simply right-click the method that you simply need to kill and choose Kill Processes of Selected Ports.

Your port is now free. 

Though third-party purposes abound, the Command Prompt and PowerShell are nonetheless one of the vital used strategies to kill a course of on a port as they assist to each establish and execute the method with none extraneous downloads. We hope the strategies offered above allowed you to kill the processes on any given port on Windows 11. 

Check out more article on – How-To tutorial and latest highlights on – Technical News