Connecting your Raspberry Pi to a WiFi network is actually pretty straightforward.
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="yourssid"
psk="yourpassword"
scan_ssid=1
key_mgmt=WPA-PSK
priority=5
}
Reboot the device and it should be on the network.
These networks can be given different priorities using the priority field, with a higher number indicating a higher priority.If you have multiple networks, use the following:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="yourssid" |
Raspberry Pi >