Skip to the content.

How to setup your raspberry pi without a monitor?

Windows

wpa_supplicant.conf file:

country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
scan_ssid=1
ssid="your_wifi_ssid"
psk="your_wifi_password"
}

Linux

install the rpi-imager for your linux distro

for debian based distros enter:

sudo apt install rpi-imager

for arch based distros via snap

if you don´t have snap installed run that commands:

sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

if you have snap run that:

sudo snap install rpi-imager

creating files to enable ssh and connecting to a wifi

now cd into your sd card and enable ssh:

touch ssh

and create the wpa_supplicant.conf file if you need wifi

cat <<EOF > wpa_supplicant.conf
country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
scan_ssid=1
ssid="your_wifi_ssid"
psk="your_wifi_password"
}
EOF

MacOS

now cd into your sd card and enable ssh:

touch ssh

and create the wpa_supplicant.conf file if you need wifi

cat <<EOF > wpa_supplicant.conf
country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
scan_ssid=1
ssid="your_wifi_ssid"
psk="your_wifi_password"
}
EOF

Thats it, wasn´t it easy lmao?

Contact me at contact@phoenixthrush.com if you have questions!