I find myself setting up Raspberry Pi’s more frequently than I’d like. I never ever have a monitor connected. Below is the method I use to get wireless network connectivity without connecting an Ethernet cable or a monitor and keyboard. This is here because I’m tired of sifting through incorrect articles to find this information.
- Download Raspbian and flash it to your SD card. Plenty of good guides out there, but there’s nothing quite like the source.
- Mount the SD card to your machine and navigate to the boot directory
- Create a blank file called “ssh” in the root of the boot partition
- Create a new file called “wpa_supplicant.conf” and include the contents below. Replace [ssid] and [password] with the values pertaining to your network.
- Safely unmount, and have fun!
1
2
3
4
5
6
7
8
9
10
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="[ssid]"
psk="[password]"
key_mgmt=WPA-PSK
}
|
If you want more information on this process – check out the Raspbian documentation on a headless install, and the wpa_supplicant documentation.
Until next time,
Jon