4th gen AMD EPYC coming soon Pre-order now

How to Install Wireshark on Ubuntu 22.04 | Step-by-Step

March 4th, 2024
How to Install Wireshark on Ubuntu 22.04 | Step-by-Step

Wireshark is a highly beneficial tool for network administrators, researchers, developers, testers, security professionals, and people in jobs related to networking or DevOps engineering. This step-by-step tutorial will show you how to install Wireshark on Ubuntu 22.04 and use this tool to your advantage.

After reading this guide, you will be knowledgeable in installation, updating packages, Wireshark installation methods, and post-installation steps.

What is Wireshark?

Wireshark is a free and open-source tool designed for real-time network traffic analysis created by Gerald Combs in 1998. Starting with basics like capturing, filtering, and following streams, it lets you monitor and diagnose common issues. Wireshark is one of the top network traffic analyzers available on the market these days. Many individuals use it for various network-related tasks.

What is Wireshark used for?

Wireshark is a great tool that converts network traffic into a human-readable format. If we look at the key features of Wireshark, it can capture live traffic packets, analyze real-time network traffic, and filter traffic based on different criteria.

  • Researchers use Wireshark to analyze the content of the packets and create various statistics;
  • Security teams use Wireshark to examine suspicious network traffic content, identify traffic spikes, etc.;
  • Troubleshoot network issues;
  • Identifying and learning about network traffic protocols;
  • Debugging protocol implementation;
  • Verifying network applications.

How to use Wireshark?

Since Wireshark is open source, you can download and use any version of Wireshark for free from wireshark.org. It's available for Linux, Windows, and Mac. It also has a user-friendly graphical user interface (GUI) to simplify the analysis process. While Wireshark initially supported only Solaris and Linux, now it runs on all the major operating systems. Keep reading for detailed instructions on how to install and start using Wireshark.


Before you install Wireshark on Ubuntu, ensure your Ubuntu machine meets the following requirements:

  1. Sudo privileges to install software on the system;
  2. A reliable internet connection to download Wireshark and its dependencies;
  3. Adequate disk space for the Wireshark installation. Note that Wireshark doesn't need much space. However, ensure that your system has enough space to avoid any issues during the installation.

How to install Wireshark on Ubuntu 22.04: Step-by-step

After fulfilling the above prerequisites, you can proceed with the Wireshark installation. Now, let's proceed with the below steps to learn how to install Wireshark on Ubuntu 22.04.

Step 1. Update packages and repositories

As a best practice, you must first update the existing packages and repositories. It will help you maintain the latest versions of the packages. Using the latest version of Ubuntu will also ensure that you get the latest version of Wireshark.

Open the Ubuntu terminal and run the following sudo apt update command:

sudo apt update

update existing packages and repositories example

You must proceed with this update command to upgrade the installed packages of your systems. Then, enter the following command:

sudo apt full-upgrade

upgrade installed packages example

This command will perform a more thorough upgrade than just upgrading through apt upgrade.

Sometimes, you will be asked for authorization to continue with the upgrade. In that case, type ‘Y’ and press Enter to continue with the upgrade.

You can even combine and run both commands simultaneously, as mentioned below.

sudo apt update && sudo apt upgrade

Step 2. Install Wireshark on Ubuntu

There are several methods to install Wireshark on Ubuntu. The most common installation methods include the following:

  1. Installation using the APT (Advanced Package Tool).
  2. Installation using the Personal Package Archive (PPA)

Method 1: Installation using the APT

The software repository of Ubuntu includes Wireshark by default, which enables you to install the package using the APT. It is the easiest and most straightforward method. It ensures you have the latest version of Wireshark when the Ubuntu system is updated. Execute the following command in the Ubuntu terminal.

sudo apt install wireshark

install wireshark using APT example

You will be asked for authorization to continue during this installation. Type ‘Y’ and press Enter to continue with the installation.

During the installation, the following prompt window will appear for configuring wireshark-common in package configuration. This prompt provides you with two options to choose from. One is to allow using non-superusers. The second is to disable using non-superusers and only allow root users to access and use it. You can select ‘Yes’ or ‘No’ based on your choice.

Here, Dumpcap is the tool that enables network traffic packet capture and file saving. By default, the packets are captured in pcapng format.

install wireshark propmt window example

If you selected ‘Yes,’ you must add each user to the ‘wireshark’ user group using the following command. There, add the username of your user after the wireshark part.

sudo usermod -aG wireshark "username"

For example,

sudo usermod -aG sudo ugehan

add username example

During the installation, you might devise another prompt to update kernels. Hit 'Yes' and continue with the installation.

update kernels prompt example

Method 2: Installation using the PPA

If the Ubuntu version of your computer is older, you can use the PPA maintained by the Wireshark developers. Use the following command to install it:

sudo add-apt-repository ppa:wireshark-dev/stable -y

install wireshack using PPA example

Executing the above command will add the official Wireshark PPA to your list of repositories. Then, update the package list of your system and proceed with the Wireshark installation by executing the following commands:

sudo apt update
sudo apt install wireshark

Step 3. Check the Wireshark version

You can use any of the above methods to install Wireshark. Then, you can verify the version of Wireshark using the following command:

wireshark --version

check wireshack version example

Step 4. Launch Wireshark

You can start Wireshark by typing the sudo wireshark command in the terminal. It will open the Wireshark Graphical User Interface (GUI), where you can analyze the network traffic.

start wireshack by command example

You can also open the Wireshark application tool directly from the Ubuntu desktop. For that, open the activities, type ‘Wireshark’ in the search bar, and hit enter. Then, click on the Wireshark icon to run the Wireshark application.

start wireshack from desktop example

How to uninstall Wireshark?

Sometimes, you may need to uninstall Wireshark from Ubuntu. Assume you used the sudo apt install command to install Wireshark. Then, you can use the following command to uninstall Wireshark:

sudo apt-get remove --purge wireshark

The above --purge option will also delete the configuration files associated with the Wireshark installation. So, you can use that option if you want to completely remove the software without leaving any modified configuration data.

uninstall wireshack using APT example

If you used the PPA to install Wireshark, use the following command to uninstall Wireshark.

sudo apt-get-repository –remove ppa:wireshark-dev/stable -y

uninstall wireshack using PPA example

It is best practice to update your package list using the sudo apt update command. It will ensure the system does not consider packages removed from the PPA.


This guide gave you a step-by-step tutorial on how to install Wireshark on Ubuntu 22.04. We also covered the prerequisites for the installation, updating packages, Wireshark installation methods, post-installation steps, and how to uninstall Wireshark completely. Following these steps will enable you to install Wireshark on Ubuntu successfully and use it for your specific requirements.

Shanika is a technical consultant and writer with over eight years of experience as a software engineer in the IT sector. Her professional journey started as a software engineer with WSO2. At the same time, she started working as a freelancer on Upwork. She has collaborated with numerous companies throughout her freelance career, including Digication, Splunk, BMC.com, Filestack, APILayer, Flosum, Blazemeter, Sencha, and over twenty others. Having opportunities to work with various companies in different roles has allowed her to amass a wealth of experience. Shanika is an expert in web development, programming, Java, Python, React, Cypress, CI/CD, Docker, and Kubernetes,m. She has significantly contributed to developing products such as IAM solutions, APIs, OCR technologies, test management systems, and front-end frameworks throughout her career. She has also produced blog articles, tutorials, user guides, product documentation, and many other documents, as well as consulting companies to enhance their productivity. Overall, Shanika brings together the experience of a web developer, automation engineer, DevOps developer, software consultant, and technical writer, which is the main reason behind her success as a freelancer. Shanika received her B.Sc. (Hons) in Computer Science from University of Moratuwa, Sri Lanka and resides in Colombo, Sri Lanka.

Cloud VPS - Cheaper Each Month

Start with $9.99 and pay $0.5 less until your price reaches $6 / month.

We use cookies to ensure seamless user experience for our website. Required cookies - technical, functional and analytical - are set automatically. Please accept the use of targeted cookies to ensure the best marketing experience for your user journey. You may revoke your consent at any time through our Cookie Policy.
build: 5a9fc6cd.612