Install Wireshark on Ubuntu
Wireshark is the most popular tool for network packets analysis. Learn to install it on Ubuntu.
If you are into cyber security or wanna be a hacker, Wireshark is supposed to be one of the most crucial things that you'd carry!
And there is a reason why.
Wireshark comes with many features including the ability to monitor incoming and outgoing packages.
Because of its popularity, you will find it available in the default repository of Ubuntu.
So if you don't care about having the most recent version, it can be installed with a single command:
sudo apt install wireshark
While writing, I got Wireshark version 3.6.2 from the default repository:
wireshark -v
But if you want the most recent offering from Wireshark, you can follow the given guide.
How to install the latest version of Wireshark
If you want the latest stable version of Wireshark, you will have to use PPA for that purpose.
Use the following command to add PPA for stable release:
sudo add-apt-repository ppa:wireshark-dev/stable
Once done, update the repositories:
sudo apt update
And finally install the Wireshark:
sudo apt install wireshark
Installer will ask whether you want to allow non-superusers to capture packets. I would recommend going with Yes
:
Once you are done with the installation, you can check the installed version:
wireshark -v
And as you can see, I got Wireshark 3.6.7 which is a little ahead of what you get with the default repository (3.6.2).
How to capture packets using Wireshark
Once you are done with the installation, you can use the following command to start the Wireshark:
sudo wireshark
Select the interface and click on Start capturing packets
:
And it will start capturing packets:
Save captured packets
To save captured packets, first, stop the packet capturing by pressing the red button:
Next, click on the Save this capture file
:
It will open the file manager where you can save the file at the desired location.
Just getting started with networking? Let me help
If you are just getting started with networking, you should start with basic networking commands:
I hope you will find this helpful.
And if you have any queries, let me know in the comments.
A software engineer who loves to tinker with hardware till it gets crashed. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.