I managed to get hold of a Raspberry PI Zero as well as a Raspberry Pi 3 Model B
to configure fro cli run sudo raspi-config
It is a configuration tool in Raspbian. It enables you to configure various settings of your Raspbian installation, such as the keyboard layout, the timezone, the password for the pi user, the SSH access, etc.
Open the wpa-supplicant configuration file in nano:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Go to the bottom of the file and add the following:
network={
ssid="testing"
psk="testingPassword"
}
You can use the wpa_passphrase utility to generate an encrypted PSK. This takes the SSID and the password, and generates the encrypted PSK. With the example from above, you can generate the PSK with wpa_passphrase.
network={
ssid="testing"
#psk="testingPassword"
psk=131e1e221f6e06e3911a2d11ff2fac9182665c004de85300f9cac208a6a80531
}