Jan 11, 2024 5 min read

How to Install Wireshark on Ubuntu 22.04

Install wireshark on ubuntu 22.04 with our step-by-step tutorial. It is a widely-used network protocol analyzer that allow you to monitor traffic

Install Wireshark on Ubuntu 22.04
Install Wireshark on Ubuntu 22.04
Table of Contents

Introduction

Before we discuss how to install Wireshark on Ubuntu 22.04,let's briefly understand-What is Wireshark?

Wireshark is a widely-used network protocol analyzer that allows you to capture, analyze, and monitor network traffic.

This tutorial will walk you through the steps to install Wireshark on Ubuntu 22.04, outline its advantages, address common FAQs, and provide a conclusion.

Advantages

  1. Network Troubleshooting: Wireshark provides detailed insight into network traffic, allowing you to identify and diagnose network issues such as packet loss, latency, or misconfigurations.
  2. Security Analysis: With Wireshark, you can perform security analysis by observing network traffic patterns and detecting potential security vulnerabilities, intrusions, or malicious activities.
  3. Protocol Analysis: Wireshark supports a wide range of protocols, enabling you to examine and debug network communication at a granular level, ensuring compliance and interoperability.
  4. Traffic Optimization: By analyzing network traffic patterns, Wireshark helps optimize network performance by identifying bottlenecks, inefficient data transfer mechanisms, or unnecessary traffic.
  5. Educational Purposes: Wireshark's intuitive interface and extensive protocol decoding capabilities make it an excellent tool for network education, learning, and training purposes.

Steps to install Wireshark on Ubuntu 22.04 LTS

The commands provided in this tutorial work with other Ubuntu versions, including 18.04, as well as systems based on Debian.

Method 1: Using Standard Repository

Step 1. Update Ubuntu 22.04

It is not necessary for us to browse certain webpages or add any repositories. Since, one may install Wireshark by utilizing the Ubuntu standard repository. Therefore, to refresh the APT package management package index, perform the system update command first.

sudo apt update && sudo apt upgrade

Step 2. Install Wireshark

Installing Wireshark from the normal repository will get you the stable version, not the most recent one. Thus, this strategy is ideal for you if you want to avoid adding additional repositories. To complete the task, just execute the provided command.

sudo apt install wireshark

Method 2: Using PPA for the latest version

Step 1. Add WireShark PPA repository

The PPA repository made by the WireShark development team must be included in order to install the most recent version of the program.

sudo apt install software-properties-commonsudo
add-apt-repository ppa:wireshark-dev/stablesudo 
apt update

Step 2. Install WireShark on Ubuntu 22.04

Once the WireShark PPA repository is added, we can easily install the most recent version of this software using the APT package manager, just like we can with any other Ubuntu standard repository application.

sudo apt install wireshark

Step 3. Use WireShark as a non-root user, if you need

Default system behavior restricts network data capture to users with sudo access; if you want non-root users to be able to use Wireshark to examine the network, choose Yes; if not, select No and hit Enter.

Configure WireShark for Non root users

Step 4. Check Version

We can perform a version check to find out which version is installed on our machine once the installation is finished.

wireshark -v

Step 5. Run WireShark to capture network data

WireShark makes it simple to gather data from available network interfaces and do analysis. When Wireshark is installed on a machine, it records network traffic on its interfaces. You can view the contents of a data packet by using the program's ability to record data flow. The target system's IP address is constantly recorded. For instance, infamous programs can be unmasked using Wireshark.

sudo wireshark &

The first thing Wireshark displays when you launch it is the computer's interfaces. Mark the interface entry that has to be watched in the overview.

Run WireShark to capture network data

Step 6. Capture the data from available network interfaces

To begin recording, click the shark flipper icon located in the upper left corner. Proceed with your typical system operations. It is impossible to predict with absolute precision when a computer will make contact with its target host when detecting undesired network traffic. In addition, filter traffic recording from the beginning if you have specific suspicions about a protocol or destination later on. The "Recording filter" entry can be found in the "Record" menu.

Install WireShark on Ubuntu 22.04

Step 7. How to update

We only need to perform the system update or upgrade command to update WireShark to the most recent version because we installed it on our machine using either the system default repository or PPA.

sudo apt update && sudo apt upgrade

Step 8. Uninstall or remove Wireshark

We frequently find that after a while, certain software on our system can be removed to free up space. Here is the command to remove it if such is the case and software is Wireshark.

sudo apt remove --purge wireshark

Whereas those who want to remove its added PPA as well can use the given command.

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

FAQs to Install Wireshark on Ubuntu 22.04

How can I start Wireshark after installing it? 

Open a terminal and run the command wireshark to launch the Wireshark graphical interface.

Can I run Wireshark without root privileges? 

Yes, by adding your user to the wireshark group during installation (sudo usermod -aG wireshark $USER), you can run Wireshark as a non-root user.

How can I capture network traffic with Wireshark?

Launch Wireshark and select the network interface you wish to capture packets from. Click on the "Start Capture" button to begin capturing network traffic.

How can I filter captured packets in Wireshark? 

Wireshark offers powerful packet filtering capabilities. You can apply filters based on various criteria such as source/destination IP, port numbers, protocols, and much more using Wireshark's display filter syntax.

Can Wireshark decrypt SSL/TLS encrypted traffic? 

Wireshark can decrypt SSL/TLS traffic if you have access to the private key used for the encryption. You will need to import the key into Wireshark's SSL preferences.

Which protocols does Wireshark support? 

Wireshark supports a vast number of protocols, including popular ones like HTTP, TCP, UDP, SNMP, DNS, and many more. It can handle both standard and proprietary protocols.

Can Wireshark capture traffic from wireless networks?

Yes, Wireshark can capture traffic from wireless networks by selecting the appropriate wireless interface.

Conclusion

Now that you have installed Wireshark on Ubuntu 22.04, you may use it by following the instructions provided above. It gives you an effective tool for security, troubleshooting, and network investigation.

If you have any queries, feel free to ask them in comments section, and we would be happy to respond to them.........

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.