Kill running processes in localhost

Step 1: Locate PID of running process

Open up cmd.exe as administrator, then run the below command. Substitute <PORT> with the appropriate port number:

netstat -ano | findstr :<PORT>

Step 2: Terminate the process by PID

Locate the PID of the process that’s using the port you want in the right-most column and run the next command.

taskkill /PID <PID> /F

source: Stack Overflow

Step 3: Make an alias because why not?

See: Cmder Aliases

Related