Skip to content

Instantly share code, notes, and snippets.

@jclosure
Created August 5, 2020 05:13
Show Gist options
  • Save jclosure/3170dc432dc3c8aac13b691aa470e17a to your computer and use it in GitHub Desktop.
Save jclosure/3170dc432dc3c8aac13b691aa470e17a to your computer and use it in GitHub Desktop.
Simple bash command to kill a process that's occupying a port by specifying the port as arg
#!/bin/bash
PORT=$1
kill `lsof -t -i:$PORT`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment