A TUI to list and kill processes listening on TCP ports. macOS and Linux.
pstop shows every process bound to a listening TCP port — dev servers,
databases, Docker proxies, forgotten background jobs — and lets you kill
them without leaving the terminal.
brew install --cask CHashtager/tap/pstopcurl -sSL https://raw.githubusercontent.com/CHashtager/pstop/master/install.sh | shInstalls to /usr/local/bin (uses sudo when needed). For a user-local install
without sudo:
curl -sSL https://raw.githubusercontent.com/CHashtager/pstop/master/install.sh | PREFIX="$HOME/.local/bin" shThe script verifies the release checksum and warns if lsof is missing.
# amd64
wget https://github.com/CHashtager/pstop/releases/latest/download/pstop_linux_amd64.deb
sudo apt install ./pstop_linux_amd64.deb
# arm64
wget https://github.com/CHashtager/pstop/releases/latest/download/pstop_linux_arm64.deb
sudo apt install ./pstop_linux_arm64.debapt automatically pulls in the lsof dependency. (An .rpm is attached to
each release for Fedora/RHEL: sudo dnf install ./pstop_linux_amd64.rpm.)
go install github.com/CHashtager/pstop@latestDownload pstop_*_<os>_<arch>.tar.gz and checksums.txt from the
releases page, verify, unpack:
shasum -a 256 -c <(grep pstop_.*_darwin_arm64.tar.gz checksums.txt)
tar -xzf pstop_*_darwin_arm64.tar.gz pstop
sudo mv pstop /usr/local/bin/pstop # open the TUI
sudo pstop # also kill processes owned by other users
pstop -p 3000 # show only listeners on port 3000
pstop -i 500ms # refresh every 500ms (default 2s)
pstop --print # print the table once and exit (script-friendly)
pstop --version| Key | Action |
|---|---|
↑/↓, j/k |
move selection |
enter |
kill selected process (SIGTERM, with confirm) |
K |
force-kill selected process (SIGKILL, with confirm) |
/ |
filter by name, port, user or address (esc clears) |
s |
cycle sort column: port → pid → process → user |
r |
refresh now |
q |
quit |
Notes:
- IPv4 and IPv6 sockets on the same port are merged into one row; several PIDs sharing a port (e.g. php-fpm workers) stay as separate rows.
- Killing processes owned by other users requires running
pstopwith sudo; the confirm dialog warns you in advance. SIGTERMasks nicely — give the process a moment to shut down; it may still appear for a refresh cycle. UseKwhen it refuses to die.
lsof— preinstalled on macOS; on Ubuntu/Debiansudo apt install lsof(installed automatically when using the.deb).- macOS or Linux on amd64/arm64.
The release binaries are not signed with an Apple Developer certificate. Installs via Homebrew or the install script handle this for you. If you download a tarball in a browser and macOS refuses to run the binary, remove the quarantine flag once:
xattr -d com.apple.quarantine /usr/local/bin/pstopgo build -o pstop . # build
go test ./... # unit tests
./pstop --print # smoke-test the scan pipeline without a TTYThe release workflow builds darwin/linux (amd64/arm64) tarballs with
checksums, .deb/.rpm packages, publishes the GitHub release and updates
the Homebrew cask in CHashtager/homebrew-tap.