how to close port on mac code example Example 1: kill port in mac npx kill-port 8080 Example 2: how to close a port mac sudo lsof -i :5955