How to kill a process which is using port 8080 in windows
Contents
If we try to run the two different processes using the same port 8080, we will receive the error message such as “identiy and stop any process that’s listening on port 8080“. Let’s understand the few terms(Process,Process Id and Port number) that are used here.
Process:
A process is basically a copy of a program. So, if you run a program like Notepad multiple times, each specific time will get its own Process. A process uses resources, such as available RAM on your computer. If you look at Task Manager and you see the program running multiple times, each different occurrence of the program can be a different process.
Process Id:
The PID (“process ID”) numbers are assigned by the operating system each time a new process is made.
Port Number:
A port number is a way to identify a specific process to which an Internet or other network message is to be forwarded when it arrives at a server.A port number is the logical address of each application or process that helps in identifying the sender and receiver processes of messages.
Steps to kill the process which is using port 8080
We need to run few commands in the command prompt to kill the process that are using port 8080.
Step 1 : Find Process id in windows using command prompt
1 |
netstat -ano | findstr <Port Number> |
Example:
1 2 3 |
C:\Users\RevisitClass>netstat -ano | findstr 8080 TCP 0.0.0.0:18080 0.0.0.0:0 LISTENING 19788 TCP [::]:18080 [::]:0 LISTENING 19788 |
Step 2 : Kill the process using command prompt
1 |
taskkill /F /PID <Process Id> |
Example:
1 2 |
C:\Users\RevisitClass>taskkill /F /PID 19788 SUCCESS: The process with PID 19788 has been terminated. |
Recommended Articles
Kill a process which is using specific port in Linux
Your Suggestions