Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Network Interface Name

20190714 Various commands provide information that identifies you network interface name(s). The ifconfig command is commonly used with the -a will list all network interfaces. The example below clips the output to just the WiFi interface:

  $ ifconfig -a
  wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
          inet  netmask  broadcast
          inet6 fe80::5f23:ba1f:c2a8:5b03  prefixlen 64  scopeid 0x20<link>
          ether 34:e1:2d:0f:f2:99  txqueuelen 1000  (Ethernet)
          RX packets 5354294  bytes 7292565916 (7.2 GB)
          RX errors 0  dropped 2  overruns 0  frame 0
          TX packets 3018502  bytes 859283561 (859.2 MB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The nmcli command provides a comman line interface to the Network Manager application. The connection sub-command will list all known connections (including previous connections that may not be presently active). In the example here we list only the active connections, identifying that a Fritz!Box 7490 router is connected as device wlp2s0:

  $ nmcli connection show --active
  NAME            UUID                                  TYPE      DEVICE  
  FRITZ!Box 7490  6733e7c2-655c-1234-acb7-04d176f50d6d  wifi      wlp2s0

The systemd-resolve command with the command line option --status will list devices and their settings:

  $ systemd-resolve --status
  Link 3 (wlp2s0)
        Current Scopes: DNS
         LLMNR setting: yes
  MulticastDNS setting: no
        DNSSEC setting: no
      DNSSEC supported: no
           DNS Servers:
            DNS Domain: ~.

Copyright © 1995-2020 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of open source software including Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials of Data Science.