terminal command for mac to see which port is running which process code example Example: mac terminal find process by port sudo lsof -i tcp:3000