Wednesday, July 20, 2016

TIP: kill service on port in macOS

Example: Postgres, which runs on port 5432:

lsof -Pn | awk '/:5432..LISTEN/ {print $2}' | xargs -t kill

Does anyone know if Brew or something has the equivalent of good old Linux fuser -k 5432 ?

No comments:

Post a Comment