talira

A powerful command-line packet analyzer

open sourceBSD-3-Clauseself-hostablefree

tcpdump is the classic command-line packet analyzer from The Tcpdump Group: it captures traffic on a network interface, keeps the packets that match a filter expression, and prints a decoded line (or a hex and ASCII dump) for each one, or writes the raw packets to a pcap file to read later with tcpdump, Wireshark or other tools. It's built on libpcap, the Group's portable C/C++ library for packet capture, which provides the BPF filter language and pcap file format that most capture tools share. Originally written by Van Jacobson as part of research into TCP and gateway performance, it runs on Linux, macOS, the BSDs, Solaris, illumos and more, and on Windows with Npcap or WinPcap. It's BSD-licensed, and in 2025 the Sovereign Tech Agency paid one maintainer part-time to work on libpcap.

Ways to install

Problems it solves

  • see the packets going in and out of a server's network interface from an SSH session
  • capture traffic on a remote Linux box to a pcap file and open it in Wireshark on my laptop
  • check whether a server's DNS queries are actually leaving the machine
  • narrow a packet capture down to one host and port with a short filter expression
  • debug why a TCP connection resets by watching the handshake and flags packet by packet
  • rotate packet capture files by size or time so a long capture doesn't fill the disk
  • print packet contents as hex and ASCII to see what a client is really sending
  • capture network traffic on a minimal server or container that has no desktop
  • a portable C library for capturing packets in my own network monitoring program

Features

  • live capture from network interfaces with BPF filter expressions
  • decoded one-line output per packet for many protocols
  • hex and ASCII payload dumps
  • writes and reads pcap capture files, with file rotation
  • built on libpcap, a portable C/C++ packet capture library maintained by the same group

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what tcpdump does.

  1. Wireshark The world's leading network protocol analyzer
  2. Termshark A terminal UI for tshark, inspired by Wireshark
  3. ngrep grep applied to the network layer
  4. Kubeshark Network Observability for SREs & AI Agents
  5. libpcap A portable C/C++ library for network traffic capture
  6. Npcap Packet capture library for Windows

Compare tcpdump with the top 3