how to kill a process running pn a port in mac terminal code example Example: kill process running on port mac sudo lsof -i :3000 kill -9 <PID>