tcpdump command not found

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

Introduction

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

tcpdump: command not found

or when using sudo you get the following error message

sudo: tcpdump: command not found

Solutions to tcpdump: command not found

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

In Ubuntu tcpdump is provided by tcpdump package.

tcpdump is:

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.

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

sudo apt-get -y install tcpdump

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

You can also use apt command to install tcpdump.

sudo apt -y install tcpdump

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

sudo aptitude install tcpdump

Summary

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