Last active
August 16, 2023 05:14
-
-
Save abhagsain/620120eb99cc5944d478a23757f9e00f to your computer and use it in GitHub Desktop.
How to kill process on port in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
# 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