RaspberryPi #1: Headless Setup

Headless installation and configuration of a RaspberryPi through SSH. You’ll only need a computer and a network cable.

Rphl-Mstl
Tech notes and Geek stuff
4 min readDec 11, 2017

--

Raspberry Pi 3 model B, with its official case.

The Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and in developing countries [Wikipedia]

The Raspberry is among the cheapest computer in the world. The last model (RaspberryPi 3 model B) is sold 34 € in decembre 2017. The motherboard comes with:

  • Quad Core 1.2GHz / 1GB RAM
  • Wireless LAN / Bluetooth on board
  • 4 USB2 ports
  • Full size HDMI
  • Micro SD port for loading the OS and storing data
  • Micro USB power source

So, how to configure this motherboard computer if you have no HDMI display around to plug it in, no USB keyboard nor mouse to operate it? Follow the guide to execute a headless installation of your Raspberry Pi.

Official help page: https://www.raspberrypi.org/documentation

Since the Raspberry OS and storage device is a Micro SD card, you will be able to initialize the system in another computer, for instance a laptop with a SD card reader. A network cable will be needed during the operation.

Step 1: SD card preparation (laptop)

Get at least a 16 Gb micro SD card, insert it in your laptop and format it in FAT32. The SD card can now welcome the operating system.

Go to the Raspberry website to download the latest Raspbian Stretch Lite image. This minimal image does not include and desktop environment. That won’t be needed since we’ll operate the raspberry in SSH with Putty: command lines only! You’ll be able to install whatever desktop you want afterward.

Burn the image on the SD card with Etcher a minimalist software specialized in burning image to SD cards and USB drives. When it’s not, do not eject your card, a last operation is required to activate SSH.

Activate SSH on the Raspberry directly from the SD card: simply add an empty file named ssh (no extension!) at the root of you SD Card. This file will activate SSH on the Raspberry.

Everything’s in order. Eject the SD card, it’s time to switch on the Raspberry.

Step2: IP address and SSH client

Now, in order to connect to your Raspberry Pi from another machine using SSH you need to know the Pi’s IP address. Here comes the network cable: it’s time to insert the SD card on your Raspberry, turn it on by plugin the USB power cable and connect the network cable to you router.

The first boot should take 90s, so just wait a moment.

On your laptop, using your favorite Web browser, navigate to your router’s IP address http://192.168.1.1, and log in to the administration panel . Browse to the list of connected devices to find your Raspberry. Its IP address should be something like 192.168.1.22. We’ll use this address to remotely connect to the machine through a SSH client.

Get Putty, a free and powerfull SSH client. Download, install and launch.

Putty — With Solarized theme profile

Step 4: connect

In the “Session” panel, enter your RaspberryPI IP address, Port 22, SSH mode. You’ll be prompted for a login and password, that are by default pi
andraspberry.

You’re in!

From this point, run the Raspbian configuration tool to finish the setup: sudo raspi-config:

  • Change your password
  • Setup your Wifi
  • Update the system

--

--

Rphl-Mstl
Tech notes and Geek stuff

OS explorer, UI & UX passionate, Voxels crafter, code lover, Video Games player, Podcasts listener, Music amateur // Digital Publishing professional