Kill porcess using your port

March 06, 2020

Rails sometime freezes and you are force to close terminal. This is can leave the port taken and your not able to start rails on the same port.

Here is a little command you can run to clear that port on your laptop so you can run rails again. make sure you change port 3000 to the port you want to use

sudo kill -9 $(lsof -i :3000 -t)

Search