How To Install tcpdump on Fedora 34

tcpdump is A network traffic monitoring tool

Introduction

In this tutorial we learn how to install tcpdump on Fedora 34.

What is tcpdump

Tcpdump is a command-line tool for monitoring network traffic. Tcpdump can capture and display the packet headers on a particular network interface or on all interfaces. Tcpdump can display all of the packet headers, or just the ones that match particular criteria. Install tcpdump if you need a program to monitor network traffic.

We can use yum or dnf to install tcpdump on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install tcpdump.

Install tcpdump on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install tcpdump using dnf by running the following command:

sudo dnf -y install tcpdump

Install tcpdump on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install tcpdump using yum by running the following command:

sudo yum -y install tcpdump

How To Uninstall tcpdump on Fedora 34

To uninstall only the tcpdump package we can use the following command:

sudo dnf remove tcpdump

tcpdump Package Contents on Fedora 34

/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/5825002933662885e0954e69caad4acf1bf05e
/usr/lib/.build-id/6f
/usr/lib/.build-id/6f/fa026b962051d2a629afe5de339d46782a8f3f
/usr/sbin/tcpdump
/usr/sbin/tcpslice
/usr/share/doc/tcpdump
/usr/share/doc/tcpdump/CHANGES
/usr/share/doc/tcpdump/CREDITS
/usr/share/doc/tcpdump/README.md
/usr/share/licenses/tcpdump
/usr/share/licenses/tcpdump/LICENSE
/usr/share/man/man8/tcpdump.8.gz
/usr/share/man/man8/tcpslice.8.gz
/usr/lib/.build-id
/usr/lib/.build-id/77
/usr/lib/.build-id/77/0e038ba7a7fff67d14e04e9eafc8af842ff0b0
/usr/lib/.build-id/b9
/usr/lib/.build-id/b9/18015d68a2231fffffe99a2d413e1c7f1418d3
/usr/sbin/tcpdump
/usr/sbin/tcpslice
/usr/share/doc/tcpdump
/usr/share/doc/tcpdump/CHANGES
/usr/share/doc/tcpdump/CREDITS
/usr/share/doc/tcpdump/README.md
/usr/share/licenses/tcpdump
/usr/share/licenses/tcpdump/LICENSE
/usr/share/man/man8/tcpdump.8.gz
/usr/share/man/man8/tcpslice.8.gz

References

Summary

In this tutorial we learn how to install tcpdump on Fedora 34 using yum and dnf.