Ben Borgers

How to kill a localhost process on macOS

December 12, 2019

Sometimes you've got a development server running on a localhost port in the background that you can't seem to stop.

For example, if the port is localhost:8000, run:

sudo lsof -i :8000

You should see the processes running on that port. Take note of the PID for these processes.

Then, run:

kill -9 <PID>

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iā€™m working on!

Twitter ↗ RSS feed ↗