how to find what process is using a port mac python code example Example: mac terminal find process by port sudo lsof -i tcp:3000