Anyone that’s interested in learning about computers or the internet will love experimenting with a Raspberry Pi. The only issue is that it doesn’t come with a monitor or keyboard. This actually isn’t a problem though, because there’s a way to setup and work on the Pi without ever connecting it to a monitor or keyboard. It’s known as running the Pi “headless”.

In this tutorial, I’ll walk you through the steps of setting up a Raspberry Pi without a monitor and keyboard on a new installation of Raspbian. All you need is another computer with internet access, an SD card adapter, ethernet cable, and access to the internet router on the network you want to connect to.

BONUS: I made a quick start guide for this tutorial that you can download and go back to later if you can’t set this up right now. It covers all of the steps, diagrams, and code you need to get started.

Here’s a video showing the steps, but read below for the details:

Gather all the Pieces

The first step is to download the Raspberry Pi’s operating system. I’ll be using Raspbian Jessie Lite in this tutorial. You can download it here from the Raspberry Pi Foundation.

Raspberry Pi ORG Raspberian

Just download the ZIP file and Extract it to a new folder. Then you’ll have a single .img image file that contains the operating system:

Raspbian Inage File

Next we’ll need a program that can write the operating system image file onto a microSD card. We’ll use Win32DiskImager to do that, so download and install it:

Win32Disk Imager

Now we need a way to access the Raspberry Pi’s command prompt. We can do this with a remote SSH client called PuTTY. PuTTY establishes an SSH connection between the Raspberry Pi and another computer. It opens up a window that gives you access to the Raspberry Pi’s command prompt. Download and install PuTTY to your PC.

If you’re using a Mac, you can SSH into the Pi with Terminal. Click here for good tutorial on SSHing via Terminal.

PuTTY

We’ll also need a way to find the local IP address of your Raspberry Pi when it’s connected to your router via the ethernet cable. There are lots of ways to do this, but Advanced IP Scanner is pretty easy to use. It will scan your home network and list all connected devices and their local IP addresses.

Advanced IP Scanner

Another way to find your Pi’s local IP address is to log into your router’s configuration page and get a list of the connected devices. But you need to know your router’s username and password to access it. If you want to do it this way, find the router’s product number on the back, then search online for the user manual. There should be instructions on how to access the router’s configuration page and how to view the connected devices.

Write the Raspian Operating System to the microSD Card

Now that we have everything we need, let’s write the operating system image to the microSD card.

Insert a blank microSD card into your computer using the SD card adapter. Then open Win32DiskImager, and select the operating system image file that was extracted earlier by clicking on the little folder icon:

Win32DiskImager Write

Next, select the drive that has the microSD card from the drop-down list below “Device”:

Win32Disk Write 2

Now click “Write” on the bottom of the window. This will take from 1 to 15 minutes depending on your computer and the size of your microSD card:

Win32Disk Write 3

Wait for the process to complete:

Win32Disk Write 4

If you’re using a version of Raspbian released after November 2016, there is one extra step:

SSH was disabled by default in Raspbian versions released after November 2016. One way to enable it is to access the raspi-config menu and turn it on. However, we’re setting it up headless so we don’t have access to the command prompt yet. Luckily there’s another way to turn on SSH…

All you need to do is create an empty file called “SSH” and place it in the root partition of the SD card. The file should have no extensions like “.txt” or “.doc”. The easiest way to do this is to open up a text editor like Notepad and save the blank page as “SSH.txt”. Close the text editor, then rename the file to delete the “.txt” extension. After that, move the file to the top level folder of the SD card (the root partition).

Now you can eject the SD card from your computer and insert it into your Pi.

Establish an SSH Connection to your Raspberry Pi

Connect the Pi to your internet router with an ethernet cable, then plug in the power cord so it boots up.

Now we need to find out the local IP address your router has assigned to the Pi. Open up Advanced IP Scanner and click “Scan” in the upper left hand area of the window. A list of the connected devices and their local IP addresses will be generated:

Advanced Ip scanner scan

Write down the IP address for the device that says Raspberry Pi Foundation in the “Manufacturer” column. In my case it’s 10.0.0.105.

Now it’s time to connect to the Pi. Open up PuTTY, and enter the local IP address into the “Host Name” field:

Raspberry Pi PuTTY Warning

Now click “Open” to initiate the connection.

On the first connection attempt, a security warning will appear. Just press “Yes” since you’re connecting to your own Pi:

Raspberry Pi PuTTY Warning

If the SSH connection is successful you’ll be greeted with the login prompt of your Raspberry Pi:

raspi login

If this is your first login and you haven’t changed the username or password yet, enter pi for the username, and raspberry as the password.

Now you’re logged in to your Raspberry Pi via SSH:

raspi after entering password, before sudo raspi-config

At this point, it’s a good idea to configure your Raspberry Pi by entering sudo raspi-config to enter the configuration settings menu:

raspi config

This is where you can change all of the default settings for Raspbian, and do other useful tasks like expand the file system and overclock the processor.

Now that SSH is set up, the next step is setting up WiFi and establishing a remote desktop connection so you can access the Pi’s desktop environment. This tutorial will walk you through that:

How to Set Up WiFi on the Raspberry Pi

If you have any questions about this post, or are having issues setting up your Raspberry Pi over SSH, please leave a comment below and I’ll try to answer it! And don’t forget to subscribe to get an email when we publish new tutorials. Thanks for reading!