DEV Community

Dedar Alam
Dedar Alam

Posted on • Edited on

How to clear port 8080 in windows

Step 1:

Open up cmd.exe (note: you may need to run it as an administrator, but this isn't always necessary), then run the below command:

netstat -ano | findstr <Port Number>
Enter fullscreen mode Exit fullscreen mode

(Replace with the port number you want, but keep the colon)

The area circled in red shows the PID (process identifier). Locate the PID of the process that's using the port you want.

Step 2:

Next, run the following command:

taskkill /F /PID <Process Id>
Enter fullscreen mode Exit fullscreen mode

Example

STEP - 1
netstat -ano | findstr 8080
Enter fullscreen mode Exit fullscreen mode
TCP  0.0.0.0:18080    0.0.0.0:0     LISTENING    19788
TCP  [::]:18080       [::]:0        LISTENING    19788
Enter fullscreen mode Exit fullscreen mode
STEP - 2
taskkill /F /PID 19788
Enter fullscreen mode Exit fullscreen mode
SUCCESS: The process with PID 19788 has been terminated.
Enter fullscreen mode Exit fullscreen mode

Source

Top comments (1)

Collapse
 
moopet profile image
Ben Sinclair

The area circled in red shows the PID (process identifier

There's no area circled in red.