1. Create Hash Password
     echo -n "plaintext_password_here" | iconv -t utf16le | openssl md4
    
  2. Add WPA network details to /etc/wpa_supplicant/wpa_supplicant.conf file.
     sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
    
  3. Add wifi network details (and modify as per comment)
     ## replace:
     ## ssid__name with the wifi SSID
     ## user__name with the wifi username
     ## the_hash with the hash password
     network={
       ssid="ssid__name"
       priority=1
       proto=RSN
       key_mgmt=WPA-EAP
       pairwise=CCMP
       auth_alg=OPEN
       eap=PEAP
       identity="user__name"
       password=hash:the_hash
       phase1="peaplabel=0"
       phase2="auth=MSCHAPV2"
     }
    
  4. Reconfigure WLAN interface
     ## reconfigure; you should get OK as an output
     wpa_cli -i wlan0 reconfigure
    

Troubleshooting

work in progress

ifconfig wlan0
sudo iwlist wlan0 scan
# https://raspberrypi.stackexchange.com/a/123889
sudo killall wpa_supplicant
sudo wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -B
wpa_cli -i wlan0 reconfigure

References