Setting up a brand new Raspberry Pi Zero W with Raspbian Stretch


This is how to set up a Raspberry Pi Zero W from absolute factory new scratch to running the Raspbian Stretch operating system.
You will need:
  1. a brand new Raspberry Pi Zero W;
  2. a micro SD card of at least Class 4, 8 or 16 GB
Get the Raspbian image from the official website at https://www.raspberrypi.org/downloads/raspbian/

I like to use the version with the desktop. The ZIP version is about 1.1 Gigabyte:


Next, you will need to burn that image onto the SD card. I like to use a fine and free tool for Windows called BalenaEtcher, available at  https://www.balena.io/etcher/ :

Insert the SD card into your Windows computer, run Etcher. Select the ZIPped Raspbian, point Etcher to the SD card and hit "Flash!". It will take Etcher 10 to 15 minutes to transfer and verify everything onto the SD Card. 


Remove SD card from your Windows machine and insert it into your Raspberry. Attach a USB keyboard (preferably one with an integrated touchpad) to your Raspberry, attach a computer screen via HDMI cable and a power supply. The Raspi powers up and runs through a few initial setups, finally presenting the GUI. By now, your Raspi should also be connected to your home WiFi. I always have trouble with that step, as I want my Raspis to connect to a hidden SSID of my home WiFi network:


So I need to do some manual intervention in one of the Raspi's config files to make it connect to my router's hidden SSID. Open a terminal window:


In the terminal window, open the config file in the Raspi's 'nano' editor with: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
The editor window comes up. At the end of the file, add the following lines:
network={
     ssid="yourhiddenSSID"
     scan_ssid=1
     psk="thepasswordtoaccessyourhiddenSSID"
}
 
Hit ^X and Enter to save the file. Reboot the Raspi by typing 'sudo reboot now' in the terminal window. Raspi reboots into the GUI, and if all went well, your Raspi is now connected to the hidden SSID of your home Wifi:


If still no connection... :-( ... a multitude of possible causes. Grab a coffee and start googling....

Assuming you do have a working WiFi connection now, it's time to update your installation. The Raspbian image you installed is probably already a few weeks or even months out of date. Update the entire installation with a few terminal commands. Open another terminal window from the menu bar of the Raspi's GUI and enter 'sudo apt-get update'.
That will update the list of packages on the Raspi, it will take less than a minute to complete:
 Once that is done, enter 'sudo apt-get upgrade'. This command will download the newest versions of all installed packages. This might take 2- to 30 minutes to complete, and hundreds of log lines will scroll past the terminal window:

Done!! Congratulations, you now have the very freshest version of Raspbian Stretch installed on your Raspberry Pi Zero W.

Next step:
Get rid of the Raspi's screen and keyboard and operate it entirely remote controlled from your Windows computer with SSH!

Comments

Popular posts from this blog

Accessing a NAS drive from your Raspberry Pi

Why yet another Raspberry Pi blog?

Remotely control your Raspberry Pi Zero W from your Windows computer with SSH