1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00
Lucas Magasweran 2480ca95ba 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
```
2021-05-10 13:40:33 +02:00
..
2021-03-02 09:48:20 +01:00
2020-12-17 20:02:32 +01:00
2021-04-13 12:52:56 +09:00
2020-03-27 20:12:44 +01:00
2021-04-23 12:02:24 +02:00
2020-12-16 17:21:48 +01:00
2021-02-25 14:55:17 +01:00
2021-01-04 11:01:17 +00:00
2021-02-21 19:20:47 +01:00
2021-01-04 11:01:17 +00:00
2021-04-13 12:52:56 +09:00
2021-04-19 23:16:02 +02:00
2021-05-08 15:59:29 +09:00
2021-02-04 19:17:50 +01:00
2021-03-31 10:26:07 +02:00
2021-04-21 09:57:30 +02:00
2020-11-09 13:23:58 +09:00
2020-12-17 20:02:32 +01:00
2020-12-16 17:21:48 +01:00
2020-12-17 20:02:32 +01:00