Skip to content

Instantly share code, notes, and snippets.

@scottnath
Last active December 13, 2016 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottnath/46975f35fb5015eb6ea1ae3b09015d19 to your computer and use it in GitHub Desktop.
Save scottnath/46975f35fb5015eb6ea1ae3b09015d19 to your computer and use it in GitHub Desktop.
# Kill the port you found
`kill -9 PID`
i.e.:
`kill -9 11623`
# Find the port
`lsof -i :PORT`
i.e.:
`lsof -i :6004`
## returns this sorta thing:
```bash
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 11623 scottnath 31u IPv6 0xf92206e95a31d471 0t0 TCP localhost:6004->localhost:54730 (CLOSE_WAIT)
node 11623 scottnath 32u IPv6 0xf92206e95a31c451 0t0 TCP localhost:6004->localhost:54731 (CLOSE_WAIT)
node 11623 scottnath 33u IPv6 0xf92206e95a31ef51 0t0 TCP localhost:6004->localhost:54732 (CLOSE_WAIT)
node 11623 scottnath 34u IPv6 0xf92206e95a320a31 0t0 TCP localhost:6004->localhost:54733 (CLOSE_WAIT)
node 11623 scottnath 40u IPv6 0xf92206e95a31d9d1 0t0 TCP *:6004 (LISTEN)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment