Day 1 is getting your Pi running without a monitor, keyboard, or mouse — headless setup. This is how every professional uses a Pi.
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).
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.
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.
#!/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.ping raspberrypi.local responds (should be under 2 minutes).vcgencmd measure_temp and vcgencmd get_throttled. Is temperature under 50°C at idle? Is throttled status 0x0?vcgencmd get_throttled to check for underpowering (0x0 = healthy)Set up a static IP address on your Pi so it always gets the same address on your network (either via DHCP reservation in your router or by editing /etc/dhcpcd.conf). Then set up SSH key authentication so you never need to type a password. Finally, configure ~/.ssh/config on your laptop so you can connect with just ssh pi.