Relação Ametódica

Data Science, Machine Learning, Artificial Intelligence, Visualization, and Complex Systems.

Raspberry Pi Tip: Headless with ssh and Wifi enabled

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: ssh and wpa_supplicant.conf


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.


The 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:

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


If you want to configure multiple networks you can add more network blocks.

find the Raspberry Pi IP in the local network

It remains to find the Raspberry Pi address. I just nmap the local network with

sudo nmap -sS -p 22