Quick steps to installing with either USB Wifi dongle or with the RPI3 internal wifi.
apt-get update apt-get install wirless-tools
Run iwconfig to list all connected wireless devices and find which one you want to configure. Mine was wlan0:
iwconfig
Add device name to /etc/network/interfaces:
auto wlan0 iface wlan0 inet dhcp
Bring wifi up with:
ifdown wlan0; ifup wlan0;
Run ifconfig and you should now see the wifi device but without an ip address. Run a network scan to find all access points:
iwlist wlan0 scan
… and a list of available access points should show up. Look for the ESSID.
First add the wpa-conf file to the wireless configuration file in /etc/network/interfaces. The wlan0 section of this file should now look like:
auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Edit /etc/wpa_supplicant/wpa_supplicant.conf and add the following section to the bottom of the file. ESSID is case sensitive. Assuming that your ESSID is called Testing and passkey is TestingPassword:
network={ ssid="Testing" psk="testingPassword" }
Easiest is now to reboot and then check your interfaces with:
ifconfig
Your wlan0 should show up with an ip address and you are good to go.