This tip is mainly for my own reference during future installations, but it might be helpful to anyone trying to setup a headless Raspberry Pi.
After creating the SD Card with your Raspberry Pi OS don’t rush to try it out. Add two files to its root folder:
The existence of the
ssh file in the boot folder will instruct Raspberry Pi to enable SSH and delete the
ssh file. This file can be an empty file or with any random text in it. It doesn’t matter.
wpa_spulicant.conf file enables wifi (if you have a wifi dongle connected to the Pi).
The contents of the file matter as they contain the passwords and wifi networks that you want to connect to. Here’s an example:
If you want to configure multiple networks you can add more network blocks.
It remains to find the Raspberry Pi address. I just nmap the local network with
sudo nmap -sS -p 22 192.168.0.0/24