I recently acquired a Raspberry Pi Zero W, the latest and greatest in the Raspberry Pi computing platform. I have decided to create a full guide that will allow you to get your Raspberry Pi Zero W up and running without the need to ever connect it to a display or any other peripherals. After scouring the information super-highway known as the “Internet” for ways to set up a Raspberry Pi Zero W completely headless and without any peripherals I found that a lot of the information needed was either outdated or scattered. The aim of this guide is the completely condense all that information into a complete and easy to use guide. All the steps listed in this guide are what I did to get my Raspberry Pi Zero W up and running and I hope this guide helps you too!
Here’s what you will need:
- Windows Computer
- Micro SD Card
- Raspberry Pi Zero W
- Micro-USB cable for power
Part 1: Preparing the SD Card
Since we want to make this a completely headless setup without any displays, we want to directly install Raspbian onto the Micro SD card rather than installing NOOBS since you need to interact with a GUI to use NOOBS.
- Download the Raspbian image file from the Official Raspberry Pi website which can be found here: https://downloads.raspberrypi.org/raspbian_latest
- After you download the image zip you want to unzip it using 7ZIP, WINRAR seemed to corrupt the file
- Insert your SD card into your computer or get an SD to USB adapter if you don’t have an SD card slot. Format the card once just to make sure its clean.
- Once the image is unzipped you want to install it on your SD Card, I used “Etcher” which can be found here https://etcher.io/
- Simply Select your image and your SD card and click “Flash”
6. Once the image is properly installed on to the SD card we will put in a few custom files of our own to enable SSH and autoconnection to our WiFi network
Part 2: Enabling SSH and Network Connectivity
We need the Raspberry Pi Zero to auto-connect to our wifi network so we can access the command line remotely through an SSH protocol. So in this part that’s what we are going to do.
- SSH is automatically disabled on the Raspberry Pi for security reasons so we need to enable it.
- To enable SSH we put in an empty file with no extension onto our SD card, this empty file should be just named “ssh” you can use notepad or any other text editor to do this.
3. Next, we are going to put in a file that will allow the Pi Zero to automatically access the wifi network. Create a file named “WPA_supplicant.conf” in notepad and put in this code within the file.
ssid=”Your network id”
psk=” Your network password”
4. Once you save that file as “WPA_supplicant.conf” copy it to the SD card the same way you put in the SSH File.
5. Assuming everything was done correctly, you are now ready to boot up your Pi Zero with your SD card.
Part 3: Accessing your Pi
Now you put the SD card into your Pi Zero and power it up with the Micro-USB cable. Upon a successful boot, the green light should be blinking intermittently. The only way to know at this point if it has connected to your Network is to open up your router settings.
- Open up your router settings and confirm that your Raspberry Pi is connected to your network. For Verizon, you only need to enter your IP in the search bar of the browser.
- Once you confirm that the Raspberry Pi is connected you need to make sure you find the IP address of the Pi as you will need this to access the command line of the Raspberry Pi. You can find this through your router firewall settings and DCHP settings.
- Download the application “PuTTy” here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- After installing PuTTy and running it, it will ask you for the IP address of the shell you are connecting to. In this case, you want to enter the IP address of your Raspberry Pi Zero we found earlier in your router settings
- Once the IP is entered you will be connected to the command line of the Raspberry Pi Zero and it will ask you for the hostname and password of your Pi. By default, the login is “pi” with Password “raspberry”.
- Now that you have full access to the command line we want to enable VNC on the pi zero so we can access the graphical interface through a remote connection.
- Enter the command:
- This will bring up a menu, go to “Interface” then “VNC”, and select “Yes”
- BOOM your Raspberry Pi Zero is now set up and ready for use! all you have to do now is download the VNC Viewer client (here: https://www.realvnc.com/en/connect/download/viewer/) and enter your Raspberry Pi Zero’s IP to connect to your Pi!
I hope that this guide was informative and helped you set up your Raspberry Pi Zero W! If you have any questions or concerns don’t hesitate to contact me.