I would like to set-up everything on my Raspberry Pi Zero (WI-FI and SSH) without the need of a keyboard and monitor, and I was wondering if I could do it directly from my main PC into the SD card, so that when I boot the RPi, everything is there and working.
2 Answers
You just need to add two files to your boot partition: One called wpa_supplicant.conf
which contains something like:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="your_real_wifi_ssid"
psk="your_real_password"
key_mgmt=WPA-PSK
}
and one called ssh
to enable the ssh service.
It's not that hard to find this information by using a search engine: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
-
You don't need
key_mgmt=WPA-PSK
but you do needcountry=US
to have the correct ISO country code for where in the world you're located.– DougieCommented Mar 4, 2019 at 6:17
This github project aims is a "The minimal Raspbian unattended netinstaller for Raspberry Pi".
So it will not only setup WiFi and SSH it can change stuff like packages to install, keyboard layout and lot more.