How to Set Up Raspbian for Headless Use

These instructions are on how to configure the Linux distribution Raspbian designed for the single board computer known as the Raspberry Pi to run as a headless system.

Supplies:

Windows, OSX, or Linux computer with at least 4GB of available hard disk space. Please not that instructions are geared towards Windows users

  • Available USB port or SD card reader

8+ GB Class 10 MicroSD card

  • MicroSD to USB or SD adapter depending on what interface your computer has.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Download Everything You Need

Download the latest version of Raspbian Lite. At the time of writing that is Buster September 2019.

Download the latest version of Etcher for your device.

Step 2: Install Etcher

Navigate to where Etcher was downloaded and double click the executable.

Follow the prompts (if any) on the screen.

When complete, Etcher should automatically launch.

Step 3: Unzip Raspbian

Navigate to where Raspbian was downloaded.

Windows

For Windows right click and select Extract All...

  • If you do not see Extract All... on the prompts you may have a third party compressed file manager. If you do not know how to use your compressed file manager, follow these instructions to restore your PC to the default manager.

Click Extract or Browse to choose a new location that you can find later.

Unix

For Unix operating systems, open the terminal and navigate to the directory where Raspbian was downloaded and run the following command, replacing xxxx with the name of the file downloaded.

  • unzip xxxx.zip

Step 4: Prepare the Media

Connect the MicroSD card to the computer though its SD card reader or USB port.

Windows

If prompted to format the disk, click cancel. We will do this in the next step.

Step 5: Flash Raspbian to the SD Card

Open (or reopen) Etcher

Press "Select Image" and navigate to where Raspbian was extracted in Step 3. This should be a .img file. Click Open.

Verify that the SD card is selected. It should automatically select the correct device unless you have additional removable media.

Click Flash and wait for it to finish. This may take several minutes depending on the speed of your computer.

Windows

Allow Command Prompt to make changes if prompted.

Step 6: Verify the Image

Once flashing is done, Etcher will automatically begin verifying the Raspbian image.

If Etcher successfully verifies the image, proceed on, otherwise repeat Step 5.

  • Note that 1 Failed device error is expected and does not indicate a failed flash.

Windows

You may be prompted to format the disk again. Do not do this, it will undo Step 5.

Step 7: Enabling Secure Shell

Navigate to the new drive called Boot.

  • Note that after flashing you may need to reinsert your MicroSD card.

Create a text file called ssh. In Windows this can be accomplished by right clicking on any empty space in the file explorer and left clicking create new text document in the menu that pops up.

  • It is okay if the file has the .txt file extension.

Step 8: Configure the Network

In the same directory as Step 7, create a file called wpa_supplicant.conf

Input this into the newly created file

network={

	ssid="<Name of your WiFi>"

	psk="<Password of your WiFi"

}

Replace with the SSID (name) of your network.

Replace with the WiFi password.

Visit here for more information.

Step 9: Eject

You are now done configuring your Raspberry Pi for headless operation.

Windows

Safely eject your SD card.

  • You will see two partitions, ejecting either one will eject both.

Unix

Unmount the SD card with your operating specific operations.

Step 10: SSH to Your Hearts Content

Insert your SD card into your Pi of choice, power on, and connect with your SSH client.

Be the First to Share

    Recommendations

    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    Discussions