Technical walkthrough ·
prt 0.6.0: find the process behind a local port
A development server will not start because its port is already occupied. Before stopping anything, you need to know which process owns that listener.
prt puts local network connections and their owning processes into a keyboard-driven terminal interface. Version 0.6.0 was released on October 9, 2026. It also provides a one-shot JSON export for scripts.
Start with a snapshot
cargo install prt --version 0.6.0 --locked
prt --version
prt --export json
Installing this release from source requires Rust 1.88 or newer, according to its release notes. On macOS, scanning uses the system’s lsof; Linux requires /proc. The release also offers prebuilt packages, but the check described here used Cargo on macOS arm64.
Use --export json when you want one snapshot and an exit. --json continuously streams observations instead. Exported data can include process details, so filter it before sharing a diagnostic report.
A small check you can reproduce
Open a test listener in one terminal:
python3 -m http.server 18765 --bind 127.0.0.1
In another terminal, inspect that port:
prt --export json | jq '.[] | select(.local_addr == "127.0.0.1:18765") | {local_addr, state, process: {pid: .process.pid, name: .process.name}}'
lsof -nP -iTCP:18765 -sTCP:LISTEN
Compare the listener and PID. Stop the test server with Ctrl+C in its original terminal when finished. If that fixed port is already occupied, choose a free one and change it in both commands.
The local validation for this article used an automatically allocated free loopback port. The v0.6.0 JSON snapshot contained the listener and the correct PID; a separate lsof invocation agreed. No elevated privileges were used.
This is a check of a known listener and its presentation in prt. On macOS both observations ultimately depend on lsof; their agreement does not independently establish the completeness of OS process visibility.
From a snapshot to the interface
Run prt to open the terminal interface. The release documents three main sections: Connections, Processes and SSH, switched with Tab or Shift+Tab. Space opens contextual actions; ? opens help and : opens the command palette.
The 0.6.0 release includes navigation changes, listener-health fixes, SSH-tunnel editing and reconnect handling. These features are described in the release notes. The listener check above does not verify all of them.
Where the check stops
This validation covered installation and one-shot port ownership on macOS arm64. It did not test Linux, visibility into other users’ processes, SSH tunnels, firewall actions or process termination. A process owning a port is not evidence that it is safe to stop.
For a quick single-port lookup, lsof already answers the ownership question. prt adds the terminal interface, process context and export modes for workflows that benefit from them. No performance advantage over another tool is claimed here.
Source and documentation · v0.6.0 release
Disclosure: this article was drafted with AI assistance. The Cargo installation and synthetic-listener check were executed locally; the broader feature descriptions are attributed to the release documentation.