Skip to content

Instantly share code, notes, and snippets.

@mrwanashraf
Created August 13, 2019 09:14
Show Gist options
  • Select an option

  • Save mrwanashraf/1fcf985acaa5b8aae955cb3b0f731a2f to your computer and use it in GitHub Desktop.

Select an option

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.
#!/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