Languages
[Edit]
EN

Windows / cmd.exe - kill process that uses port 8080 (default Tomcat port)

9 points
Created by:
Roseanne-Read
1335

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 port 8080,
    • taskkill /PID 8224 /F kills indicated process by PID, e.g. 8224.

     

    Graphical example:

    Process killing by port number using cmd.exe
    Process killing by port number using cmd.exe

    See also

    1. Windows - kill process that listen on specific port using cmd.exe

    Donate to Dirask
    Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
    Join to our subscribers to be up to date with content, news and offers.
    Native Advertising
    🚀
    Get your tech brand or product in front of software developers.
    For more information Contact us
    Dirask - we help you to
    solve coding problems.
    Ask question.

    ❤️💻 🙂

    Join