Enable SSH and add WLAN config on Raspberry OS Lite

If you’ve ever installed the lite version of the Raspberry OS, you’ll know that this version of the OS does not come with any display drivers and is meant to be run headless. I installed it on my Pi Zero W recently since its a SBC with very low specs. And I didn’t care much for software on the regular version anyway.
It’s fairly simple to enable SSH and have it connect to a WiFi network.

I installed the Raspberry OS using the Raspberry Pi Imager. After the OS is installed, create an empty file called ssh with no extension in the root of the SD card. This will enable SSH.

Now that SSH is enabled, I also wanted it to be connected to my WiFi network. In the root of the SD card create another file wpa_supplicant.conf and use your WiFi AP details.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Include scan_ssid=1 line if your SSID is hidden.

Once this is done, insert the SD card and boot up your Pi. It should have SSH enabled and connected to the WiFi AP. You can then SSH with the default user pi and password raspberry .



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


I work with cloud, containers, linux