portpeek
A tiny Linux CLI for inspecting listening ports and the processes using them.
$ ./portpeek.sh
PORT PROTO PID PROCESS USER
22 tcp 842 sshd root
3000 tcp 9281 node nihitdev
5173 tcp 9342 vite nihitdev
8080 tcp 7132 docker-proxy rootNo giant framework. No daemon. Just a quick view of what's listening on your machine.
Features
- Show listening TCP and UDP ports
- Display the PID, process name, and owner when available
- Use - when process details are hidden by permissions
- Filter by a specific port
- Filter TCP or UDP sockets
- Always show numeric ports
- Clean terminal-friendly output with automatic color detection
- Report missing dependencies and socket-inspection failures clearly
- Uses standard Linux networking tools
- Zero installation required
Requirements
portpeek uses ss, which is provided by iproute2 on most Linux distributions.
Check whether it is available:
command -v ssArch Linux / CachyOS:
sudo pacman -S iproute2Debian / Ubuntu:
sudo apt install iproute2Fedora:
sudo dnf install iproute