Last active
March 2, 2023 19:01
-
-
Save xdesro/e7bbec9b2a1c31f0c04a1e2d22597dd8 to your computer and use it in GitHub Desktop.
Kill processes at a given port.
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
function killport { | |
echo '🚨 Killing all processes at port' $1 | |
lsof -ti tcp:$1 | xargs kill | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment