I often need to figure out what process is holding a port, but the commands and options are different across Windows, Linux, and macOS.I wanted one small tool I could use everywhere without having to remember lsof, ss, netstat, or PowerShell commands, and without having to look up a PID first and then separately figure out what process it belongs to.
Demo
Terminal previewOverview
Lists listening TCP/UDP ports and their associated processes
CLI / TUI that lists listening TCP/UDP ports
From the maintainer
Maintainer profilelsoff
I often need to figure out what process is holding a port, but the commands and options are different across Windows, Li
Lists listening TCP/UDP ports and their associated processes
Just run:lsoffThis opens the TUI and shows all listening TCP/UDP ports. Search for something like "8080" or "node", select the process, inspect what owns the port, and press x if you want to terminate it.For a quick CLI lookup, just run:lsoff 8080
I wanted it to stay small and behave consistently across Windows, Linux, and macOS.It does not shell out to lsof, ss, or netstat. It reads the native OS interfaces directly, while providing the same CLI/TUI on all three platforms.I also put extra care into process termination. lsoff tries to verify that the process being killed is still the same process that was originally listed, rather than blindly trusting a PID that may have been reused.
I want to keep the project small and focused. For now, I’m mainly polishing the TUI, improving cross-platform behavior, and incorporating feedback from people who actually use it.
Key details
- ›Homebrew tap for macOS and Linux
Maintainer install notes
Homebrew (macOS / Linux):brew tap yutat23/tapbrew trust yutat23/tapbrew install lsoffGo:go install github.com/yutat23/lsoff@latestPrebuilt binaries are also available from GitHub Releases.
Latest Release
What's Changed
- Docker support, ipv4/ipv6 filters, ctrl+u/d keys by @djthread in https://github.com/yutat23/lsoff/pull/2
New Contributors
- @djthread made their first contribution in https://github.com/yutat23/lsoff/pull/2
Full Changelog: https://github.com/yutat23/lsoff/compare/v0.1.4...v0.1.5
Discussions