Connecting RPi to Wifi
To connect your Raspberry Pi to the internet, you will need to connect it to a wifi network with internet access.
You can do so from the command line in 2 ways:
- Using the
raspi-configtool - Editing the
/etc/wpa_supplicant/wpa_supplicant.conffile
Using raspi-config
- Open the terminal and type
sudo raspi-config. - Select
1 System Options. - Select
S1 Wireless LAN. - Enter the SSID of the network you want to connect to and press enter.
- Enter the password of the network you want to connect to and press enter.
- Select
OKand press enter. - Select
Finishand press enter. - Reboot the Raspberry Pi by typing
sudo rebootin the terminal.
Editing the wpa_supplicant.conf file
- Open the terminal and type
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf. - Add the following lines to the file:
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_NETWORK_PASSWORD"
}
- Reboot the Raspberry Pi by typing
sudo rebootin the terminal.