Managing WiFi using systemd-networkd¶
This guide demonstrates how to configure WiFi using systemd-networkd.
Enabling and disabling WiFi¶
To enable WiFi, run:
To disable WiFi, run:
Configuring WiFi client mode¶
Scan for available networks:
Create the network configuration:
cp /lib/systemd/network/80-wifi-station.network.example \
/etc/systemd/network/80-wifi-station.network
Append route metrics to /etc/systemd/network/80-wifi-station.network:
Create /etc/wpa_supplicant/wpa_supplicant-wlan0.conf:
Add your network credentials:
Bring up the interface and restart the services:
networkctl up wlan0
systemctl restart systemd-networkd.service
systemctl restart [email protected]
Check that wlan0 received an IP address:
To make the WiFi connection persistent, enable the wpa_supplicant service:
systemctl enable [email protected]
Debugging¶
The following commands may help when the interface fails to connect:
journalctl -u [email protected]
journalctl -u systemd-networkd.service
wpa_cli