Skip to main content

whoisport

crates.io CI

Find out what is listening on a TCP or UDP port, and optionally kill it.

whoisport demo

$ whoisport 3000
port    3000
pid     373232
parent  373230
user    kaitlyn
cmd     node node_modules/.bin/vite --port 3000
cwd     /home/kaitlyn/site
uptime  4m 12s

$ whoisport 3000 --kill
...
pid 373232: exited after SIGTERM

$ whoisport
PORT   PID      USER       CMD
3000   373232   kaitlyn    node node_modules/.bin/vite --port 3000
5432   ?        ?          ?
8080   41120    kaitlyn    python3 -m http.server 8080
ports marked ? are owned by another user; run with sudo to see it

lsof -i :3000 gives you a PID and a wall of columns. whoisport gives you the command line, the directory it was started from, who owns it and how long it has been running, which is usually what you need to decide whether to kill it.

Install

cargo binstall whoisport   # prebuilt binary, no compiling
cargo install whoisport    # build from source
pipx install whoisport     # or: uvx whoisport, pip install whoisport
npm install -g whoisport   # or: pnpm add -g, yarn global add, bun add -g, npx whoisport

macOS or Linux, with Homebrew:

brew install dpologdvinity/tap/whoisport

Debian/Ubuntu or Fedora/RHEL: download the .deb or .rpm for your architecture from the Releases page, then

sudo apt install ./whoisport_*.deb     # Debian, Ubuntu
sudo dnf install ./whoisport-*.rpm     # Fedora, RHEL

Windows, with Scoop:

scoop bucket add whoisport https://github.com/dpologdvinity/whoisport
scoop install whoisport

Or download a binary from the Releases page: Linux (static, x86_64 and aarch64), macOS (Apple Silicon and Intel) and Windows (x86_64).

Works on Linux (reads /proc directly, no runtime dependencies), macOS (uses the built-in lsof) and Windows 10/11.

Usage

whoisport                          # list every listening port
whoisport <PORT>...                # details for one or more ports
whoisport <PORT>... --kill [--force]
whoisport [<PORT>...] --json       # machine-readable output
whoisport [<PORT>...] --udp        # UDP instead of TCP
Flag Effect
--kill Ask the process to exit and wait up to 3 seconds.
--force With --kill: forcibly terminate it if asking did not work.
--json Print a JSON array with port, proto, pid, ppid, user, cmd, cwd, uptime_secs, container, image.
--udp Look at UDP sockets instead of TCP. UDP has no listening state, so any bound socket without a remote peer counts. Windows doesn't report UDP peers, so there every bound UDP socket is listed, including short-lived client ones.

Docker: when a port is published by a container, whoisport shows the container name and image (docker web (nginx:alpine)), even when the docker-proxy process itself is owned by root. It asks docker ps only in that case.

--kill always needs explicit ports; it never kills everything.

How --kill asks, per platform:

Platform --kill --force
Linux, macOS SIGTERM SIGKILL
Windows Ctrl+C in the process's console, and WM_CLOSE to its windows TerminateProcess

On Windows, Ctrl+C reaches every program attached to a console, so whoisport only sends it when the target's console holds nothing but the target, its child processes and a shell. Otherwise it says so and leaves the choice of --force to you.

Exit codes: 0 success, 1 a requested port had nothing listening (or nothing is listening at all), 2 invalid arguments, 3 a kill failed.

Checks IPv4 and IPv6 TCP sockets in the LISTEN state. On Linux, processes owned by other users can't be inspected without sudo; they show up as ?. On Windows, details of system services need an elevated terminal. On macOS, other users' listeners only appear when run with sudo.

License

MIT

Metadata

Release files for whoisport 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whoisport 0.5.3
File Size Uploaded Provenance
whoisport-0.5.3.tar.gz 22.9 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for whoisport 0.5.3
File
whoisport-0.5.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
whoisport-0.5.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
whoisport-0.5.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
whoisport-0.5.3-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
whoisport-0.5.3-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 1.9 MB

Release files / whoisport-0.5.3.tar.gz

Download URL whoisport-0.5.3.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
640127c009df23f7ba2d48c9b9ca19245249a77ca79ec2ff9a5886112c569e01
BLAKE2b-256 checksum
How to use checksums
a0ace781d627efad89085dbed9ffda46670b0f860753a35f88917818cdfd16b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / whoisport-0.5.3-py3-none-win_amd64.whl

Download URL whoisport-0.5.3-py3-none-win_amd64.whl
Size 388.7 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2a783bc21dd535c73652627833617834241fa3e9391c0a17160028cdfbbd18cd
BLAKE2b-256 checksum
How to use checksums
e13043998c7d5df06395f4d5e4b46aa90e71d95ed2ec8a849b17ca4c1d39a63b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / whoisport-0.5.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL whoisport-0.5.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 396.7 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d765116360f2d5b45036b517b33a625053f1df4ab13ecfa91e593efc3dd9e0a8
BLAKE2b-256 checksum
How to use checksums
358311f48325aa3cea343d9d32a18fcab929be5fbe8eb4963c84759ef8eb91fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / whoisport-0.5.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL whoisport-0.5.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 378.1 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f36d87d9cb071f7b78392d1771ec862137b043907d9a015f19b2801799453eb0
BLAKE2b-256 checksum
How to use checksums
67b0a49d0eabc8e5576ce96abe90238aa32b6edbe633f3503f18a0b6bf9fb5ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / whoisport-0.5.3-py3-none-macosx_11_0_arm64.whl

Download URL whoisport-0.5.3-py3-none-macosx_11_0_arm64.whl
Size 351.7 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2b9a7176bee1e0074a0ae444e02c1ee33c60a13f76fd8caa4c9952c8a9bee9a0
BLAKE2b-256 checksum
How to use checksums
e2eeae98adf0ade57ac437226c9d57f58cb41d6920c8dccd708111ea73751b00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / whoisport-0.5.3-py3-none-macosx_10_12_x86_64.whl

Download URL whoisport-0.5.3-py3-none-macosx_10_12_x86_64.whl
Size 377.8 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7f630892da9c04a2b70342a47b090f81b63372b265033b01997cd8c165218b13
BLAKE2b-256 checksum
How to use checksums
fd39b8f806c5439f3027877313594acc521353b44ad8d4bbbafc67692ac938e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for whoisport 0.5.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for whoisport-0.5.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page