How To Install Wireshark On Ubuntu 20.04 LTS

How To Install Wireshark on Ubuntu 20.04

On this short tutorial, we will discuss how to install Wireshark 3.4.2 (the lastes stable version so far) on Ubuntu 20.04 LTS Linux Operating system and test to use it in reading the data stream which is coming to the system.

Introduction

Wireshark is a free and open-source network protocol analyzer. Previously known as Ethereal, Wireshark is used for network troubleshooting, analysis, software and communications protocol development, and education. Wireshark is cross-platform, using the Qt widget toolkit in current releases to implement its user interface, and using pcap to capture packets; it runs on Linux, macOS, BSD, Solaris, some other Unix-like operating systems, and Microsoft Windows. There is also a terminal-based (non-GUI) version called TShark.

What’s New in Wireshark 3.4.2?

Wireshark 3.4.2 focuses on performance optimization and bug fixes. Here are some notable improvements:

  • Enhanced Protocol Support: Wireshark 3.4.2 adds and improves support for several protocols, including HTTP/3, QUIC, and TLS, enabling deeper inspection and analysis of modern web traffic.
  • Improved Filtering System: Updates to the display filter syntax make it easier to filter network traffic, especially for complex, multi-layered protocols.
  • Bug Fixes and Stability Improvements: Numerous bug fixes improve stability, such as better handling of malformed packets and increased reliability during high-traffic captures.

WireShark Installation On Ubuntu 20.04 LTS

The WireShark installation on Ubuntu 20.04 LTS operating system will be consist of several steps as mentioned below :

  1. Add The Wireshark Stable Repository
  2. Install Wireshark
  3. Configure Wireshark
  4. Launching Wireshark

The installation process will be discussed in more detail in the sub-chapter below.

Step 1 : Add The Wireshark Stable Repository

On this stage, we will add Wireshark stable repository to our Ubuntu System. For this purpose we will submit the following command line :

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

The output will be :

ramans@diginet-app02:~$ sudo add-apt-repository ppa:wireshark-dev/stable
[sudo] password for ramans: 
 Latest stable Wireshark releases back-ported from Debian package versions.

Back-porting script is available at https://github.com/rbalint/pkg-wireshark-ubuntu-ppa

From Ubuntu 16.04 you also need to enable "universe"  repository, see:
http://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository

The packaging repository for Debian and Ubuntu is at: https://salsa.debian.org/debian/wireshark
 More info: https://launchpad.net/~wireshark-dev/+archive/ubuntu/stable
Press [ENTER] to continue or Ctrl-c to cancel adding it.
. . .
Fetched 6,630 kB in 12s (576 kB/s)                                                                   
Reading package lists... Done

Then we will update our repository, by submitting command line :

$ sudo apt update

Step 2 : Install Wireshark

After all are set, then we will install Wireshark on our Ubuntu 20.04 system by submitting command line :

$ sudo apt -y install wireshark

Output :

ramans@diginet-app02:~$ sudo apt -y install wireshark
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libeclipse-jdt-core-java libfprint-2-tod1 libllvm9 libtcnative-1

Package configuration

On this installation, we will be prompted to enable root privilege to other user. By default the status is disable, by pressing ‘Yes’ we will confirm to give other user account to have root privilege.

Using Wireshark for non root user confirmation

After installation was completed done, then we will check Wireshark version by submitting command line :

$ wireshark --version

Output :

ramans@diginet-app02:~$ wireshark --version
Wireshark 3.4.2 (Git v3.4.2 packaged as 3.4.2-1~ubuntu20.04.0+wiresharkdevstable1)

Copyright 1998-2020 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with Qt 5.12.8, with libpcap, with POSIX capabilities (Linux),
with libnl 3, with GLib 2.64.3, with zlib 1.2.11, with SMI 0.4.8, with c-ares
1.15.0, with Lua 5.2.4, with GnuTLS 3.6.13 and PKCS #11 support, with Gcrypt
1.8.5, with MIT Kerberos, with MaxMind DB resolver, with nghttp2 1.40.0, with
brotli, with LZ4, with Zstandard, with Snappy, with libxml2 2.9.10, with
QtMultimedia, without automatic updates, with SpeexDSP (using system library).

Running on Linux 5.8.0-36-generic, with Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
(with SSE4.2), with 7933 MB of physical memory, with locale en_US.UTF-8, with
libpcap version 1.9.1 (with TPACKET_V3), with GnuTLS 3.6.13, with Gcrypt 1.8.5,
with brotli 1.0.7, with zlib 1.2.11, binary plugins supported (0 loaded).

Built using gcc 9.3.0.

On this section, we will configure accounts who could use Wireshark. For this purpose, we have to add account(s) to the Wireshark group so that these users can use Wireshark. As our example we will add all user to be able to user Wireshark. To do this, we will submit the command line :


You must add a username to the Wireshark group so that this user can use Wireshark. To do this, execute the following command, adding your required username after “wireshark” in the command.

Step 3 : Configure Wireshark

On this stage, we will configure a new non root user system to be able to use Wireshark. For this purpose we will create a new user and give him a privilege to be able to run Wireshark.

ramans@diginet-app02:~$ sudo usermod -a -G wireshark $USER
[sudo] password for ramans: 
ramans@diginet-app02:~$ sudo chgrp wireshark /usr/bin/dumpcap
ramans@diginet-app02:~$ sudo chmod 750 /usr/bin/dumpcap
ramans@diginet-app02:~$ sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
ramans@diginet-app02:~$ sudo getcap /usr/bin/dumpcap
/usr/bin/dumpcap = cap_net_admin,cap_net_raw+eip

Step 4 : Launch Wireshark Monitoring Tools

There are two options for running the Wireshark application on Ubuntu, namely: via the terminal/konsole or through the Graphical User Interface (GUI). By using terminal or console, we will submit the command line :

$ wireshark

By using the GUI desktop, we just search Wireshark application, and double click it to launch. The application can be seen as shown below.

Launching Wireshark for the first use on Ubuntu 20.04
Launching Wireshark for the first use on Ubuntu 20.04

Conclusion

On this short tutorial, we have learn how to install Wireshark, a Network Analyzer tools on Ubuntu 20.04 operating system. I hope this article could be helpful.

(Visited 151 times, 1 visits today)

You may also like