Skip to content

Instantly share code, notes, and snippets.

@pojntfx
Last active Jun 16, 2021
Embed
What would you like to do?
Dynamic Wifi configuration with iwd on Alpine Linux

Install and setup iwd and dbus

apk add iwd dbus
echo "[General]\nEnableNetworkConfiguration=true" >> /etc/iwd/main.conf
rc-service iwd start
rc-service dbus start
rc-update add iwd default
rc-update add dbus default

Connect to your desired wifi network

This can also be done interactively by typing just iwctl in your terminal.

Let's say that we want to connect to a network named "Felixs iPhone"; if this is your first time connecting to the network, you'll be prompted for the password:

iwctl station wlan0 connect "Felixs iPhone"

iwd will periodically scan for networks in the background, automatically connect and request an IP once it finds one which you've connected to before.

@HueRtx
Copy link

HueRtx commented Jun 16, 2021

thx bro
u helped me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment