Find which process is using your port

Find which process is using your port

Find which process is using your port

At times, you get address in use error for web servers in development environment.

Use lsof to find out the process using the port.

# to get all the ports
sudo lsof -nP -iTCP -sTCP:LISTEN

# to get a particular port
sudo lsof -nP -iTCP:3000 -sTCP:LISTEN