Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

tcpdump and Wireshark CLI Packet Analysis Cheat Sheet

tcpdump and Wireshark CLI Packet Analysis Cheat Sheet

Back to Operating Systems and CLI
Updated 2026-05-21
Next Topic: Ubuntu Cheat Sheet

tcpdump and Wireshark are the two dominant packet analysis tools in networking and security work. tcpdump (v5.0, powered by libpcap) is a lightweight CLI sniffer using Berkeley Packet Filter (BPF) syntax for capture filters. tshark is Wireshark's headless CLI counterpart and supports both BPF capture filters and Wireshark's rich display filter language. Together they cover everything from quick triage on remote servers to deep forensic analysis of pcap files. This cheat sheet covers basic capture, BPF filters, file I/O, tshark output formats, display filters, TLS decryption, remote capture, statistics, profiles, expert info, export objects, and tool selection guidance β€” ordered from foundational to advanced.

What This Cheat Sheet Covers

This topic spans 17 focused tables and 219 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: tcpdump Basic Capture SyntaxTable 2: tcpdump Output and Display OptionsTable 3: BPF Capture Filter PrimitivesTable 4: BPF Boolean Logic and Advanced ExpressionsTable 5: tcpdump File I/O and Ring BufferTable 6: Common Protocol Capture FiltersTable 7: tshark Capture and Basic OptionsTable 8: tshark Output Formats and Field ExtractionTable 9: Wireshark and tshark Display Filter LanguageTable 10: tshark Statistics (-z option)Table 11: TLS DecryptionTable 12: Remote Capture via SSH PipeTable 13: Export Objects and Stream FollowingTable 14: Wireshark Expert Info and Protocol HierarchyTable 15: Wireshark Configuration ProfilesTable 16: Companion Tools (editcap, mergecap, capinfos, dumpcap)Table 17: Performance and Tool Selection

Table 1: tcpdump Basic Capture Syntax

ConceptExampleDescription
Capture on specific interface
tcpdump -i eth0
β€’ Sniff on interface eth0
β€’ use any to capture on all interfaces
List available interfaces
tcpdump -D
Print numbered list of interfaces available for capture
Limit packet count
tcpdump -i eth0 -c 100
Stop capture after receiving 100 packets
Suppress DNS and port resolution
tcpdump -nn
β€’ -n skips hostname lookup
β€’ -nn also skips port name lookup
Verbose output levels
tcpdump -v / -vv / -vvv
β€’ Each level adds more decoded fields
β€’ -vvv shows maximum detail
Quiet / summary mode
tcpdump -q
Print less protocol information per line
Run as non-root user
tcpdump -Z tcpdumpuser
Drop privileges to specified user after opening capture interface

More in Operating Systems and CLI

  • tar gzip zip Archive and Compression Tools Cheat Sheet
  • Ubuntu Cheat Sheet
  • AWS CLI Cheat Sheet
  • GCP CLI Cheat Sheet
  • Linux Text Processing with grep, sed, and awk Cheat Sheet
  • Starship and Oh My Posh Cross-Shell Prompts Cheat Sheet
View all 48 topics in Operating Systems and CLI