sudo lsof -t -i tcp:8000 | xargs kill -9
# list the running ports
$ netstat -ltnp
# kill specific port in my case for django 8000. kill using PID
$ kill -9 31434
netstat -ona | findstr :8080 | findstr LISTENING
Code language: Bash (bash)
taskkill /PID 25321 /F
netstat -ona | findstr :8080 | findstr LISTENING
Code language: Bash (bash)
taskkill /PID 25321 /F
netstat -ona | findstr :8080 | findstr LISTENING
Code language: Bash (bash)