How to Install or Uninstall tshark on Ubuntu 22.04

Updated: September 23, 2022

Wireshark is a network “sniffer” - a tool that captures and analyzes packets off the wire. Wireshark can decode too many protocols to list here. I will show you how to install tshark on Ubuntu 22.04 in this guide.

Prerequisites

  • Operating system: tshark needs Ubuntu 22.04 to work
  • Privileges: Verify that you can execute the sudo commands line.

Prerequisites to install tshark on Ubuntu 22.04

Install tshark Ubuntu 22.04

tshark is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install tshark using APT

This is one of the most popular methods for installing Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these steps to get tshark on your Ubuntu 22.04.

Step 1: Update the APT database to fetch new packages from Ubuntu. Opening the terminal and executing this Linux command:

sudo apt update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install tshark Ubuntu by pasting this command into the terminal and pressing Enter.

sudo apt-get install tshark

Install tshark using Aptitude

With Aptitude, users can view a list of available packages and manage their installation, upgrade, and removal of packages. If you didn’t install it on Ubuntu, you need to install it by executing this command.

sudo apt-get -y install aptitude

Then, you can now install tshark, just following these steps:

Step 1: Obtain new packages from Ubuntu by updating the APT database. Opening the terminal and executing the following Linux command:

sudo apt-get update

Step 2: Install the package on Ubuntu 22.04. You can now install tshark Ubuntu by executing this command in the terminal.

sudo aptitude install tshark

Uninstall tshark on Ubuntu 22.04

Have you ever considered how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone, not just package administrators, can easily uninstall any program.

You can uninstall tshark on Ubuntu by running this command if you installed it using APT or Aptitude.

sudo apt remove --auto-remove tshark

If you want to uninstall tshark and delete its data and dependencies, you can also run the following command:

sudo apt autoremove --purge tshark

Conclusion

In this guide, I showed you ways to install tshark on Ubuntu 22.04 and ways to uninstall tshark too. If you need any help, don’t hesitate to contact me. I’m very glad to answer them.