A simple TUI application for managing open network ports on Linux.
You run an application, the terminal crashes for some reason, and the server keeps running in the background. To find and kill the process responsible for that port, you need to run non-trivial commands. This tool solves that.
A Rust CLI with a terminal UI (TUI) that lists open ports, filters out system services, and lets you kill processes with a few keystrokes.
- List open ports — Shows all TCP ports with process name and executable path
- Kill by port — CLI mode to directly kill a process on a given port
- Search — Live filter by process name or port number
- Kill — Enter to open confirmation modal, then confirm to force kill (SIGKILL)
- Keyboard-driven — No mouse needed
curl -LsSf https://raw.githubusercontent.com/enrell/port/main/scripts/install.sh | shThis downloads and installs the latest release for your architecture (x86_64 or aarch64).
cargo build --release
install -Dm755 target/release/port ~/.local/bin/portport # Start TUI (lists all open ports)
port 3000 # Kill the process on port 3000
port -t # Explicit TUI mode (same as bare 'port')
port -v # Show the installed version
port --version # Show the installed version| Key | Action |
|---|---|
↑ / k |
Move up |
↓ / j |
Move down |
/ or i |
Enter search mode |
Enter |
Open kill confirmation modal |
y |
Confirm kill (in modal) |
n or Esc |
Cancel (in modal) |
r |
Refresh port list |
q or Ctrl+C |
Quit |
src/
├── main.rs # Entry point
├── app.rs # State management
├── ui.rs # Ratatui rendering
├── events.rs # Input handling
├── ports.rs # Port discovery (/proc/net/tcp)
├── process.rs # Process operations (kill)
├── filter.rs # System port filtering
└── lib.rs # Module exports
Run tests:
cargo testRun in debug mode:
cargo run- Linux kernel (reads from /proc filesystem)
- Rust toolchain