mac localhost terminal application kill code example Example: how to close a port mac sudo lsof -i :5955