To choose the network interface when using tshark, you can use the -i option followed by the interface name or number. Here’s how you can do it:
-
List Available Interfaces: First, you can list all available network interfaces by running:
tshark -D -
Select an Interface: Once you have the list, you can choose an interface by specifying its number or name. For example, to capture traffic on interface 1, you would use:
tshark -i 1Or, if you want to use the interface name (e.g.,
eth0), you can do:tshark -i eth0
Make sure to run tshark with appropriate permissions (often requires root or sudo) to capture packets on the selected interface.
