Skip to content

Instantly share code, notes, and snippets.

@jmstfv
Created December 26, 2019 07:18
Show Gist options
  • Save jmstfv/823cebb2f0d014d81e93d204e856dd22 to your computer and use it in GitHub Desktop.
Save jmstfv/823cebb2f0d014d81e93d204e856dd22 to your computer and use it in GitHub Desktop.
Kill the process by the port number
# replace 4567 with a target port number of the process
# run lsof with sudo if the process was spawned by the root user
kill -9 $(lsof -ti tcp:4567)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment