EN
Windows / cmd.exe - kill process that uses port 8080 (default Tomcat port)
9
points
In this short article, you we would like to show how to kill process that uses port 8080 using cmd.exe (under Windows).
Motivation:
Sometimes when we stop debugger, Tomcat proces still works, and it is necessary to kill it manually using Windows Command Prompt.
Quick solution:
netstat -ano | findstr :8080
taskkill /PID 8224 /F
Where: 8224
is PID returned from netstat
command.
Practical example
In this section, you can find complete example how to kill process run on port 8080
using Windows Command Prompt.
Commands example:
C:\> netstat -ano | findstr :8080
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 8224
TCP [::]:8080 [::]:0 LISTENING 8224
C:\> taskkill /PID 8224 /F
SUCCESS: The process with PID 8224 has been terminated.
Where:
netstat -ano | findstr :8080
lists all processes that use port8080
,taskkill /PID 8224 /F
kills indicated process by PID, e.g.8224
.
Graphical example: