When a port is already in use, there is no interactive way to find it — so I built `port-peek`

📰 Dev.to · Mu Micro

Learn to use `port-peek` to find which process is using a port when it's already in use

intermediate Published 21 May 2026
Action Steps
  1. Install `port-peek` using npm by running `npm install -g port-peek`
  2. Run `port-peek <port_number>` to find the process using the specified port
  3. Use `port-peek` to identify and kill the process occupying the port
  4. Configure your system to use `port-peek` as an alias for the command `lsof -i :<port_number> | grep LISTEN`
  5. Test `port-peek` with different port numbers to ensure it's working correctly
Who Needs to Know This

Developers and DevOps engineers can benefit from using `port-peek` to simplify their workflow when dealing with port conflicts

Key Insight

💡 `port-peek` simplifies the process of finding which process is using a port when it's already in use

Share This
💡 Tired of chaining lsof & grep to find port usage? Try `port-peek`!
Read full article → ← Back to Reads