Skip to main content

What Is tcpdump?

tcpdump is a widely available command-line packet analyzer for Unix-like systems, with Windows builds that use Npcap or WinPcap. It uses libpcap to capture and filter network traffic, for live packet capture and offline PCAP inspection.

Use Cases

Quick packet capture on servers and devices without a GUI; scripting automated capture workflows.

Strengths and Limitations

Strengths

  • +Builds on Unix-like systems through libpcap and on Windows with Npcap or WinPcap.
  • +Filter expressions in pcap-filter syntax compile to BPF programs for precise packet selection.
  • +Writes raw packets to a file with -w instead of parsing them, for later reading with -r or other PCAP tools.

Limitations

  • -Command-line only; no GUI for interactive packet inspection (use Wireshark for that).
  • -Packets can be dropped when the capture buffer runs out of space; tcpdump reports the drop count.

Defensive Use

Capturing network traffic for forensic analysis on servers and devices where GUI tools are unavailable.

tcpdump Alternatives

3 tools
ToolPricing
Arkime

Full packet capture and indexing platform for storing, searching, and inspecting PCAP files across large enterprise networks.

Open Source
Wireshark

Network packet analyzer and protocol inspection tool for capturing live traffic and debugging network communications in detail.

Open Source
Zeek

Network security monitoring framework that translates raw packet traffic into structured transaction logs and network events.

Open Source

Frequently Asked Questions

What is tcpdump?→

tcpdump is a widely available command-line packet analyzer for Unix-like systems, with Windows builds that use Npcap or WinPcap. It uses libpcap to capture and filter network traffic, for live packet capture and offline PCAP inspection.

What is tcpdump used for?→

Quick packet capture on servers and devices without a GUI; scripting automated capture workflows.

What are the strengths of tcpdump?→
  • +Builds on Unix-like systems through libpcap and on Windows with Npcap or WinPcap.
  • +Filter expressions in pcap-filter syntax compile to BPF programs for precise packet selection.
  • +Writes raw packets to a file with -w instead of parsing them, for later reading with -r or other PCAP tools.
What are the limitations of tcpdump?→
  • +Command-line only; no GUI for interactive packet inspection (use Wireshark for that).
  • +Packets can be dropped when the capture buffer runs out of space; tcpdump reports the drop count.
How is tcpdump used defensively?→

Capturing network traffic for forensic analysis on servers and devices where GUI tools are unavailable.