If you burned the OS image successfully, you should see a folder named boot appear on your main computer. If it doesn't, try removing and reinserting the SD card. If it still doesn't, try burning the image again.

There are four text files we will create/edit in boot.

  1. userconf.txt - user account id and password
  2. wpa_supplicant.conf - wifi settings
  3. config.txt - global system settings
  4. ssh - an empty text file to enable ssh

We are going to edit these directly on the SD card before putting it in the Pi Zero. This way you can edit these files using your favorite text editor on your main computer. Try to avoid using a word processor though. A "text editor" edits text and nothing else, whereas a "word processor" allows for all kinds of formatting, like making text bold, inserting images, etc. 

Create User Account and Password

As of the bullseye release of the Raspberry Pi OS, the default account with username pi and password raspberry has been removed. This blog post has more information.

To create a user account, a file named userconf.txt is created that contains the account username and encrypted password. The password must be encrypted, which can be a hassle. If you have access to a running Pi or other linux machine, can use the following:

pi@raspberrypi:~ $ echo "raspberry" | openssl passwd -6 -stdin

The resulting contents of the userconf.txt file would then look like:


That will create a user account with username pi and password raspberry.

Configure WiFi

The Pi Zero W has built in WiFi so nothing additional is required. WiFi is only supported on 2.4 GHz band. If you are using the original Pi Zero, you will need some form of WiFi Adapter and a way to connect it: cable or adapter.

The WiFi configuration file does not exist and needs to be created. The name of the file should be wpa_supplicant.conf and its contents will get copied to the system folder at boot time. It will then be deleted. So this a one time only process. If you want to try again, you have to recreate the file and reboot.

The contents of the file should be as shown below. Replace YOURSSID and YOURPASSWORD with whatever is used for your network setup.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Don't put any spaces around the = in this file. It doesn't like that.

Like this:

On the country= line, if not in the US, replace with code for your specific country.

Save file and move on to next step. (more details here)

Enable UART

The file called config.txt already exists, we are just going to edit its contents. We will add some text to the bottom to enable the UART on the GPIO header pins. This allows a USB console cable to be attached later for troubleshooting.

Open the file in a text editor and add the following text to the bottom.

# Enable UART

Like this:

Save it and move on to next step. (more details here)

Enable SSH

SSH used to be enabled by default, but was then (Nov 2016) turned off by default. This was due to security concerns since the pi user id and password are well known. However, you'll likely want this enabled so you can remotely connect to the Pi Zero.

To do so, we simply create a file called ssh. This file does not exist and needs to be created. It can be empty. The system looks for it at boot time and will enable ssh if it is there. It is then deleted. So just create a new file and save it as ssh to the boot folder.

Final Check

After the above steps, you should have the following files on the SD card in the boot folder.

Safely remove the SD card from the main computer and install it in the Pi Zero.

This guide was first published on May 17, 2017. It was last updated on Sep 03, 2021.

This page (Text File Editing) was last updated on Apr 28, 2017.

Text editor powered by tinymce.