Tuesday, August 16, 2016

Windows Kill Process By Port Number

If you need to kill a process manually on Windows its actually pretty easy. First fire up a command prompt and type the following command.
netstat -a -o -n
To kill the process we need to find the PID of the process in question. I just run down the list by port until I find port 8080 and here you will see the process id was 28344.
Finally with the PID we can run the following command to kill the process
taskkill /F /PID 28344

Specific Port Killing

Open command prompt and run the following commands
 C:\Users\username>netstat -o -n -a | findstr 0.0:3000
   TCP    0.0.0.0:3000      0.0.0.0:0              LISTENING       3116

C:\Users\username>taskkill /F /PID 3116
, here 3116 is the process ID

Reource Link:
  1. Windows Kill Process By Port Number
  2. Kill a Process by Looking up the Port being used by it from a .BAT

No comments:

Post a Comment