I am new to Linux and have a need to install Wireshark 2.0.0 on VirtualBox's Xubuntu 14.04.
I have already downloaded .tar.gz package and extracted it. Then I opened terminal in the wireshark folder and type /.configure with intention to follow it by make and sudo make install executions but the attempt as unsuccessful as sudo apt-get install wireshark.
Could somebody help me how to install Wireshark step by step, please?
- 207,228
- 1,021
7 Answers
Add the stable official PPA. To do this, go to terminal by pressing Ctrl+Alt+T and run:
sudo add-apt-repository ppa:wireshark-dev/stableUpdate the repository:
sudo apt-get updateInstall wireshark 2.0:
sudo apt-get install wiresharkRun wireshark:
sudo wiresharkIf you get an error
couldn't run /usr/bin/dumpcap in child process: Permission Denied, go to the terminal again and run:sudo dpkg-reconfigure wireshark-commonSay
YESto the message box. This adds a wireshark group. Then add user to the group by typingsudo adduser $USER wiresharkThen restart your machine and open Wireshark. It works. Good Luck.
- 11,502
- 14
- 97
- 142
- 1,678
Open terminal and type the commands:
sudo apt-get install wiresharksudo dpkg-reconfigure wireshark-commonsudo adduser $USER wiresharkwireshark
If you getting wireshark running error, so close it and then just do the following:
- Go to
usr/share/wireshark - Open
init.luawith a text editor - Change
disable_lua = falsetodisable_lua = true
- 4,111
- 97
For those on ubuntu 18.04, go to terminal and run:
sudo apt install wireshark
It will install wireshark ( in my case v2.6.8 ) and you will be asked to add dumpcap in wireshark user group so you don't need to be root to execute it.
If you say:
NO > you're good to go, but you gonna need root privileges to run it.
YES > after installation finishes you should add yourself to wireshark user group:
sudo usermod -a -G wireshark YOUR_USERNAME
That's ALL!
- 271
- 4
- 10
I'd like a more thorough and modern answer. Many of the other answers here contain parts of my answer, and I've upvoted them, but none contain everything I'm going to show.
How to install the latest PPA-managed version of Wireshark on Ubuntu
Tested on Ubuntu 22.04.2.
Quick summary
Install Wireshark and add your user to the
wiresharkgroup:# Add the latest managed package so you can get a newer version sudo add-apt-repository ppa:wireshark-dev/stablesudo apt update sudo apt install wireshark
When it says, "Should non-superusers be able to capture packets?",
choose Yes.
Add your user to the
wiresharkgroup. Run this command exactly as-is.sudo usermod -a -G wireshark "$USER"
Ensure your username is now part of the
wiresharkgroup. You should seethat as an entry now in the response here.
groups "$USER"
Now log out of Ubuntu (or restart your computer), and log back in, to register your username in this new group.
Open Wireshark:
Press the Windows (Super) key and type in "Wireshark". Click it to open it.
Capture some packets:
In the window that opens up, click the blue shark fin icon in the top-left, which says "Start capturing packets" when you hover on it. This will start capturing packets. Press the red square (stop symbol) in the top-left to stop the packet capture. It will ask if you'd like to save your packet capture (pcap) file.
(Optional) Add Wireshark to your Ubuntu favorites bar:
Press the Windows (Super) key and type in "Wireshark". Right-click it and go to "Add To Favorites". It will now show up permanently as an icon in your left-hand launcher bar. Click it to open it.
Done!
If it works now, you're done! If not, check out my details below to see if you missed something.
Again, since your username is part of the
wiresharkgroup, you can capture packets without runningsudo wiresharkto run it as root.
More details and notes
Getting the latest PPA version:
If you run
sudo apt install wiresharkwithout first adding the latest PPA viasudo add-apt-repository ppa:wireshark-dev/stable, you'll get an older version of Wireshark. On Ubuntu 22.04.2, for instance, I can see fromsudo apt -s install wireshark(a simulated install) that I would get only version3.6.2-2. However, if I add the PPA first and then runsudo apt -s install wireshark, I can see that I'd get version4.0.6-1, which is nearly the newest. At the time of these instructions, https://www.wireshark.org/ shows the latest stable relase downloadable for other OSs, such as Windows or Mac, as being4.0.7.For more info. on the
-soption passed toapt, see my comment here (and the answer above it):Upvoted. For anyone looking for a really concrete example, on Ubuntu 22.04, if you run
sudo apt -s install wireshark, you'll see it will install version3.6.2-2. If you install the Wireshark PPA withsudo add-apt-repository ppa:wireshark-dev/stablefirst, however, and then runsudo apt -s install wireshark, you'll see it will install version4.0.6-1. In this way you can clearly see that the PPA will help you get a much newer version.The installation menu:
When installing, you'll see this menu. Again, choose "Yes":
┌──────────────────────────────────────────────────────────────────────────────────┤ Configuring wireshark-common ├──────────────────────────────────────────────────────────────────────────────────┐ │ │ │ Dumpcap can be installed in a way that allows members of the "wireshark" system group to capture packets. This is recommended over the alternative of running Wireshark/Tshark directly as root, │ │ because less of the code will run with elevated privileges. │ │ │ │ For more detailed information please see /usr/share/doc/wireshark-common/README.Debian.gz once the package is installed. │ │ │ │ Enabling this feature may be a security risk, so it is disabled by default. If in doubt, it is suggested to leave it disabled. │ │ │ │ Should non-superusers be able to capture packets? │ │ │ │ <Yes> <No> │ │ │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘What if you chose "No" in the menu above, during installation?
Not a problem, you have two ways to fix it:
[brute-force] Close Wireshark, and then run it as root:
sudo wireshark[recommended] Close Wireshark, and then reconfigure it to choose "Yes".
# run this, and be sure to choose "Yes" this time sudo dpkg-reconfigure wireshark-commonSource where I learned this: from the
README.Debianfile contained on my local system here:/usr/share/doc/wireshark-common/README.Debian.gz. This path is mentioned in the menu above. You can see it online in the Wireshark repository here: https://github.com/wireshark/wireshark/blob/master/packaging/debian/README.Debian:The installation method can be changed any time by running:
sudo dpkg-reconfigure wireshark-commonThe question mentioned above will be asked; answer "" to it.
Potential errors when trying to capture packets:
Couldn't run
/usr/bin/dumpcapin child process: Permission deniedOr:
Solution:
Either of those things above means that you need root permissions to capture packets. You can do this:
[brute-force run it as root] Close Wireshark, and then run it as root:
sudo wiresharkOR: [recommended] Close Wireshark, and then configure it to not require root:
# 1. run this, and be sure to choose "Yes" this time sudo dpkg-reconfigure wireshark-common2. Add your username to the
wiresharkgroup:sudo usermod -a -G wireshark "$USER"
Now log out of Ubuntu (or restart your computer), and log back in, to register your username in this new group.
Now for how to use Wireshark?--I have no idea. This is my first time using it.
- 11,502
- 14
- 97
- 142
To do this, go to terminal by pressing Ctrl+Alt+T and run:
sudo apt install wireshark
Apt should take care of all of the dependency issues for you.
Use the following command to install downloaded Wireshark debs:
dpkg -i wireshark-common_2.0.5.0-1_i386.deb wireshark_wireshark-2.0.5.0-1_i386.deb
dpkg doesn’t take care of all dependencies, but reports what’s missing. You can usually resolve problems by then running
sudo apt install -f
- 72,312
To add to Thusitha's answer, in Step 4 you either run as sudo or if you do not want to run all processes as root, then you set the message box to 'YES' (to install dumpcap in such a way that it allows users of the wireshark group to run it without sudo) and add user to wireshark group. (be sure to log out and log in before running wireshark so that the group privileges are reloaded). You can then just run wireshark without root.
- 1,137
- 131
Type
sudo apt updateThe APT package repository cache should be updated.Now, Run the following command to install Wireshark on your Ubuntu machine:
sudo apt install wireshark
By default, Wireshark must be started as root (can also be done with sudo) privileges in order to work. If you want to run Wireshark without root privileges or without sudo, then select and press .
- Wireshark should be installed.
- 1


