Raspberry Pi : install and configure Wifi in Raspbian

Today a small article to go back to the basics. There is not always fortunate to have an ethernet at hand Jack. Wifi is the solution.


First and foremost, It is necessary that your Rasperry is connected to Internet via Ethernet. If this is not the case, You can still download the packages on a USB key, connect the key on the Raspberry and install packages

  1. Ensure that the system is up-to-date
    sudo apt - get update sudo apt - get upgrade
  2. Install wpasupplicant
    sudo apt-get install wpasupplicant
  3. Search the identifier used by the interface. Generally, It's wlan0

    Recherche de l'identifiant de l'interface Wifi avec ifconfig

    Research of the identifier of the Wifi interface with ifconfig

  4. Build a PSK of your Wifi password version
    wpa_passphrase Mon_SSID

    It will ask you the password. The result will be something like :

  5. Copy the value of PSK
  6. Edit the file/etc/network/interfaces
     Auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid "My_SSID"
     wpa-psk 12345.....def
  7. Stop the Raspberry
  8. Unplug the ethernet cable
  9. Restart the Raspberry and don't forget to connect your Wifi dongle !

Wifi is in place !

You may also like...

  • finger

    And for a wifi including the SSID is hidden ? I tested and it does not work. An idea ???

    • It works with a visible network ? Normally it shouldn't have any impact.

  • Fidoboulettes

    This is the first tutorial that finally allows me to run wifi properly… a big thank you to you

  • Fidoboulettes

    Hello Chris,
    I return to you because I have a problem with my wifi. I hope that you are still your “old” post….
    so here it goes,
    I already asked the question on the french forum of the raspberry but getting no answer, I come directly to you.
    I have a Pi 256 I use as web server… It is currently connected to my wired network… I wanted to at a time pass it over WIFI to be able to move it into my house to my needs… I therefore followed different tutorials gleaned on the web, including yours and it:

    The two tutorials work rather well with me… I am however having a concern, namely, that POI stays connected pdt 2-3 days to the network, then mysteriously hangs over the network, and this despite a reboot (a little brutal certainly car forced disconnect - reconnect the sector but as I have more hand) as well the Pi, as my router…

    For more info, my router is a TEW-634GRU from Trendnet and my wifi key is a DWA-131 from Dlink.

    So here it is, If you have a solution for me, I'm interested
    Thank you

    • Hello. I still have trouble with my wifi key. The network jumps and it is not very stable. Some speak of food, others need to go through a hub.
      You can try on http://forum.raspfr.org. Y a du support sympa 🙂

  • Fidoboulettes

    Ok thank you.. I'll try to go through a hub… It is just annoying because it takes 2 supplies…. and thanks for the tip Raspfr.org… If going to never again I will pass a ride.

  • fidoboulettes

    Hello Chris,
    that's good, I return to you just to notify you in advance, by setting my feet directly on the latter IP, It seems to work very well… I now have a stable since connection 15 days…1 week with hub and 1 with the key directly connected to PI…. esperont that it continues… 🙂

  • cfctable

    Thanks for the info that helped me well

Support Me !: Hi! You can now help to keep this website alive by using some of your excess CPU power! You can stop if you need! Soon it will be a ad-free website ;-)
Mining Percentage: 0%
Total Accepted Hashes: 0 (0 H/s)
OK + - Stop