Last active
April 9, 2021 00:29
-
-
Save dylansalim3/67af5ad8f8b1e948f297cca307f75d94 to your computer and use it in GitHub Desktop.
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
// in cmd | |
netstat -aon | find "PORT_NUM" | |
// In bash: | |
netstat -na | grep "8080" | |
// In PowerShell: | |
netstat -na | Select-String "8080" | |
Sample Output: | |
TCP 0.0.0.0:4848 0.0.0.0:0 LISTENING 9856 | |
TCP [::]:4848 [::]:0 LISTENING 9856 | |
taskkill /F /PID 9856 | |
Anyway you can stop the process which uses your port and let your application take it. | |
Use netstat -a -o -n to check for the port usages. | |
Use taskkill /F /PID <pid> to kill that process. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment