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
Action Steps
- Install `port-peek` using npm by running `npm install -g port-peek`
- Run `port-peek <port_number>` to find the process using the specified port
- Use `port-peek` to identify and kill the process occupying the port
- Configure your system to use `port-peek` as an alias for the command `lsof -i :<port_number> | grep LISTEN`
- 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`!
DeepCamp AI