From: Lucas Magasweran Date: Mon, 10 May 2021 08:11:28 +0000 (+0200) Subject: man: network: use `networkctl list` instead of `status` to list network interface... X-Git-Tag: v249-rc1~258^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19556%2Fhead;p=thirdparty%2Fsystemd.git man: network: use `networkctl list` instead of `status` to list network interface type To determine the network interface type for use in the `Type=` directive, it is more concise to use the `list` command. Whereas, the `status` command requires an interface parameter. For example, on a RaspberryPi 4 the following shows that the `wlan0` interface type `wlan` is more coveniently listed by the `list` command. ``` root@raspberrypi4-64:~# networkctl list IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 eth0 ether routable configured 3 wlan0 wlan off unmanaged 3 links listed. ``` Whereas the `networkctl status` command doesn't include this information. ``` root@raspberrypi4-64:~# networkctl status ● State: routable Address: 192.168.1.141 on eth0 fd8b:8779:b7a4::f43 on eth0 fd8b:8779:b7a4:0:dea6:32ff:febe:d1ce on eth0 fe80::dea6:32ff:febe:d1ce on eth0 Gateway: 192.168.1.1 (CZ.NIC, z.s.p.o.) on eth0 DNS: 192.168.1.1 May 07 14:17:18 raspberrypi4-64 systemd-networkd[212]: eth0: Gained carrier May 07 14:17:19 raspberrypi4-64 systemd-networkd[212]: eth0: Gained IPv6LL May 07 14:17:19 raspberrypi4-64 systemd-networkd[212]: eth0: DHCPv6 address fd8b:8779:b7a4::f43/128 timeout preferred -1 valid -1 May 07 14:17:21 raspberrypi4-64 systemd-networkd[212]: eth0: DHCPv4 address 192.168.1.141/24 via 192.168.1.1 ``` To get the interface type using the `status` command you need to specify an additional argument. ``` root@raspberrypi4-64:~# networkctl status wlan0 ● 3: wlan0 Link File: /lib/systemd/network/99-default.link Network File: n/a Type: wlan State: off (unmanaged) Path: platform-fe300000.mmcnr Driver: brcmfmac HW Address: dc:a6:32:be:d1:cf (Raspberry Pi Trading Ltd) MTU: 1500 (min: 68, max: 1500) QDisc: noop IPv6 Address Generation Mode: eui64 Queue Length (Tx/Rx): 1/1 ``` --- diff --git a/man/systemd.link.xml b/man/systemd.link.xml index 6be115026bb..34b56df937a 100644 --- a/man/systemd.link.xml +++ b/man/systemd.link.xml @@ -133,7 +133,10 @@ Type= A whitespace-separated list of shell-style globs matching the device type, as exposed by - networkctl status. If the list is prefixed with a "!", the test is inverted. + networkctl list. If the list is prefixed with a "!", the test is inverted. + Some valid values are ether, loopback, wlan, wwan. + Valid types are named either from the udev DEVTYPE attribute, or + ARPHRD_ macros in linux/if_arp.h, so this is not comprehensive.