Setting Up Raspberry Pi
OS installation, headless SSH setup, networking, and raspi-config
Skills taught: embedded.rpi-setup
Raspberry Pi Models — Which One to Choose?
Model CPU RAM USB Price Best For
──────────────────────────────────────────────────────────────────
Pi 5 Cortex-A76 2.4GHz 4-8GB USB3 $60 Heavy compute, desktop
Pi 4B Cortex-A72 1.8GHz 1-8GB USB3 $35 Most projects, NAS
Pi 400 Cortex-A72 1.8GHz 4GB USB3 $70 Desktop-in-keyboard
Pi 3B+ Cortex-A53 1.4GHz 1GB USB2 $35 Legacy, still common
Pi Zero 2W Cortex-A53 1GHz 512MB micro $15 Portable, headless sensor
Pi Zero W Cortex-A53 1GHz 512MB micro $10 Budget, single-task
Flashing the SD Card with Raspberry Pi Imager
Download Raspberry Pi Imager from raspberrypi.com. Insert a micro-SD card (8 GB minimum, Class 10 recommended). In Imager: Choose OS → Raspberry Pi OS (64-bit) Lite for headless, or Desktop for GUI. Click the gear icon ⚙ (or Ctrl+Shift+X) to open Advanced Options before writing.
Raspberry Pi Imager — Advanced Options (Ctrl+Shift+X)
───────────────────────────────────────────────────────
✅ Set hostname: mypi.local
✅ Enable SSH: Use password authentication
Username: pi
Password: [your secure password]
✅ Configure wireless LAN:
SSID: YourNetwork
Password: YourWiFiPassword
Country: IN (India) / US / GB
✅ Set locale:
Timezone: Asia/Kolkata
Keyboard layout: gb
→ Click SAVE, then WRITE
Connecting Over SSH
After first boot (wait 60–90 seconds), connect from any computer on the same WiFi. The Pi is discoverable by hostname via mDNS — no need to find its IP address.
# Connect to Pi by hostname (mDNS — works on same network)
ssh pi@mypi.local
# Enter your password when prompted
# If hostname doesn't resolve, find IP from your router admin,
# or use nmap to scan your network:
nmap -sn 192.168.1.0/24 | grep -i raspberry
# Once connected, check system info
uname -a # kernel version + architecture
vcgencmd measure_temp # CPU temperature
free -h # memory usage
df -h # disk usage
# Keep the connection alive (add to ~/.ssh/config on client)
# Host raspberrypi.local
# ServerAliveInterval 60
Initial Configuration with raspi-config
sudo raspi-config is a text-based menu for configuring the Pi. Essential settings to check on a new installation:
sudo raspi-config
# Key options:
# 1. System Options → S5 Boot / Auto Login → Console (no desktop)
# 3. Interface Options → I2 → Enable SSH (if not already)
# → I4 → Enable I2C (for sensors)
# → I3 → Enable SPI
# → I6 → Enable Serial Port (disable login shell)
# 6. Advanced Options → A1 → Expand Filesystem (uses full SD card)
# → A3 → Memory Split → 16 (for headless: less GPU RAM)
# Update the system (do this once after first boot)
sudo apt update && sudo apt upgrade -y
sudo apt install -y vim htop git python3-pip python3-venv
# Set a static IP (optional — useful for server projects)
sudo nano /etc/dhcpcd.conf
# Add at end:
# interface wlan0
# static ip_address=192.168.1.100/24
# static routers=192.168.1.1
# static domain_name_servers=1.1.1.1 8.8.8.8
Raspberry Pi vs Arduino for Embedded Projects
- Raspberry Pi: Full Linux single-board computer
- Arduino / ESP32: Bare-metal microcontroller
Tip: For the most robust headless Pi setup, copy your SSH public key to the Pi immediately after first login: `ssh-copy-id pi@mypi.local`. Then disable password authentication in /etc/ssh/sshd_config (set PasswordAuthentication no) so only key-based login works — much more secure.
Warning: Never abruptly unplug a Raspberry Pi — it can corrupt the SD card filesystem, requiring a full reflash. Always shut down gracefully with `sudo shutdown -h now` or `sudo poweroff`. For projects that may lose power, use a UPS HAT or configure the Pi to use a read-only overlay filesystem.
Frequently Asked Questions
What operating system does Raspberry Pi use?
Raspberry Pi OS (formerly Raspbian), based on Debian Linux. The 64-bit Bookworm version (Debian 12) is current as of 2024. You can also run Ubuntu Server 22.04/24.04, Arch Linux ARM, or Alpine Linux — all support ARM64.
My Pi isn't showing up at raspberrypi.local. What's wrong?
Common causes: (1) WiFi credentials wrong in Imager — reflash with correct SSID/password; (2) the Pi is on 5 GHz WiFi but Raspberry Pi 3/Zero only supports 2.4 GHz; (3) mDNS not supported on your router — use nmap to find the IP; (4) first boot takes 90 seconds — be patient.
Can I run Raspberry Pi from a USB drive instead of SD card?
Yes! Pi 4 supports USB boot natively after a one-time EEPROM update (rpi-eeprom-update). USB 3.0 SSD is much faster and more reliable than SD cards for intensive projects. Pi 5 also supports NVMe SSD via its PCIe slot.