kill process listening on port mac code example Example 1: kill port in mac npx kill-port 8080 Example 2: kill port in mac terminal sudo lsof -i :5955