This will explain how to enable wifi before ever booting your Raspberry Pi and without the need for a monitor and keyboard attached to the Raspberry Pi
- Download Image from Raspberry Pi website
- User Etcher to write to sdcard
- After writing is complete, re-insert the sdcard into the computer
- Go to the storage drive called
boot - Add
sshfile with no content - Add
wpa_supplicant.confwith the following content:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="WIFI_SSID"
scan_ssid=1
psk="WIFI_PASSWORD"
key_mgmt=WPA-PSK
}
- Unmount drive and put in Raspberry Pi
- Boot Raspberry Pi and wifi should connect automatically
Note: Tested on 2018-06-27-raspbian-stretch Credit: Derived from www.losant.com/blog