How to boot up a raspberry pi for the first time (headless mode and by monitor)

Tassia
7 min readJan 27, 2019
Image from TechRadar

The Raspberry Pi is a nifty little computer with a lot of power. The size of a credit card, it costs $35. The Raspberry Pi Foundation was founded to help people learn computer science and get interested in tech.

So, you probably have your Pi and are now wondering what to do with it.
If not, I suggest purchasing this kit to help you get started. Here I’ll be detailing how to connect via both SSH (headless mode) and by monitor.

Besides the Raspberry Pi Model 3 and a computer on hand, you will need:

  • 2.5A (minimum) power adapter (that comes with the kit I just mentioned)
  • A keyboard and mouse you can connect to the Pi via USB. Only needed if you plan on using your Pi with a monitor
  • If you want to use the Graphical User Interface (GUI)/a monitor, you’ll need an HDMI2 cable to hook up to your monitor. Make sure you don’t have an older HDMI cable because these will not work with the Pi. This tutorial will teach you how to access/use your Raspberry Pi via a monitor and SSH.
  • A microSD card (with the SD Adapter) with at least 8GB of storage. If you have a Mac and don’t have some type of adapter or slot to insert microSD cards, you’ll want to purchase an SD card for Raspberry Pi that comes with Noobs already or Raspbian already installed so you don’t have to worry about installing the disk image via your computer. If you have a PC, you most likely have a slot for your SD card and can use a blank card to install the disk image on.
  • An Ethernet cable if you cannot connect to the internet via WiFi (i.e. you do not have a monitor and are thus in headless mode).
  • With a Windows PC, you’ll need to install PuTTY in order to SSH to your Pi (if you plan to use SSH). Macs do not require any additional setup for SSH.

Okay, so this post assumes you purchased an SD card that does not come with Noobs. If you have a NOOBS SD card, all you need to do is insert the card into your Pi (I’m using model 3 B) and boot up like any other computer and follow the prompts. I purchased a blank SD card off of Amazon so I need to install the disk image on the card. This is what I’ll be detailing below.

How to install the NOOBS disk image to your SD card

Insert your blank microSD card into your computer (if you have Noobs or Raspbian preinstalled, skip these steps). You will want to remember what it’s listed as. For me, my SD card is labeled as D:.

Download the SD Formatter, which you can find here so that we can install the disk image to the card later. Once the download is complete you’ll need to extract the .zip folder.

Follow the installation instruction, you can keep everything as the default except for the card selection. Make sure this is pointing to your SD card.

Once you click Format, it will display a warning prompt stating that the Formatter will erase all data on the card. This is exactly what we want it to do, so click Yes.

Raspberry Pi is Linux based so you can install a variety of images, including Ubuntu. For the sake of this tutorial, we will start with the OS that the Raspberry Pi Foundation has made available specifically for the Pi called NOOBS and Raspbian. NOOBS is recommended for those new to the Pi so let’s use that. Go to the Raspberry Pi downloads page, and select the ZIP download on the left.

This download will take some time, depending on your machine. Once it’s done, go to the .zip location of the disk image, right click, and Extract All to your SD card, labeled D: for me.

Starting up and use your Pi with a monitor/GUI

Once that is complete, which may also take a few minutes, you can safely eject your SD card and insert the microSD into your Raspberry Pi and turn it on. Hook it up to your monitor via the HDMI2 cable as well as your keyboard and mouse to the USB ports. Once the Pi is on, everything is just like setting up any other computer for the first time. It will prompt you to connect to WiFi if you’re not using Ethernet and then select the OS to install. Choose Raspbian, which is listed as the recommended installation and then click Install on the top left.

The installation will take some time, maybe 10–15 minutes as it did for me. But once this is done, you will have a fully functioning and ready-to-go Raspberry Pi!

Connecting to the Pi via SSH (by both monitor and headless)

If you ever want to SSH into your Pi instead of interacting via the GUI on your monitor, follow these steps.

Grabbing your IP address via a monitor/GUI:

  • If you have your Pi hooked up to a monitor already, open a terminal window and type hostname -I at the command prompt and press Enter to get your IP address.

Grabbing your IP address via headless (no monitor) mode:

No monitor to begin with? That’s okay. Newer Raspberry Pi’s don’t come with SSH enabled automatically anymore, but there’s a quick solution to this.

  • To enable SSH without your Pi’s GUI or monitor, insert your SD card into your computer. Then open a text editor and save the empty file as SSH.txt. Close out the text editor and rename the file so that it loses the .txt extension and it’s just named SSH. Then drag or copy it over to your SD card at the root of the file system. Safely eject your SD card and insert back into the Pi.
  • Use something like Pi Finder for Mac or Advanced IP Scanner for both Mac and Windows to find the IP address of your Pi. Open Advanced IP Scanner and click Scan in the top left corner. Both your computer and your Pi must be on the same network, and the Pi must be connected to the network via Ethernet since you are unable to configure it to WiFi at this point in headless mode. You’ll find the IP address with this scanner tool that will list the manufacturer as Raspberry Pi Foundation and the IP address will be listed under the Name column.

Establishing an SSH Connection

You have your IP address, now let’s connect!

  • Be sure to enable SSH on your Pi (you may have done this already with your SD card for headless mode, but you’ll still want to complete this step). You can do this by either clicking on the Raspberry Pi icon on the top left of the GUI and going to Preferences > Raspberry Pi Configuration > Interface and enable SSH there.
Enable SSH via the Raspbian GUI.
  • Or, you can follow the same steps via command line by entering sudo raspi-config and following the same steps that way:
Select Advanced Options
Select SSH and then select YES to enable. Then exit the prompts.
  • At this point, it’s good to reboot your Pi to activate these configurations (not necessary, but minimizes issues that may occur). Just enter sudo reboot and wait for your Pi to restart.
  • For Mac, you can open up a terminal window which is preinstalled and enter ssh pi@###.###.###.### where the ###.###.###.### is your IP address. SSH should work as long as your computer and Pi are one the same network (there are ways to access your Pi when on a different network, but that’s a whole different tutorial). Since this is your computer’s first time accessing the pi, it will ask if you trust the computer, enter y. Then enter the Pi’s password at the prompt, which should be the default, raspberry.
  • For Windows PC, open up PuTTY and follow this super short tutorial to connect to your Pi.
  • You can also SSH without using your IP address every time on Mac. To do so, first install avahi Dameon on your Raspberry Pi by entering this command in the terminal: sudo apt-get install avahi-daemon in the terminal. Now you can SSH into your Raspberry Pi with this command on Mac: ssh pi@raspberrypi.local (assuming you're still using the default user, pi. You’ll need to change pi to your user, if you ever change this).

And you’re set!

For fun ideas and projects, you can go to pimoroni.com or raspberrypi.org to find great tutorials and ideas!

I also recommend checking out this book if you want to become familiar with the Pi hardware.

--

--

Tassia

Product Designer at GitHub. Mediocre vegan, animal lover, and matcha lover.