Introduction
portop shows every TCP and UDP socket on a machine together with the process, service and container behind it and who can reach it, and lets you inspect or stop the owner. It runs on Linux, macOS and Windows, in the terminal, in a browser, or inside Cockpit.
What it answers
- What is using this port? The owning process, its systemd unit or Windows service, its Docker, Podman or Kubernetes container, and the user it runs as.
- Who can reach it? Whether the port is bound to every interface, one address or loopback only, and what the host firewall does with it.
- What changed? New listening ports are highlighted live, and
--diffcompares the host against a saved baseline from cron or CI. - How do I get the port back? Stop the owner from the table, or run
portop --free 8080in a script.
Where it runs
- The terminal UI, an htop-style table that refreshes every two seconds.
- The command line, for JSON snapshots,
--wait,--free, baselines and Compose audits. - A web dashboard with sign-in, TLS and Prometheus metrics, and a Cockpit add-on.
Next steps
Install portop, read First run and permissions, then see Platform support for what each operating system provides.