Tuesday 26 June 2018

Quick headless setup of a Raspberry Pi 3

Here are the steps taken to get a Raspberry Pi 3 B+ up-and-running on my home network but doing so headless – no monitor etc. attached.

Step 1

Follow the basic installation guide from raspberrypi.org to flash a micro SD card. I used the Rasbian Stretch Lite image and Etcher to flash the image onto the SD card.

image

Step 2

Create a file called ssh (no file extension) in the root of the newly created boot SD card.  This enables SSH when the Raspberry Pi starts up.

The file doesn’t need any contents. Just the presence of the file enables SSH connections to the Pi.

Step 3

Put the SD card in the Raspberry Pi, connect it to the network via ethernet and power it up.

Step 4

Access to your router management console and find the Raspberry Pi as a connected device. Note down the IP address.

If you can, use DHCP management tools to reserve the IP address so it won’t change (this makes it easier to reconnect to the Pi if you have to bounce your router).

Step 5

Use Putty or similar tool to SSH on to the Pi using the IP address from Step 4. Login as the ‘pi’ user (default password is ‘raspberry’ with no quotes).

image

Step 6

Run the following command:

sudo raspi-config

This fires up the Rasperry Pi configuration tool. Make any changes you want to (e.g. enabling wi-fi or changing the host name). Change the default password if nothing else.

image

Step 7

Run the following command:

sudo apt-get update

And then this one:

sudo apt-get upgrade

You’re done. Raspberry Pi is up-and-running.