Created
August 13, 2019 09:14
-
-
Save mrwanashraf/1fcf985acaa5b8aae955cb3b0f731a2f to your computer and use it in GitHub Desktop.
sometimes stopping a dev server doesn't free the port that the server is using. here is how to list used ports and how to kill a specific port in that context using linux.
This file contains hidden or 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
| #!/bin/bash | |
| # 💡 Search for busy ports | |
| netstat -lnp | |
| # ✋ kill a specific port | |
| fuser -k portNumber/tcp | |
| # 💡 example | |
| fuser -k 8080/tcp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment