Flawless: how to install wireshark on ubuntu, expert guide
Understand how to install wireshark on ubuntu simply. This guide covers install wireshark ubuntu and its impact, with real-world examples and facts.

How to Install Wireshark on Ubuntu: The Definitive Guide for Non-Root Users
Wireshark is a free and open-source Network Protocol Analyzer. Do you truly understand the traffic flowing across your network? Can you quickly diagnose a slow application or pinpoint a security threat? Are you prepared to troubleshoot complex connectivity issues when they arise? Understanding how to install Wireshark on Ubuntu is a fundamental skill for anyone serious about network analysis.
Millions of users worldwide utilize Wireshark every day. This powerful Open Source Software helps network administrators, security analysts, and developers gain deep insights. It captures and interactively displays network traffic in real-time, supporting hundreds of network protocols for deep inspection. We'll walk through the process, ensuring you gain full control over your network visibility.
Why Ubuntu for Wireshark?
Ubuntu stands as a popular Debian-based Linux operating system, widely favored for its stability, community support, and robust package management. Its apt package manager is the standard system for most software installations, making it an ideal environment for tools like Wireshark. This combination offers a potent platform for anyone performing Network Troubleshooting or detailed packet inspection.
Before you begin, a few pre-installation checks secure a smooth setup. First, ensure your Ubuntu system is fully updated. An outdated system can lead to dependency conflicts or install older, less secure versions of software. Open your terminal and run:
sudo apt update
sudo apt upgrade
These commands refresh your list of available packages and then upgrade any installed software to its latest version. This prepares your system for the new installation. Second, consider your user privileges. Packet Capture often requires elevated system privileges, which is why we use the sudo command throughout this guide. But don't worry, we'll address non-root user configuration later.
Install Wireshark: Apt Method
The most straightforward and recommended way to install Wireshark on Ubuntu uses the apt package manager. This method pulls the software directly from Ubuntu's official repositories, ensuring compatibility and ease of updates. It’s what most people use, and for good reason.
Here's how to install Wireshark on Ubuntu using this reliable method:
- Update Package Lists: Always start by ensuring your package lists are current. This pulls the latest information about available software.
sudo apt update
This command ensures you download the newest versions and dependencies.
- Install Wireshark: Now, execute the primary installation command.
sudo apt install wireshark
During this step, the system downloads Wireshark and its required components. You might see a prompt asking if you want to allow non-root users to capture packets. This is critical for later use. Select "Yes" (or true) when prompted. We will detail the implications of this choice and how to configure it further in the post-installation section.
- Confirm Installation: After the installation completes, verify it by checking the installed version.
wireshark --version
You should see output indicating the installed Wireshark version, for instance, something like version 4.0.0 or newer, depending on your Ubuntu release. This confirms the software is present.
This process works well for most users. It ensures you get a stable, well-integrated version of Wireshark.
Other Wireshark Install Options
While the apt method is standard, other options exist for specific scenarios. Sometimes you need the very latest features or a custom build.
Building from Source
For developers or those needing absolute control over their Wireshark build, you can build it from its source code. This gives you access to pre-release features or specific configurations not available in official packages. It's a more involved process, requiring development tools and a deeper understanding of compilation. You would typically download the source tarball from the official Wireshark website, then follow their build instructions. This is a common pain point I've seen in many production environments, where a specific debug build is needed, and the packaged version just won't cut it.
Snap Packages
Ubuntu also supports Snap packages, a universal software packaging system. Snaps bundle applications and their dependencies, working across many Linux distributions. To install Wireshark as a Snap, you'd use:
sudo snap install wireshark
Snaps offer isolation, meaning the application runs in a sandbox, separate from the rest of your system. This can be a security benefit, but it sometimes introduces complexities with system integration, like accessing specific network interfaces or user permissions.
PPA (Personal Package Archive)
Some users opt for a Personal Package Archive (PPA) to get newer versions of software than available in Ubuntu's default repositories. While a PPA can provide bleeding-edge releases, it also carries a higher risk. PPAs are maintained by individuals, not officially by Ubuntu, so their reliability and security can vary. Always exercise caution when adding third-party repositories.
Choose Your Wireshark Install
Selecting the right installation method depends on your priorities. Do you value stability, ease of updates, or the absolute latest features? This comparison helps clarify the trade-offs.
| Feature | Apt (Official Repositories) | Snap Package | Build from Source |
|---|---|---|---|
| Ease of Install | Very High (simple commands) | High (single command) | Low (complex, manual steps) |
| Version Freshness | Good (stable, slightly delayed) | Excellent (often latest stable) | Absolute Latest (dev versions) |
| System Integration | Excellent (deeply integrated) | Good (sandboxed, some quirks) | Excellent (full control) |
| Maintenance | Easy (apt update/upgrade) |
Automatic updates | Manual (re-compile for updates) |
| Security Risk | Low (vetted by Ubuntu) | Low (sandboxed) | Varies (depends on source integrity) |
| Use Case | General users, production systems | Users wanting newer features, isolation | Developers, specific debugging |
For most users, the apt method remains the gold standard. It balances current versions with stability and security. But if you need something more, the other options exist.
Post-Install: User Access, Verify
Installing Wireshark is just the first step. The real trick lies in configuring it for daily use, especially for non-root users. Packet Capture typically demands elevated system privileges because it needs direct access to network interfaces. This is where dumpcap, the command-line utility Wireshark uses for capture, comes in.
During installation, you likely answered a prompt about dumpcap permissions. If you selected "Yes," a wireshark user group was created, and dumpcap gained the necessary capabilities to capture packets without root access. This is a secure and convenient setup.
If you chose "No" or need to adjust permissions later, here's how to install Wireshark on Ubuntu for non-root users to perform packet captures:
- Add Your User to the Wireshark Group: Your user needs to be a member of the
wiresharkgroup. This grants the necessary permissions.
sudo usermod -a -G wireshark $USER
Replace $USER with your actual username, or simply leave $USER as it is, and the shell will substitute your current username. This command adds your user to the wireshark group.
- Reboot or Log Out/In: For the group membership change to take effect, you must log out and back in, or simply reboot your system. This refreshes your user's group affiliations.
reboot
A quick reboot usually does the trick.
- Verify Permissions (Optional but Recommended): You can check the capabilities set on the
dumpcaputility.
getcap /usr/bin/dumpcap
You should see output similar to cap_net_raw,cap_net_admin=eip. This indicates dumpcap has the capabilities to perform raw network access and administer network settings, which it needs for capturing packets. If you don't see this, or if you ever need to reset them:
sudo dpkg-reconfigure wireshark-common
This command re-runs the post-installation script, allowing you to reconfigure the dumpcap permissions. Choose "Yes" for non-root users to capture packets.
Correctly configuring these permissions is absolutely critical. Without them, you'd constantly need to run Wireshark with sudo wireshark, which carries significant security risks. Running a powerful Network Protocol Analyzer like Wireshark as root exposes your system to potential vulnerabilities if the application itself or a plugin has an exploit. Standards like ISO 27001 for information security management systems often advise against running applications with excessive privileges.
Fix Wireshark Issues, Update
Even with careful installation, issues can arise. Knowing how to troubleshoot and maintain your Wireshark installation keeps your network analysis capabilities sharp.
Common Problems and Solutions
- "No interfaces shown": This usually means a permission issue. Revisit the steps for adding your user to the
wiresharkgroup and reconfiguringdumpcapcapabilities. Ensure you've logged out and back in after making changes. - "Permission denied": Again, this points to
dumpcappermissions. Runningsudo dpkg-reconfigure wireshark-commonis your best bet to fix this. - Outdated version: If you used the
aptmethod, simply updating your system will update Wireshark.
sudo apt update && sudo apt upgrade
If you built from source, you'll need to re-download the latest source and recompile.
Keeping Wireshark Updated
Regular updates are not just about new features; they often include critical security patches and bug fixes. Attackers exploit vulnerabilities, so keeping your tools current is a strong defense. For apt installations, simply run sudo apt update && sudo apt upgrade periodically. Snap packages update automatically.
Launch Wireshark, Start Analyzing
With Wireshark installed and permissions configured, you're ready to start analyzing network traffic.
You can launch Wireshark in a few ways:
- From the Terminal (Graphical):
wireshark
This opens the graphical user interface (GUI). Avoid sudo wireshark unless you have a very specific, temporary need, as it bypasses your user's security configuration.
- From the Applications Menu: Search for "Wireshark" in your Ubuntu applications menu and click its icon.
Once launched, you'll see a list of network interfaces. Select the one you want to monitor (e.g., eth0 for wired, wlan0 for wireless, or any to capture on all interfaces). Click the blue fin icon (Start capturing packets) to begin. Wireshark will then capture and display network data. You can filter packets based on various criteria using its powerful display filters, saving captured network data to files for later analysis.
Your Next Move
Check your current Wireshark permissions now. Look for the cap_net_raw,cap_net_admin=eip output from getcap /usr/bin/dumpcap to ensure non-root users can capture packets safely.
Aman Kharwar
Founder & Editor-in-ChiefSenior Technical Analyst and Cyber Security Expert at Not Your Tech. Passionate about simplifying complex technology for the modern audience.



