Skip to content

Instantly share code, notes, and snippets.

@arag0re
Created November 30, 2022 20:53
Show Gist options
  • Save arag0re/4163392150ad7761df6ca66eaaa8c45b to your computer and use it in GitHub Desktop.
Save arag0re/4163392150ad7761df6ca66eaaa8c45b to your computer and use it in GitHub Desktop.
raspi-install-guide.md

Raspberry Pi Initial Install- & Setup-Guide

  • In this guide you will learn to setup a raspi as dev-server powered by openSSH and VSCode
  • You will need a working internet-connection for inital setup

Steps:

  1. Insert your microSD-Card into the appropriat reader (fresh cards need to be formatted first so they are mountable for the OS, format them as fat32).
  2. Turn on your sound on your pc and turn volume up a bit. (important for later)
  3. Download Raspberry Pi Imager for Windows.
  4. Install the app and open it afterwards.
  5. Click the CHOOSE OS-button and then click the Raspberry Pi OS (other)-button, select Raspberry Pi OS Lite (64-bit) from shown list. (Raspberry Pi OS Lite is headless-linux without desktop-environment for server-like usecase i.e. development on Raspi via openSSH)
  6. Click the CHOOSE STORAGE-button and select your mounted microSD-Card from the list.
  7. 🔴BEFORE FLASHING🔴 click the COGWHEEL-button and configure the following settings:
    • 🔴you can scroll in the settings view🔴
    • Check the box for Set hostname and leave the default-hostname raspberrypi.local unchanged.
    • Check the box for Enable SSH and leave the default config on Use password authentication.
    • Check the box for Set username and password and configure your desired credentials.
    • If you want to use the Pi with WiFi, then check the box for Configure wireless LAN and enter your WiFi credentials. Otherwise leave it unchecked for use with Ethernet-Cable.
    • Check the box for Set locale settings, select Europe/Berlin for time zone and de as keyboard layout.
    • scroll down to the bottom and uncheck the Enable telemetry box, then check the Play sound when finished-box and the Eject media when finished-box
    • Click the SAVE-button at the bottom and now you can click the WRITE-button to Flash this OS and config onto the microSD-Card
  8. After you heard a sound from the tool you are ready to eject the microSD-Card from your pc and its time to insert it into your raspis microSD-Card slot.
  9. Plugin the powersupply into the wall-socket and connect it to your raspis usb-c port. (The info-led should begin flashing after a bit)
  10. Leave the raspi booting and continue with setting up VSCode.
    • Download VSCode from Microsofts Website
    • Install Remote - SSH VSCode extension.
    • Press F1 on your keyboard and search for Remote-SSH: Add New SSH Host and hit enter.
    • Enter ssh [email protected] (configured previously in raspberrypi imager) and hit enter on your keyboard.
    • Then select the ssh-config file where you want to save this config to.
    • Press F1 again and search for Remote-SSH: Connect to Host and hit enter.
    • Select the configured host raspberrypi.local.
    • Select Linux from the list as remote-host platform.
    • Enter the password for your user (configured previously in raspberrypi imager).
    • Now your VSCode is connected to your rapsi via SSH. You can use the integrated terminal (ctrl+shift+ö) to interact with raspberry pi's shell and install software via apt.

For python development

Nice VSCode extensions for python development are:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment