Kill Occupation Port Windows

[Solved] Kill Occupation Port Windows | Ruby - Code Explorer | yomemimo.com
Question : kill occupation port windows

Answered by : khanh-le

// Option 1: if you have [email protected]^ version
npx kill-port 8080
// Linux
kill -9 $(lsof -t -i tcp:8080)
// Windows command line:
for /f "tokens=5" %a in ('netstat -aon ^| find ":8080" ^| find "LISTENING"') do taskkill /f /pid %a
// Windows bat-file:
for /f "tokens=5" %%a in ('netstat -aon ^| find ":8080" ^| find "LISTENING"') do taskkill /f /pid %%a

Source : https://stackoverflow.com/questions/39632667/how-do-i-kill-the-process-currently-using-a-port-on-localhost-in-windows | Last Update : Wed, 08 Sep 21

Answers related to kill occupation port windows

Code Explorer Popular Question For Ruby