Raspberry Pi – Connect to Wi-Fi from BASH

Connecting to Wi-Fi from GUI = Very Easy. From BASH, less so. The following steps should get you connected to Wi-Fi. Followed this guide.

wpa_passphrase “SSID” “PASSWORD” >> /etc/wpa_supplicant/wpa_supplicant.conf
wpa_cli -I wlan0 reconfigure

Not sure if last step is necessary. Shouldn’t be, but I also wasn’t able to connect, even after bringing the interface down and up again. Rebooting immediately connected.

reboot now