Skip to main content
Version: 2024

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:

  1. Using the raspi-config tool
  2. Editing the /etc/wpa_supplicant/wpa_supplicant.conf file

Using raspi-config

  1. Open the terminal and type sudo raspi-config .
  2. Select 1 System Options.
  3. Select S1 Wireless LAN.
  4. Enter the SSID of the network you want to connect to and press enter.
  5. Enter the password of the network you want to connect to and press enter.
  6. Select OK and press enter.
  7. Select Finish and press enter.
  8. Reboot the Raspberry Pi by typing sudo reboot in the terminal.

Editing the wpa_supplicant.conf file

  1. Open the terminal and type sudo nano /etc/wpa_supplicant/wpa_supplicant.conf .
  2. Add the following lines to the file:
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_NETWORK_PASSWORD"
}
  1. Reboot the Raspberry Pi by typing sudo reboot in the terminal.