This takes a few minutes and there’s no progress indicator. You can use iotop to watch how fast it’s writing.

when writing appears done, type

sync

to be sure it’s done writing.

Unmount/eject, remove and reinsert the SD card.

In the SD card boot partition enable SSH on the headless Pi for first boot by

touch ssh

which creates a blank file named ssh. N.B.: this is NOT the boot directory in the 4 GB main partition of the SD card, this is a separate < 100 MB partition named boot. It has other important files like config.txt in it.

(Optional) Headless WiFi is enabled by editing from your laptop on the SD card the file /etc/wpa_supplicant/wpa_supplicant.conf and adding lines like

network={
ssid="my cool wifi router"
psk="my wifi password"
}

Optionally, prioritize Wifi networks by the priority field, which can be a positive or negative integer.

“eject” or unmount the SD card before removal, to avoid corrupting the SD card file system.

3. first boot headless Pi

Insert the SD card into the Pi and boot.

After about one minute, on your laptop plugged directly to the Pi via Ethernet:

ssh pi@raspberrypi.local

default password is raspberry

logged into the Pi, change the default password to something else with

passwd

set unique hostname: raspi-config. If chose mypi then after Pi reboot:

ssh pi@mypi.local

set locale to be UTF-8. Assuming you wish to have the United States locale, uncheck the default GB and check en_US.UTF-8 UTF-8. When prompted for default locale, also selected en_US.UTF-8 UTF-8.

if you don’t pick a UTF8 locale, Python may give UnicodeDecodeError with UTF8, even when .py script already has # -*- coding: utf-8 -*-.

Again assuming you’re using a United States keyboard, set keyboard layout in raspi-config to Generic 104 keyboard, United States layout to avoid not being able to type symbols properly.

Reboot, particularly to make the locale settings take effect.

Just a simple network switch connecting Raspberry Pis, PCs and other devices makes an internet-free, pure link-local “off the grid” network.
Of course, you can also put the Pis on a wired or wireless network connected to the Internet if desired.
The .local address functionality will NOT work over the Internet, but only on the LAN segment your device is on.

SSH server

Without further configuration, SSH servers listen on all interfaces.
Normally this is fine.

If you want only specific interface(s) to have the SSH server listen, you will need to research ListenAddress of /etc/ssh/sshd_config and/or IPTables.