- First, you must create the correct configuration using
wpa_passphrase (do not confused wpa_passphrase and wpa_supplicant):
$ wpa_passphrase "wifi-name" "password" >> /etc/wpa_supplicant/wpa_supplicant.conf
- Then, find your device name (like
wlan0), by executing
$ ip link
- Start
wpa-supplicant, but change wlan0 to your device name
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
- Finally, link service to
runit by
# ln -s /etc/sv/wpa_supplicant /var/service
To test your connection, you can try
$ ping wikipedia.org
When you reboot your machine, the connection configuration will be lost. You would have to run wpa-supplicant again. Alternatively, you can add the following line to your ~/.profile or ~/.bash_profile or ~/.bashrc (for zsh add to ~/.zprofile or ~/.zshrc; for ~/.xnitrc, add with & at the end):
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf