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