mac stop port from running code example Example: kill port mac terminal sudo lsof -i <Port> sudo kill -9 <PID>