Day 01 Foundations

Setup and SSH

Day 1 is getting your Pi running without a monitor, keyboard, or mouse — headless setup. This is how every professional uses a Pi.

~1 hour Hands-on Precision AI Academy

Today's Objective

Insert the SD card, connect power.

01

Hardware You Need

Raspberry Pi 5 (4 GB is fine for most projects) or Pi 4. MicroSD card (32 GB minimum, 64 GB recommended — use a Class 10 / A2 rated card for good performance). USB-C power supply (5V/5A for Pi 5, 5V/3A for Pi 4 — don't cheap out, underpowering causes random crashes). Optional: a case with a fan for the Pi 5 (it runs hot).

02

Flash Raspberry Pi OS

Download and install Raspberry Pi Imager (free, from raspberrypi.com). Select your Pi model, choose Raspberry Pi OS (64-bit, Lite for headless). Click the gear icon to pre-configure: set hostname, username/password, enable SSH, configure WiFi SSID and password. Flash to the microSD. This pre-configuration means you never need a monitor — the Pi boots and connects to WiFi automatically.

03

SSH and First Configuration

Insert the SD card, connect power. Wait 60–90 seconds for first boot. Find the Pi's IP address in your router's DHCP table, or use ping raspberrypi.local (mDNS). Connect: ssh [email protected]. Run sudo raspi-config: expand filesystem (important!), set locale/timezone, enable I2C and SPI interfaces (needed for sensors), update the tool. Run sudo apt update && sudo apt upgrade -y.

bash
bash
#!/bin/bash
# First-boot setup script for Raspberry Pi
# Run after SSH login: bash setup.sh

set -e
echo "Raspberry Pi first-boot setup..."

# Update everything
sudo apt update && sudo apt upgrade -y

# Install useful tools
sudo apt install -y git vim htop tree curl wget tmux

# Install Python tools
sudo apt install -y python3-pip python3-venv python3-dev
pip3 install --upgrade pip

# Install GPIO and sensor libraries
pip3 install RPi.GPIO gpiozero smbus2 adafruit-blinka
pip3 install adafruit-circuitpython-dht

# Enable I2C and SPI via raspi-config (non-interactive)
sudo raspi-config nonint do_i2c 0   # 0 = enable
sudo raspi-config nonint do_spi 0
sudo raspi-config nonint do_camera 0

# Set up SSH key authentication (paste your public key)
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# echo 'your-public-key-here' >> ~/.ssh/authorized_keys

# Check hardware
echo ""
echo "=== Hardware Info ==="
vcgencmd get_throttled  # 0x0 = no throttling
vcgencmd measure_temp   # should be < 50°C at idle
free -h
df -h /

echo ""
echo "Setup complete! Reboot: sudo reboot"
💡
vcgencmd get_throttled returns a hex code. 0x0 = all good. 0x50005 means undervoltage detected and thermal throttling — you need a better power supply or cooling. Check this whenever your Pi behaves strangely.

Supporting References & Reading

Go deeper with these external resources.

Docs
Setup and SSH Official documentation for raspberry pi.
GitHub
Setup and SSH Open source examples and projects for Setup and SSH
MDN
MDN Web Docs Comprehensive web technology reference

Day 1 Checkpoint

Before moving on, confirm understanding of these key concepts:

Continue To Day 2
Day 2 of the Raspberry Pi in 5 Days course