## 60.27 Network Interface Name

20200211

Various commands provide information that identifies you network interface name(s).

The nmcli command’s connection sub-command will list all known connections (including previous connections that may not be presently active). Only active connections can be listed using the options below, identifying that a Fritz!Box 7490 router is connected by WiFi as device wlp2s0:

$nmcli connection show --active NAME UUID TYPE DEVICE FRITZ!Box 7490 6733e7c2-655c-1234-acb7-04d176f50d6d wifi wlp2s0  That can be abbreviated as: $ nmcli c s -a

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 192.168.178.21 netmask 255.255.255.0 broadcast 192.168.178.255 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 -, systemd, resolve command with the command line option --status will list devices and their settings: $ systemd-resolve --status
...
...