Skip to content
Edith

Docs

Command reference

ed ports

ed ports is the command-line surface for the Ports page under Developer. It lists the local servers listening on this Mac, says which process holds a port, opens a dev server in the browser and frees a port by stopping the process that holds it.

The ed command line

Command What it does
ed ports ls Lists dev servers, or every listening process with --all.
ed ports who Says which process holds a port.
ed ports kill Frees a port by stopping the process that holds it.
ed ports open Opens a dev server in the default browser.

Ports reads sockets with the macOS process information calls and needs no administrator rights, so it sees processes of the signed-in user only. A port held by another user, such as a system daemon, can still be in use when who finds no holder. Secrets in command lines, such as --token values and passwords in connection URLs, are masked in every output.