Getting Started with Raspberry Pi — Headless Setup with SSH and Wi-Fi

DateTime.AfterPost - DateTime.Now = 3 minutes

Introduction

So, you’ve got your shiny new Raspberry Pi and you’re ready to dive in. But before connecting LEDs, sensors, and other cool gadgets, you’ll need to set up the basics. In this guide, we’ll walk through installing Raspberry Pi OS on an SD card, enabling SSH, configuring Wi-Fi, and finally connecting to your Pi from your laptop — all without ever needing a monitor or keyboard.

This post is the first part of a two-part Raspberry Pi beginner series. Here, we’ll focus on getting your Pi up and running in a “headless” setup. In the next post, we’ll move on to something more fun: wiring an LED and a button to the Pi’s GPIO pins and controlling them with Python code.

Required Hardware

To follow along, you’ll need:

  • Raspberry Pi board (any modern model like Pi 4, Pi 3, or Pi Zero W works)

    • If you have an old Raspberry Pi board without WiFi onboard. Use an ethernet cable to connect to your router.

  • MicroSD card (at least 8GB recommended)
  • MicroSD card reader for your laptop

  • Power supply for your Raspberry Pi

  • Laptop or desktop computer (Windows, macOS, or Linux) with internet access

Download Raspberry Pi Imager

Head to the Raspberry Pi website and download the Raspberry Pi Imager tool. Install it on your laptop (works on Windows, macOS, and Linux).

Flash Raspberry Pi OS

  1. Insert your microSD card into your laptop.

  2. Open Raspberry Pi Imager.

  3. Choose:

    • Raspberry Pi Device: Choose your Raspberry Pi version
    • Operating System: “Raspberry Pi OS (64-bit)”

    • Storage: your SD card

  4. Click on “NEXT”

  5. Click on “EDIT SETTINGS”

  6. Under General:

    1. Configure you username and password
      Keep the username “pi” and the hostname “raspberrypi” to follow the manual without issues

    2. Check “Configure wireless LAN” and add your WiFi details
      Can be skipped if no onboard WiFi module
  7. Under Services:
    1. Check “Enable SSH”
    2. Choose “Use password authentication”
  8. Click on “SAVE”
  9. Click on “YES”
  10. Click on “YES” in the warning message

Wait until the wizard finishes (this usually takes 5-10 minutes, depending on the size of the SD and your computer specs)

Insert and Boot

Pop the SD card into your Raspberry Pi and power it up.

Give it a minute or two to connect to your Wi-Fi network.

Find Your Pi’s IP Address

On your laptop, open a terminal and run:

ping raspberrypi.local

This will give you the Raspberry Pi’s IP. 

This command is also useful to verify the Pi is correctly connected to the network

Connect via SSH

Open a terminal (or use the same terminal as before) and type

ssh pi@raspberrypi.local

Replace pi and raspberrypi.local if you changed them earlier.

Enter your password and you’re in!

Now, every command you run is actually running inside your Raspberry Pi!

Explore Some Commands

Here are a few basics to get comfortable to run inside your Raspberry Pi

# Update your system
sudo apt update && sudo apt upgrade -y
# Check system info
uname -a
# See your Pi’s IP
hostname -I
# Reboot your Pi
sudo reboot

Common Gotchas

Even with a smooth setup, there are a few common issues that might trip you up:

  • Same network requirement: SSH will only work if your Raspberry Pi and your laptop are on the same Wi-Fi (or Ethernet) network. Double-check if you can’t connect.

  • Raspberry Pi doesn’t boot: Make sure your SD card is properly flashed, fully inserted, and that your power supply delivers enough current (a weak charger is a very common issue).
    If this still doesn’t work, try flashing your SD again.

  • Wi-Fi not connecting: Verify you typed the SSID and password correctly in the Raspberry Pi Imager. Also, ensure the country code matches your Wi-Fi region.

  • Can’t find hostname (raspberrypi.local): Not all networks support mDNS. If that fails, log into your router’s admin page to see the Pi’s IP address, or use a network scanner app like nmap.

  • Wrong credentials: If you can’t log in, double-check the username and password you set during flashing. By default, it’s often pi / raspberry.

Don’t worry — these are all common beginner bumps, and they’re usually quick fixes.

Conclusion

Congratulations!

You just set up your Raspberry Pi completely headless! No monitor, no keyboard — just SSH magic.

In the next post, we’ll dive into the fun part: wiring up a button and an LED to your Pi’s GPIO pins and controlling them with Python.

No Comments

Add your comment