How to kill the process currently using a port on localhost in windows

How to kill the process currently using a port on 
                                  localhost in windows

Step 1:-

Run the command line as an Administrator. Then run the below-mentioned command.

netstat -ano | findstr :port number

Copy from here:-

netstat -ano | findstr :8080

Step2 :-

After that, you will get this kind of result

so here last digit 3444 is your PID
taskkill /F /PID PID

taskkill /F /PID 3444

By following these steps and being cautious when ending processes, Windows users can effectively manage port usage, ensuring a secure and efficient computing environment.