Kill whatever is running on a port, without digging through lsof output yourself.
npm install -g @moakk/killport-clikillport 3000killport 3000 8080 5432Skip the confirmation prompt:
killport 3000 --forcePort 3000 is in use:
Process : node
PID : 12345
User : bob
Command : /usr/local/bin/node server.js
Kill it? [y/N]
- Tries SIGTERM first, falls back to SIGKILL if the process doesn't exit within 2 seconds
- If you get a permission error, re-run with
sudo - macOS and Linux only (uses
lsofandpsunder the hood)
ISC