Skip to content

Instantly share code, notes, and snippets.

@markojerkic
Created December 29, 2022 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markojerkic/eec0ae50ee74107b37d36bc825349d20 to your computer and use it in GitHub Desktop.
Save markojerkic/eec0ae50ee74107b37d36bc825349d20 to your computer and use it in GitHub Desktop.
Kill PIDs listening on TCP or UDP ports
for port in $@; do
fuser -kn tcp $port
fuser -kn udp $port
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment