command to kill all ports in mac terminal code example Example 1: kill all node server mac terminal killall node Example 2: kill port in mac terminal sudo lsof -i :5955