mac stop port code example Example 1: kill port in mac npx kill-port 8080 Example 2: kill port mac kill -9 <PID>