kill -9 $(sudo lsof -t -i:8080)
Step 1:
netstat -ano | findstr :yourPortNumber
Change in Step 2 to:
tskill typeyourPIDhere
Note: taskkill is not working in some git bash terminal
sudo kill $(sudo lsof -t -i:3000)
netstat -ano | findstr :<PORT>
(Replace <PORT> with the port number you want, but keep the colon)
Step 2:
Next, run the following command:
taskkill /PID <PID> /F
sudo kill -9 $(sudo lsof -t -i:8080)
// Open cmd with admintrastor and only use one command
for /f "tokens=5" %a in ('netstat -aon ^| findstr 3306') do taskkill /PID %a /F & exit
// Option 1: if you have npm@5.2.0^ 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
kill -9 $(lsof -t -i tcp:8080)
# If node and npm (v5.2+) are installed:
npx kill-port <PORT>
# e.g. npx kill-port 5000
netstat -aon | findstr 8080
taskkill /f /pid 77777
sudo kill -9 $(lsof -i :3000 -t)
kill -9 $(sudo lsof -t -i:'portName')
//Ex. if portname is 3000
//then we will execute "kill -9 $(sudo lsof -t -i:3000)"
fuser -k -n tcp 3000
:8080.
C:Userspsmith>netstat -ano|findstr "PID :8080"
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:8081 0.0.0.0:0 LISTENING 18264
taskkill /pid 18264 /f
➜ ~ taskkill /PID <process_id> /F
netstat -ano | findstr :yourPortNumber
tskill typeyourPIDhere