How to install Raspbian on the Raspberry Pi Zero W without screen or keyboard in WiFi

Black Friday on Amazon right now! Black friday Banggood Gearbest Black Friday
Extra 10% off For XIAOMI SUPER HOME TECH GADGET Sale

Smart Home kits, security camera, robot vacuum cleaner, air purifier ... *Excluding products already on promotion

Reveal
35 days left

The Raspberry Pi Zero W (the new version incorporating WiFi) is equipped with two USB ports in micro-USB format as well as a mini HDMI video output. The use of these connectors makes the Pi Zero W very compact – it measures 4.7mm thick – but this makes the installation of the Raspbian distribution a little more complicated. There are micro-USB and mini HDMI adapters but this increases the cost price of the set. Fortunately, the foundation has provided a mechanism for installing the Raspbian Pixel distribution without keyboard or screen thanks to the Raspberry Pi Zero W WiFi connection.

The method also works for the Raspberry Pi 3

Necessary material

Raspberry Pi Zero W protection case

From €2,80

carte sd 8GB SD card SDHC Classe 10 from €6,90
chargeur raspbery pi 3 5v 3000ma 5V – 2000mA micro USB power supply

from €2,80

What is the power of Raspberry Pi 3?

The Pi Zero W is built around the Broadcom BCM2835 mono core core clocked at 1GHz and 512 MB Ram. The f4bi site published a very complete benchmark realized with SysBench. To summarize, Pi Zero W is equivalent to Raspberry Pi 2 in most tasks.

With only 512MB Ram, the Pi Zero W is clearly not intended to operate (smoothly) the Pixel graphics desktop.

raspberry-pi-3-vs-pi-2-vs-pi-zero-vs-a-vs-b-benchmark-sysbench

Download Raspbian Jessie Lite distribution

Go to the official website of the foundation and download the image of the distribution Raspbian Jessie Lite.

raspberry pi jessy lite raspbian

Preparing the SD card

Use Etcher to install Raspbian on the SD card. Follow this guide that explains all the steps.

etcher sd card

Configure WiFi and SSH connection

At the end of the copy operation, Etcher proposes to eject the SD card. If it does not, do so and then insert it again into the drive. Open the file manager (or the Finder on macOS). Select the device named boot.

The foundation has provided a mechanism to enable SSH connection and configure WiFi at first system startup. Simply create two configuration files specific to the root of the SD card.

Enable SSH connection

Since the Pixel version of Raspbian in December 2016, the SSH connection is disabled by default. This vulnerability was exploited by the Trojan Linux.MulDrop.14. To enable SSH, just create a file named ssh at the root.

Enable WiFi connection

Create a new file called wpa_supplicant.conf.  Paste and change the identifier of your WiFi network (SSID) and the password (PWD). Don’t forget to change the country code.

Make sure that there are two files in the root of the SD card. Check the WiFi network connection settings. Eject the SD card from your computer.

First startup

Insert the SD card into the drive and turn on the Raspberry Pi Zero W. The power connector is the micro-USB connector located next to the camera connector.

raspberry pi zero w activity led

The startup lasts about one minute. You can track the system load using the green led next to the power connector. It blinks during charging and then lights continuously after Raspbian is loaded.

How to find the RPi Zero W on the network?

The RPi Zero W is now started. Now you have to find it on the network. There are a number of ways.

Using the router

The first solution is to connect using the IP address assigned by the router. To do this, log on to the administrative interface of your router.

routeur ip address hostname raspberry pi zero w

Using a network scanner

There are many network scanners. For example, you can use Angry IP Scanner, an open source project that runs on 32-bit and 64-bit Windows, 32-bit and 64-bit Linux and macOS. The MacOS version requires the installation of Java 7 to run.

angry ip scanner raspberry pi zero w

Using the hostname

Normally, Raspbian broadcasts a machine name in the form raspberrypi.local. If several Raspberry Pi are present on the same network, a number is added to the hostname like this

Angry IP Scanner retrieves the hostname in the 3rd column but this one is not correct! It is best to use the router. In SSH, we connect to Pi Zero like this

Update and change the default password

At first boot, it is better to update the system. Linux is constantly updated. Begin by updating the dependencies of the current version of the system

Then update the system

When the foundation releases a new distribution, run the sudo apt dist-upgrade command to install it.

Finally, change the default password. This is the second vulnerability used by the Trojan Linux.MulDrop.14 to spread to all Raspberry Pi connected to the local network! To do this, run the passwd command and follow the instructions.

Last advice, never disconnect the power cord without shutting down the system. This is the best way to break your SD card!

To stop the system, use the sudo halt command.

For other optimizations, read the previous tutorial on the Raspberry Pi 3.

Subscribe to the weekly newsletter

No spam and no other use will be made of your email. You can unsubscribe anytime.

DIY Projects