Headless Raspberry Pi setup (Raspbian Stretch) from a Linux PC:

This page describes the initial setup, installation and configuration of software on a Raspberry Pi for “embedded” use. Since there is no monitor or keyboard, the Pi will be managed remotely via the network. Also, Raspbian Lite is installed to save space on the SD card and to free up system resources.

These links take you to the various setup activities.

  1. Generate an SSH key pair
  2. Download Raspbian to an SDHC card
  3. Configure Raspbian

Generate an SSH key pair for your PC

Generate an ssh key so that remote access to the Raspberry Pi will be limited to your PC. The key is only generated if one does not already exist. For more info, see HPR Episode 2356 . This command will generate the key:

        $ [ -e ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519 -C "Raspberry Pi key"

Create a bootable SDHC (or uSDHC) card that will allow remote access

These steps initialize an SDHC card with the Raspbian OS so that when inserted into a Raspberry Pi the Pi will be on a wireless network and remote administration is possible.

Perform initial Raspbian configuration

To avoid damage, two guidelines should be followed.

  1. Except for USB devices, do not connect or disconnect anything with the Raspberry Pi when power is applied.

  2. If possible, perform a clean shutdown of Raspbian via a command like sudo poweroff before removing power.

These steps boot the Raspberry Pi from the SDHC card and use remote access to perform initial configuration.

This completes the initial setup.