Skip to content

Instantly share code, notes, and snippets.

@tallesairan
Created February 8, 2019 11:01
Show Gist options
  • Select an option

  • Save tallesairan/57639dd46c108cb88feb79bfb7b2adb2 to your computer and use it in GitHub Desktop.

Select an option

Save tallesairan/57639dd46c108cb88feb79bfb7b2adb2 to your computer and use it in GitHub Desktop.
Kill process by port
To list any process listening to the port 8080:
lsof -i:8080
To kill any process listening to the port 8080:
kill $(lsof -t -i:8080)
or more violently:
kill -9 $(lsof -t -i:8080)
(-9 corresponds to the SIGKILL - terminate immediately/hard kill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment