A fast, cross-platform utility to safely kill processes using specific ports on Windows, macOS, and Linux.
β¨ Cross-Platform - Works on Windows, macOS, and Linux
π― Interactive Menu - Easy OS selection (no need to memorize commands)
π‘οΈ Safe - Always asks for confirmation before killing processes
βοΈ Zero Dependencies - Uses only Node.js built-in modules
π Fast - Kills ports instantly
π¨ Beautiful UI - Colorized output with Unicode borders
π Developer Info - Shows package info on success
npm install -g process-killer-cliThe -g flag installs globally, making the command available everywhere.
process-killerThen follow the prompts:
- Select OS - Choose your operating system (1=Windows, 2=macOS, 3=Linux)
- Enter Port - Type the port number (e.g., 3001, 8080, 5000)
- Confirm - Review the process info and confirm
- Done! - Port is freed and ready to use
$ process-killer
Select your Operating System:
1) Windows
2) macOS
3) Linux
Enter your choice (1, 2, or 3): 2
β macOS selected
Enter the port number you want to stop (e.g., 8087): 3000
β Searching for processes using port 3000...
Found process with PID: 12345 using port 3000
Process Name: node
Port: 3000
PID: 12345
Do you want to kill this process? (y/n): y
β Port 3000 has been killed!
You can now start your backend server on this port.
$ process-killer
...
Enter the port number you want to stop: 8080
β Port 8080 has been killed!$ process-killer
...
Enter the port number you want to stop: 5000
β Port 5000 has been killed!| OS | Status | Notes |
|---|---|---|
| Windows | β Fully Supported | Uses netstat, tasklist, taskkill |
| macOS | β Fully Supported | Uses lsof, ps, fuser |
| Linux | β Fully Supported | Uses lsof, ps, fuser |
- Node.js >= 12.0.0
- npm or yarn
- Uses
netstat -anoto find process by port - Uses
tasklistto get process name - Uses
taskkill /PID X /Fto terminate process
- Uses
lsof -ti:PORTto find process by port - Uses
psto get process name - Uses
fuser -k PORT/tcpto terminate process
Some ports enter TIME_WAIT state. Wait 30-60 seconds and try again.
The tool may need elevated privileges:
sudo process-killerVerify the port number is correct using:
Windows:
netstat -ano | findstr :3000macOS/Linux:
lsof -i :3000Make sure you installed it globally with the -g flag:
npm install -g process-killer-clinpm uninstall -g process-killer-cliWindows:
netstat -ano | findstr :3000
taskkill /PID 12345 /FmacOS/Linux:
lsof -i :3000
sudo kill -9 12345
# OR
sudo fuser -k 3000/tcpnpm install -g process-killer-cli@latest- β¨ Fixed installation documentation
- π¨ Beautiful colorized UI with Unicode borders
- π Cross-platform support (Windows, macOS, Linux)
- π Interactive OS selection menu
- π― Safe operation with confirmation
- π Developer information display
- β‘ Zero external dependencies
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
MIT Β© Milon Mia
This project is open source and available under the MIT License.
Milon Mia
- GitHub: @devmilon923
- npm: process-killer-cli
- Email: dev.milon923@gmail.com
If you found this tool helpful, please:
- β Star on GitHub
- π’ Share with friends
- π Report issues
- π‘ Suggest improvements
Q: Is it safe to use?
A: Yes! The tool always asks for confirmation before killing any process.
Q: Can I use this on Windows?
A: Yes! Full native Windows support without WSL.
Q: Do I need to remember commands?
A: No! Interactive menu guides you through every step.
Q: What if I kill the wrong process?
A: The tool shows process details before killing, so you can verify.
Q: Can I use this in scripts?
A: This tool is interactive. For automation, use OS-specific commands directly.
Q: Why do I need the -g flag?
A: The -g flag installs the tool globally so you can use the process-killer command from any folder on your computer.
Have questions or suggestions? Open an issue on GitHub: GitHub Issues
Made with β€οΈ for Developers
Happy coding! π