Tshark is a terminal-based network analysis tool that allows users to capture, filter, and analyze network traffic through command-line interfaces. Key commands include listing network interfaces with -D, capturing packets on specific interfaces with -i and -c flags, filtering traffic by protocol or port with -f, reading previously captured data with -r, extracting specific packet fields with -T fields, and generating statistics with -z for bandwidth analysis.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Wireshark in the Terminal: Using tsharkAdded:
Wireshark in the terminal, mastering Tshark.
Welcome.
In this tutorial, we're diving into the world of network analysis with Tshark, the terminal-based version of Wireshark.
Remember, this is for educational purposes only.
First, let's list all the available network interfaces on our machine using Tshark {dash} D.
This command gives us a numbered list of interfaces we can monitor.
Next, we're capturing packets on the WLAN0 interface.
By using {dash} i 0, we specify the interface. And {dash} c 10 limits the capture to just 10 packets.
This is a great way to quickly check the traffic on your network without getting overwhelmed by data.
Now, let's focus on HTTP traffic by filtering packets on TCP port 80 with {dash} f TCP port 80.
We're using {dash} a duration 30 to capture for 30 seconds. This way, we can see all the HTTP requests and responses flowing through our network interface.
You can also analyze previously captured data.
Let's read a file named capture.pcap with {dash} r and filter for HTTP requests using {dash} q.request.
This allows us to focus on specific types of traffic even after the capture is complete.
For more detailed analysis, Shark can extract specific fields from packets.
Using {dash} T fields with {dash} E options, we extract the source IP, destination IP, and HTTP host header.
This provides a concise view of who's communicating with whom and what domains are being accessed.
Finally, let's look at some statistics using {dash} q for quiet mode and {dash} z for statistics.
Here, we're generating 10-second interval statistics for TCP and UDP traffic, giving us insight into the network's bandwidth usage.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 viewsโข2026-05-28
How agent o11y differs from traditional o11y โ Phil Hetzel, Braintrust
aiDotEngineer
450 viewsโข2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation๐ฏโ
LearnwithSahera
1K viewsโข2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 viewsโข2026-05-29
Search Algorithms Explained in 60 Seconds! ๐ค๐จ
samarthtuliofficial
218 viewsโข2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 viewsโข2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 viewsโข2026-05-29
So What's Odin Lang Even Good For
TechOverTea
131 viewsโข2026-06-01











