Bash Tips: How to Kill a Process That’s Using a Port

If you’re a web programmer, you’ve probably been there.

You’re chugging along in the coding process, running a server on one of your localhost ports. At some point you’re ready to take a break, or maybe you decide you’re done for the day, so you close the terminal… and then you realize.

Phooey! You forgot to close the server and it’s still running on that port!

Unfortunately, the way to find and kill that process is not super obvious. Fortunately, it is pretty easy once you know what you’re…