tcpdump

Install latest/stable of tcpdump

Ubuntu 16.04 or later?

Make sure snap support is enabled in your Desktop store.


Install using the command line

sudo snap install tcpdump

Don't have snapd? Get set up for snaps.

Channel Version Published

Command-line network traffic analyzer

This program allows you to dump the traffic on a network. tcpdump is able to examine IPv4, ICMPv4, IPv6, ICMPv6, UDP, TCP, SNMP, AFS BGP, RIP, PIM, DVMRP, IGMP, SMB, OSPF, NFS and many other packet types.

It can be used to print out the headers of packets on a network interface, filter packets that match a certain expression. You can use this tool to track down network problems, to detect attacks or to monitor network activities.

This snap is not maintained by https://www.tcpdump.org/ and instead packages the deb of tcpdump from the Ubuntu archive as a snap. Please see the developer website (below) for details.

Usage

 $ sudo tcpdump

tcpdump will drop privileges to the snap_daemon user and group by default. To write out captures, the /var/snap/tcpdump/common/captures directory is created with snap_daemon ownership. Eg:

 $ sudo tcpdump -w /var/snap/tcpdump/common/captures/my.pcap

If you prefer, you may use '-Z root' to prevent dropping privileges and then write out anywhere in the snap's writable areas.

If want to save pcap files to $HOME or /media, optionally:

 $ sudo snap connect tcpdump:home
 $ sudo snap connect tcpdump:removable-media

In these cases, you will need to create a directory that snap_daemon can write to. Eg:

 $ mkdir -m 770 $HOME/captures
 $ sudo chown root:snap-daemon $HOME/captures
 $ sudo tcpdump -w $HOME/captures/my.pcap

Integration with other snaps

This snap exports the /var/snap/tcpdump/common/captures as a writable area via the content interface. Other snaps may specify in their snap.yaml:

 plugs:
   captures:
     interface: content
     target: $SNAP_DATA/tcpdump-captures

Then when install that snap:

 $ sudo snap connect <yoursnap>:captures tcpdump:captures

Details for tcpdump

License
  • BSD-3-Clause

Last updated
  • 19 February 2024 - latest/stable
  • 18 February 2024 - latest/edge

Websites

Contact

Report a Snap Store violation

Share this snap

Generate an embeddable card to be shared on external websites.


Install tcpdump on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.


Where people are using tcpdump

Users by distribution (log)

Ubuntu 24.04
Ubuntu 22.04
Ubuntu 20.04
Raspbian 10
Ubuntu 18.04
Raspbian 11
Debian 11
Debian 12
Manjaro
openSUSE Leap 15.4
Ubuntu 24.10
Ubuntu Core 20
Ubuntu Core 22
Zorin OS 17
Ubuntu Core 16
Ubuntu 23.10
Ubuntu 23.04