nixkill
nixkill is a lightweight command-line tool that helps you quickly identify and terminate processes using a specific port or PID on your system. This is particularly useful for developers who need to free up occupied ports or terminate specific processes without manually searching for process IDs.
β¨ Features
- Find and kill processes by port or PID π
- Interactive confirmation before termination β οΈ
- Lightweight & easy to use β‘
- Works on Linux & macOS π§π
π Installation
Install via go install
To install nixkill using Go:
go install github.com/Benozo/nixkill@latest
Ensure $GOPATH/bin is in your system's PATH to run nixkill directly:
export PATH=$PATH:$(go env GOPATH)/bin
Install via Git (Manual Build)
- Clone the repository:
git clone https://github.com/Benozo/nixkill.git
- Navigate into the project directory:
cd nixkill
- Build the binary:
go build -o nixkill
- Make it executable:
chmod +x nixkill
π Usage
Run nixkill to free up a specific port:
./nixkill
Enter 'port' to kill A port or Enter 'pid' to kill BY PID (port/pid): port
Enter the port to kill: 8080
Processes [39420] are using port 8080.
Do you want to kill them? (y/n): y
Killing process 39420...
β
Successfully killed process 39420
Run nixkill to kill a specific PID:
./nixkill
Enter 'port' to kill A port or Enter 'pid' to kill BY PID (port/pid): pid
Enter the pid to kill: 37806
Do you want to kill process 37806? (y/n): y
Killing process 37806...
β
Successfully killed process 37806
If a process is found, it will prompt for confirmation before terminating it.
π οΈ Roadmap & Contributions
Weβre always looking to improve! Future enhancements may include:
Contributions are welcome! Feel free to fork the repository and submit pull requests.
π License
nixkill is released under the MIT License.
π GitHub Repository: github.com/Benozo/nixkill