Let’s set up the SD card using Raspberry Pi Imager (downloadable here). There are other options for this, but we really like Imager these days…you can configure most system essentials before the card is even written; no need for a post-boot setup round.
The “CHOOSE OS” button pops up a menu of choices. Select “Raspberry Pi OS (other)” and then download one of the “Lite” versions: 32-bit works across every Pi model, or optionally (Pi 3 and later) can use 64-bit, though don’t expect any dramatic difference for this particular use. Make sure to download the OS Lite, not Full…we’ll be using the system “headless” without a display.
Insert the SD card in a reader and click “CHOOSE STORAGE” to select it.
Once the above steps are done, this gear icon appears, which brings up the Advanced options menu…
The first four Advanced options settings are essential:
- Set hostname to something unique for your network (prior versions of Raspberry Pi OS used raspberrypi.local by default, but for security they recommend against that now).
- Enable SSH if using Ethernet for later setup. This is not strictly required if using a serial console cable, but you might have other use for it later.
- Set username and password. These used to default to pi and raspberry, but again they recommend against this now. Pick something distinct.
- DO NOT select “Configure wireless LAN.” After some software installation, we’ll configure WiFi manually later…selecting this now would interfere.
Other settings like time zone and keyboard layout are optional…you can set these as you like, or not.
Click “SAVE” when done, then the “WRITE” button to write the OS to the SD card.
While Imager works, get the Pi ready by connecting an Ethernet cable and…if using an earlier Pi (without WiFi)…insert a USB WiFi adapter into any available USB port. This is best done now when the Pi is powered off.
After the card is written and verified, safely eject it, move it over to the Pi and connect power to the system. Allow a few minutes for first boot as the filesystem is expanded and ssh keys are generated.
If your Pi is connected to the Ethernet network and ssh is enabled, you can log in remotely from another computer with an ssh client, providing the hostname, user name and password you set earlier.
Or, if using a serial console cable: connect it as in the following diagram. Notice the red wire is not connected. You can now log in from another computer with a serial terminal program, providing the username and password you set earlier.