A computer can send traffic over Wi-Fi, Ethernet, a VPN, or loopback, depending on where the packets are going. In Wireshark on the Linux desktop, selecting the capture interface that carries your traffic lets you record the exchange you need to inspect.

Wireshark shows recent activity beside each interface and lists its local IP addresses when you hover over it. Busy interfaces can show activity at the same time, so the local address helps you identify the one you want.

A short ping gives you an echo request and reply to look for in the packet list when the address answers ping. A ping to 127.0.0.1 stays on the machine and appears on the loopback interface.

Steps to select a capture interface in Wireshark:

Use a regular account with Wireshark capture permission. Start with Wireshark's default profile, with the toolbar, status bar, and packet-list columns Source, Destination, and Info visible and no capture or display filter applied. Have an IPv4 address you are allowed to ping that answers echo requests, and know the local IPv4 address used to reach it. For a loopback test, both addresses are 127.0.0.1.

Packet captures can contain credentials, cookies, and private payloads. Capture only traffic you have permission to inspect and protect any capture files you save.

  1. Open Wireshark from GNOME Activities search.
  2. Hover over the interface you expect to carry your test traffic in the Capture list.

    The sparklines show recent traffic. The example shows activity on Loopback: lo and on any, which combines traffic from several interfaces.

  3. Select the interface whose tooltip lists your local IPv4 address.

    The example uses 127.0.0.1 on Loopback: lo. The order of the rows can change as interfaces become active.

  4. Click the blue shark fin in the toolbar when only your chosen interface is highlighted.

    Wireshark shows Capturing from followed by the interface name in the window title.

  5. Open a terminal on the same desktop while Wireshark is capturing.

    On Ubuntu, Ctrl+Alt+T opens the default terminal.

  6. Ping your test address three times in the terminal.

    For the loopback example, the command is ping -n -c 3 127.0.0.1. The -c 3 option sends three requests and -n displays numeric IP addresses. The packet summary appears below the replies when it finishes.

  7. Switch back to Wireshark with Alt+Tab after the ping summary reports at least one reply.

    The loopback example shows 3 received.

  8. Maximize Wireshark from its title bar if the packet descriptions in Info are cut off.
  9. Click the red stop square in the Wireshark toolbar.

    The stop square becomes inactive and the captured packets stay in the list.

  10. Confirm that the packet list contains the echo request and reply for the address you pinged.

    The Info column shows Echo (ping) request and Echo (ping) reply. The request goes to the test address and the reply comes from it. In the loopback capture, both Source and Destination show 127.0.0.1 and the title shows Loopback: lo.

Share this guide