Setting up Wifi

raspi-config

raspi-config is the Raspberry Pi configuration tool that makes network configuration, remote access (eg. ssh / vnc), location settings and boot options a snap. This tool can be run from the command line and provides a simple interface that is easy to navigate with arrow keys. We highly recommend using this method over the GUI or manual command line file editing due to the flexibility of being able to run it remotely or in a console. 

Launching raspi-config

When you first boot your newly configured Pi it will either drop you into a console or into a graphical environment. In either case we will run the following command. The GUI boot up will require us to launch a terminal. 

Download: file
sudo raspi-config

Select Network Options

Select Wi-Fi

Enter WiFi Name (SSID)

Enter WiFi Password

Select Finish

Bring Up the WiFi Adapter

We could just reboot and see if the WiFi automatically comes up. The following wpa_cli command will bring up the WiFi interface on-line without requiring a reboot. 

If you have a modern Raspberry Pi and are using an external adapter it is likely that your WiFi device will be named wlan1.

Download: file
sudo wpa_cli -i wlan0 reconfigure

Verify IP Address

If everything worked properly we will see the IP address of our device after the "inet " argument. We are now on-line. If this does not work try repeating the steps above in raspi-config and entering the WiFi access point name (SSID) and password again.

Download: file
ifconfig wlan0
This guide was first published on Dec 10, 2012. It was last updated on Dec 10, 2012. This page (Setting up Wifi) was last updated on Aug 18, 2019.