tcpdump is the Unix CLI packet sniffer. It is small, scriptable, and present on virtually every Linux box. Analysts use it on jump hosts, firewalls and servers to capture traffic for offline analysis in Wireshark when GUI access is impossible or too heavy.
Important concepts:
- BPF filters (
tcpdump host 1.2.3.4 and port 53) restrict what is captured at the kernel level. -w file.pcapand-r file.pcapare the standard write/read flags.-i anycaptures on all interfaces;-s 0captures full packets.- Rotating captures (
-C size -W count) keep long-running investigations within disk limits.