WiFi on a headless Raspberry Pi

WiFi on a headless Raspberry Pi

Login to your pi’s terminal, and run the following two commands.

sudo su
wpa_passphrase YOUR_SSID

You’ll then be asked to enter the passphrase and confirm the passphrase. If they match; you’ll see a blurb that’s a config file fragment.

Good.

Now (still as su) repeat the last step, but pipe-append the output to the supplicant file.

wpa_passphrase YOUR_SSID >> /etc/wpa_supplicant/wpa_supplicant.conf

You won’t see the instructions this time - but that’s okay. There are just two things left to do;

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Finally; reboot and run something like sudo apt-get update to test it all.


I have no idea why the guides for this take four pages.

Peter LaValle avatar
About Peter LaValle
Peter is currently a PhD student at the University of Nottingham. His day work involves applying functional programming to problems with artificial intelligence. Someday maybe he'll retire and be a graphics programmer or demoscene coder.
comments powered by Disqus