Skip to content

Instantly share code, notes, and snippets.

@kakashysen
Last active March 16, 2016 14:51
Show Gist options
  • Select an option

  • Save kakashysen/beedfffd70c5dec6df41 to your computer and use it in GitHub Desktop.

Select an option

Save kakashysen/beedfffd70c5dec6df41 to your computer and use it in GitHub Desktop.
How to configure wifi on raspberry pi from command line

How to configure wifi from command line

  • In the command line run sudo iwlist wlan0 scan command to list all wifi networks are in the range
  • Look this label ESSID:"<network-name>" in the result of each network
  • Edit wpa_supplicant.conf file with sudo , sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
  • At the end of the file add next lines changing the values ssid network-name and psk password of your network
network={
    ssid="<your_network_name>"
    psk="<your_wifi_password>"
}
  • If the wifi is not connected try restart the interface run the next commands sudo ifdown wlan0 and sudo ifup wlan0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment