Install Raspbian Headless On Raspberry Pi 3 B+

Spread the love

Raspbian is an operating system built specifically to be used on your Raspberry Pi. It is based off Debian and comes installed with plenty of tools to monitor and code for your Raspberry Pi. This guide will show you how easy it is to install Raspbian (or Raspbian Lite) on your Raspberry Pi without a monitor (headless).

Requirements

There are many ways to install Raspbian but this is the most straight forward way to ensure that you make the most out of your Raspberry Pi and microSD card. I assume you are starting from scratch so if you have any of the below you can skip purchasing them or installing them, obviously.

Hardware

  • Raspberry Pi B 3+ with Power Supply and Heatsinks – This is the latest version of the Raspberry Pi and comes with a power supply and heatsinks. However, Raspbian will install on any older Raspberry Pi if you find a better deal and do not need the latest and greatest.
  • Samsung Evo Plus 32GB MicroSD HC Class 10 UHS-1 – Picking the right microSD card is important. Reliability and speed are crucial to the performance of your Raspberry Pi.
  • Anker 8-in-1 USB 3.0 Portable Card Reader – In order to write Raspbian to your microSD card you will need a microSD reader if your computer does not support it already.
  • Ethernet Cable – Any Cat 5E or higher rated cable will do. The Raspberry Pi B 3+ is limited to USB 2.0 bus speeds so no matter what you do you will not be able to reach Gigabit speeds.
  • An open Ethernet port (Unless using Pi Zero) – Your Raspberry Pi will need to connect to your network, either by your router or a switch.
    • Router – Finding a router is outside the scope of this article. When I start researching a product I first check out Amazon.com and check out how many reviews the products have. There are also many websites that review routers that you can base your decision off of. I personally enjoy The Wire Cutter who keeps all their articles updated.
    • TRENDnet 5-Port Unmanaged Gigabit GREENnet – If you already have a router and just want to expand your network, an unmanaged switch is a cheap and easy way to do so.

Software

  • Windows 10 – Windows 10 will be used to download our operating system and then write it to our microSD card.
  • Raspbian – We will be installing Raspbian though the exact same instructions work for Raspbian Lite as well.
  • Etcher – We will be using Etcher to burn the Raspbian to our microSD card.
  • MobaXterm – MobaXterm will allow us to remotely manage our Raspberry Pi.

Install Raspbian

Head on over to the official download page and grab the Raspbian Stretch download of your choosing. Take your microSD card and put it into your microSD card reader then plug it into your computer.

Format Your microSD Card

We will be using Disk Management to format and name your microSD card. If there are no other partitions on it you can skip this step and move on to installing with Etcher as Etcher will format your card as well. Using Disk Management will make sure that you only have one partition for your Raspbian install.

In Windows 10 search menu type create and format like below:

Create and Format Disks Windows 10
Create and Format Disks Windows 10

Once open, find your microSD card and delete any partitions associated with it. You should end up with your microSD card with nothing by unallocated space like below:

MicroSD Unallocated Space
MicroSD Unallocated Space Example

Now we need to create a new Volume so right click the area that says Unallocated and then select New Simple Volume:

Create New Simple Volume
Create a new simple volume

Follow the new window steps to create your volume. You do not need to change anything, other than the name of the volume should you choose to. In my example, we are going to use the name Raspbian.

Create new volume named Raspbian
Create new volume named Raspbian

Click Next and then Finish and now we have our new volume ready to install via Etcher.

Install Raspbian with Etcher

If you haven’t already, go to Etcher.io and download the latest version and open it up. Etcher is simple and to install Raspbian you simply need to select the image, which you downloaded earlier and then select your microSD card and then hit Flash!

Etcher Raspbian
Etcher setup

The Flash will take a few minutes, depending on your setup. We have one more step to do before we install the microSD card into your Raspberry Pi.

Enable SSH

Before we install our microSD card into the Raspberry Pi we need to make sure we can log in via SSH since we are going to run the Raspberry Pi headless (CLI only). Doing this is easy. In your Windows Explorer simply open up your microSD drive and then create a new file simply called ssh. No file name extension is needed. The easiest way to do this is to right click, create a new text file, name it ssh and then remove the .txt file extension.

Create new file called ssh
Create new file called ssh

The end result will look similar to this:

Boot SSH File
SSH file opens up port 22 for Raspbian

Now we are ready to install the microSD card into our Raspberry Pi and turn it on. Simply plug in the power to your Raspbian, make sure it is plugged into your network and then follow the next steps once it has booted.

Download MobaXterm

MobaXterm will be our way of managing our Raspberry Pi on our network. Download it via their website. The free version is plenty fine for what we are going to do but if you do more I highly recommend the paid version as the quality of this software is fantastic.

Once downloaded we are going to create and save a new session.

Create New Session

Open MobaXterm and then select the Sessions menu and then click New Sessions. On the new window choose SSH. Fill in like below, replacing with your ip address.

MobaXterm Raspbian Lite Setup
Connect to Raspbian with MobaXterm

Click Ok and then simply double click your new Session to open a connection to your Raspberry Pi.

As per the screenshot above, your username is simply pi. The default password is raspberry.

Change Raspbian Password & Update

The first step we are going to take is to change our password. The command is simply:

passwd
Raspbian Lite Password Change
Change the default password on Raspbian

Simply follow the instructions as above and now you have a bit more secure Raspbian installation.

Our next step is to update Raspbian and make sure we have the latest version of all of our files. Run the following commands:

sudo apt-get update
sudo apt-get dist-upgrade

Once you are done the rest is up to you. You now have Raspbian installed and running on your network!


Spread the love

Leave a Reply

avatar
  Subscribe  
Notify of