netstat/ss Cheatsheet

Network state.

Overview

netstat is legacy; ss is the modern replacement. Both show network connection state; ss is much faster on busy hosts and supports richer filters. Use ss first.

The approach

Three habits separate fluent ss from beginner ss: prefer ss over netstat, filter aggressively, and attribute every interesting connection to its process.

Why this compounds

ss fluency is high-leverage because the same toolset serves every TCP investigation the team runs. The patterns transfer to eBPF and modern observability tooling.