Easy Tutorial
❮ Verilog Assign Android Tutorial Contents ❯

How to Check Which Process is Using a Port in Windows

Category Programming Technology

It is common to encounter situations where a port is already in use during development. In such cases, we need to identify the program using the port and terminate it. This article explains how to find a port that is in use.

1. Open the Command Window (Run as Administrator)

Start—->Run—->cmd, or use the window+R shortcut to open the command window.

2. Find All Running Ports

Enter the command:

netstat -ano

This command lists all port usage.

In the list, observe the occupied port, for example, 1224, and locate it first.

3. View the PID Corresponding to the Occupied Port

Enter the command:

netstat -aon|findstr "8081"

Press Enter to execute the command, and the last number is the PID, which is 9088 in this case.

4. View the Process for the Specified PID

Continue by entering the command:

tasklist|findstr "9088"

Press Enter to execute the command.

Check which process or program is using port 8081, and the result is: node.exe.

Terminate the Process

Forcefully (/F parameter) kill all processes including child processes (/T parameter) with PID 9088:

taskkill /T /F /PID 9088

Alternatively, open the Task Manager, switch to the Processes tab, and check the PID column for 9088 to see which process it corresponds to. If the PID column is not visible, refer to the image below:

After identifying the process, you can terminate it to free up the port for use.

** Click to Share Notes

Cancel

-

-

-

❮ Verilog Assign Android Tutorial Contents ❯