Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Wireshark on Ubuntu

Install Wireshark with apt, allow non-root capture, or build it from source.

VPS and Cloud Servers2 min read4 steps5 screenshots

Method 1: apt

1. Update the package list

sudo apt update
Updating the package list

2. Install Wireshark

sudo apt install wireshark
Installing Wireshark

During the install a question asks if non-superusers may capture packets. Choose Yes to allow members of the wireshark group to capture without root. Then add your user:

sudo usermod -aG wireshark $USER

Log out and in again.

3. Start Wireshark

Run wireshark or open it from the applications menu.

Starting Wireshark
The Wireshark interface

Run with root rights

sudo wireshark
Warning: Running a GUI program as root has risks. The wireshark group method is safer.

Method 2: Build from source

Requirements

  • A C compiler such as gcc and a C++ compiler such as g++.
  • The GTK or Qt development libraries.
  • libpcap-dev.
  • cmake and ninja-build, or the build tools named in the Wireshark developer guide.

Steps

  1. Download the latest source from the Wireshark website.
    Downloading the Wireshark source
  2. Extract it:
tar -xvf wireshark-x.y.z.tar.xz
cd wireshark-x.y.z
  1. Install the dependencies. Wireshark provides a helper script for Debian and Ubuntu:
sudo tools/debian-setup.sh --install-optional
  1. Build and install:
mkdir build && cd build
cmake ..
make
sudo make install
Note: Newer Wireshark versions use CMake. Old ./configure instructions apply only to very old releases.

Quick recap

  • sudo apt install wireshark is enough for most users.
  • Add your user to the wireshark group to capture without root.