mac command to kill process on port code example Example: kill port mac terminal sudo lsof -i <Port> sudo kill -9 <PID>