pcapdump command not found

In this troubleshooting guide we learn how to fix pcapdump command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

pcapdump: command not found

or when using sudo you get the following error message

sudo: pcapdump: command not found

Solutions to pcapdump: command not found

How To Fix pcapdump: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pcapdump is provided by pcaputils package.

pcaputils is:

pcaputils includes the following libpcap-based utilities:

  • pcapip: filters an input pcap file based on a file containing IP addresses
  • pcappick: picks specific frames out of a pcap by number
  • pcapuc: prints unique src IPs, dst IPs, or {src, dst} IP pairs witnessed
  • pcapdump: a dedicated packet capture utility similar to dumpcap, but with these features:
  • logs packet dump and drop rates
  • can run as a daemon
  • can dynamically reload its configuration without dropping packets
  • can be signalled to immediately rotate its capture output file
  • can partition its output based on time intervals (e.g., start of hour or start of day)
  • can strip application data from the trace file (output headers only)
  • can sample the packet stream (e.g., only dump every 1 in 10 or 1 in 100 packets)

To fix this problem, we can install more using the command below.

sudo apt-get -y install pcaputils

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install pcaputils.

sudo apt -y install pcaputils

Or if you have aptitude installed you can use the following command.

sudo aptitude install pcaputils

Summary

In this tutorial we learn how to fix pcapdump command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.