Skip to content

Instantly share code, notes, and snippets.

@abhagsain
Last active August 16, 2023 05:14
Show Gist options
  • Save abhagsain/620120eb99cc5944d478a23757f9e00f to your computer and use it in GitHub Desktop.
Save abhagsain/620120eb99cc5944d478a23757f9e00f to your computer and use it in GitHub Desktop.
How to kill process on port in Windows
```
# Run this in CMD only and not in bash
netstat -ano | findstr :3001
# This will give
TCP 0.0.0.0:3001 0.0.0.0:0 LISTENING 24928 👈
TCP [::]:3001 [::]:0 LISTENING 24928
TCP [::1]:3001 [::1]:64750 TIME_WAIT 0
TCP [::1]:3001 [::1]:64781 TIME_WAIT 0
# Run this command passing the PID
taskkill /f /pid 24928
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment