June 6, 2025
Quick & Easy: Setting up iwd, a wpa_supplicant replacement on Alpine Linux
Install
apk add iwd openresolv
rc-service wpa_supplicant stop
apk del wpa_supplicant
rc-update add iwd boot
Configuring iwd
sed -i 's/^#EnableNetworkConfiguration=True$/EnableNetworkConfiguration=True/' /etc/iwd/main.conf
(enable iwd standalone)sed -i 's/^#NameResolvingService=resolvconf$/NameResolvingService=resolvconf/' /etc/iwd/main.conf
(enable resolvconf)- You can also just open
/etc/iwd/main.conf
and uncomment EnableNetworkConfiguration & NameResolvingService
Connecting to WiFi
rc-service iwd start
iwctl station wlan0 get-networks
(list of available networks)iwctl station wlan0 connect mywifi
(connect to network)
Other commands
iwctl device wlan0 show
(show device info)iwctl known-networks mywifi forget
(remove a network)iwctl known-networks mywifi show
(show a network)iwctl adapter phy0 show