Skip to content

Instantly share code, notes, and snippets.

@topokel
Created December 13, 2013 02:02
Show Gist options
  • Select an option

  • Save topokel/7938808 to your computer and use it in GitHub Desktop.

Select an option

Save topokel/7938808 to your computer and use it in GitHub Desktop.
Bash script to kill process on specified port
#!/bin/bash
lsof -i :${1} | awk 'NR!=1 {print $2}' | xargs kill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment