Crates.io | killport |
lib.rs | killport |
version | 1.1.0 |
source | src |
created_at | 2023-03-25 12:20:51.343253 |
updated_at | 2024-05-31 18:24:22.299767 |
description | A command-line tool to easily kill processes and containers running on a specified port. |
homepage | https://github.com/jkfran/killport |
repository | https://github.com/jkfran/killport |
max_upload_size | |
id | 820184 |
size | 125,747 |
killport
is a command-line utility designed for efficiently terminating processes and containers listening on specified ports. It supports both single and multiple port operations, enhancing system management across Linux, macOS, and Windows platforms. Built with Rust, killport
combines flexibility with performance in process management tasks.
Run the following command to install killport using Homebrew.
brew install killport
Run the following command to automatically download and install killport
:
curl -sL https://bit.ly/killport | sh
Don't forget to add $HOME/.local/bin
to your PATH
environment variable, if it's not already present.
Run the following command to install killport using cargo. If you don't have cargo, follow the official Rust installation guide.
cargo install killport
You can download the binary releases for different architectures from the releases page and manually install them.
killport [OPTIONS] <ports>...
-m, --mode <MODE>
: Select mode of operation (process, container, or both).-s, --signal <SIG>
: Specify the signal to send (default: SIGKILL).-v, --verbose
: Increase verbosity level (use multiple times for more detail).-q, --quiet
: Decrease verbosity level (use multiple times for less detail).--dry-run
: Preview which processes or containers would be terminated.-h, --help
: Display help message.-V, --version
: Display version information.Kill a single process on port 8080:
killport 8080
Kill processes on multiple ports with a specific signal:
killport -s sigterm 8045 8046 8080
Perform a dry run to check what would be killed on port 8080:
killport --dry-run 8080
Supported Signals:
Softest/Lower Preference Signals (Generally ignorable or default to terminate the process gently):
SIGUSR1
- User-defined signal 1SIGUSR2
- User-defined signal 2SIGWINCH
- Window size changeSIGURG
- Urgent condition on socketSIGCONT
- Continue if stoppedSIGCHLD
- Child status has changedSIGIO
- I/O now possibleSIGALRM
- Timer signalSIGVTALRM
- Virtual timer expiredSIGPROF
- Profiling timer expiredSIGPWR
- Power failureSIGSYS
- Bad argument to routineSIGPIPE
- Broken pipe: write to pipe with no readersSIGTERM
- Termination signalSIGHUP
- Hangup detected on controlling terminal or death of controlling processSIGINT
- This signal is sent to a process by its controlling terminal when a user wishes to interrupt the process.Higher Preference/More Disruptive Signals (Generally not ignorable and often default to terminate the process abruptly):
SIGQUIT
- Quit from keyboard and dump coreSIGABRT
- Abort signal from abort()SIGTSTP
- Stop typed at terminalSIGTTIN
- Terminal input for background processSIGTTOU
- Terminal output for background processSIGSTOP
- Stop processSIGSEGV
- Invalid memory referenceSIGBUS
- Bus error (bad memory access)SIGFPE
- Floating-point exceptionSIGILL
- Illegal InstructionSIGTRAP
- Trace/breakpoint trapMost Severe/Definitive Signals (Cannot be caught or ignored):
SIGKILL
- Kill signalWe welcome contributions to the killport project! Before you start, please read our Code of Conduct and the Contributing Guidelines.
To contribute, follow these steps:
We'll review your pull request and provide feedback or merge your changes.
This project is licensed under the MIT License. See the LICENSE file for more information.