I have a Raspberry Pi 3 and I need to run Ubuntu on it. I put the 16.04 server image for the Raspberry Pi 3 from https://wiki.ubuntu.com/ARM/RaspberryPi on a microSD card and it boots fine, and works fine when connected to Ethernet.

However, I cannot seem to get the onboard wifi working with Ubuntu 16.04. Wireless works fine with Raspbian so I know the hardware is OK.

Has anyone got the on board WiFi working with Ubuntu Server 16.04 on a Raspberry Pi 3? I feel like it's really close to working, but I just am missing some small detail.

After a fresh install, sudo lshw -C network does show wlan0, although I can't find that defined anywhere in /etc/network, and it's initially disabled.

I then installed wpasupplicant and added this to /etc/network/interfaces:

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

And put this in /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
        ssid="homewifi"
        psk="xxx"
        key_mgmt=WPA-PSK
}
network={
        ssid="phonewifi"
        psk="xxx"
        key_mgmt=WPA-PSK
}

To get those settings, I booted Raspbian, connected to those two different SSIDs, and just copied the settings to Ubuntu. However after a reboot, wlan0 does not connect to either network, never gets an IP, etc.

Is wpa-supplicant just not the way to configure WiFi for the Raspberry Pi 3 using Ubuntu Server 16.04? Or am I configuring something incorrectly?

For the image with apt installed

OS: Ubuntu 16.04.1 LTS  OS 
image: ubuntu-16.04-preinstalled-server-armhf+raspi3.img
HW: RASPBERRY PI 3 MODEL B

Step1:

sudo apt-get install wireless-tools

Step2:

sudo apt-get install wpasupplicant

Step3: add to /etc/network/interfaces:

auto wlan0 
iface wlan0 inet dhcp
wpa-essid WIRELESSSSID 
wpa-psk WIRELESSPASSWORD

Step4: comment from /etc/network/interfaces the line:

#source /etc/network/interfaces.d/*.cfg

the commented interfaces.d/*.cfg file contains settings for the eth0.

I do not understand why but leaving this line active and adding the wlan0 config would crash the system at boot.

Step5: reboot

For the core image without apt installed:

OS: Ubuntu Core 16 
image: (GNU/Linux 4.4.0-1030-raspi2 armv7l)
HW: RASPBERRY PI 3 MODEL B

Step1:

ifconfig wlan0 down
ifconfig wlan0 up

Step2: create wireless config file:

sudo vi /etc/network/interfaces.d/wlan0

Note: I tried without sudo but it would not let me save the changes

Step3: add the following content

auto wlan0 
iface wlan0 inet dhcp
wpa-essid WIRELESSSSID 
wpa-psk WIRELESSPASSWORD

Step4: reboot

  • how did you make that if apt is not present yet? thanks – Riccardo Magrini Jan 24 '17 at 21:02
  • 1
    I have updated my answer to cover ubuntu core also – V Bota Jan 26 '17 at 23:03
  • perfect it works right....thanks a lot – Riccardo Magrini Jan 27 '17 at 15:54

This is my config (slightly different to the others as I use wpa_supplicant.conf)

In /etc/network/interfaces I have:

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

where the file /etc/wpa_supplicant/wpa_supplicant.conf contains the following:

country=GB

network={
    ssid="MyWifiNetwork"
    psk="myP4ssw0rd"
}
  • Thanks a bunch. This is the solution that looks most like the Raspbian docs. Clean! – E. Sundin Sep 8 '17 at 14:16

I did iwconfig command and from there the messages came that dependicies needed to be updated and after that I could install the wireless-tools.

sudo apt-get -f install
sudo apt-get -f install wireless-tools

after these commands I was able to iwconfig.

Hope this helps!

maybe my solution duplicate to someone else. Anyway try just follow these 3 steps.

Install WPA Supplicant

sudo apt-get install wpasupplicant

Edit the /etc/network/interfaces file as below. Edit Your Wifi Name(support space) and yourPassword according your preferences.

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
# source-directory /etc/network/interfaces.d

# The loopback network interface
auto lo
iface lo inet loopback

# The wireless network interface
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid My Wifi Name
wpa-psk yourPassword

# The primary network interface
# allow-hotplug eth0
# iface eth0 inet dhcp

Reboot your system

sudo reboot

This solution work for both raspberry pi 3 and 2 & Ubuntu Server 14.04 and 16.04. (Of course you need Wi-Fi dongle for pi2)

Good Luck!

Any success so far? Did you read this? ubuntu WPAHowTo

Accordingly, I installed this on my RPi3 running ubuntu MATE 16.04:

sudo apt-get install wpagui

Where it tells one to be run like this: You will need to run it via gksudo wpa_gui so that it can talk to the WPA daemon.

gksudo wpa_gui

Even if it may not be available on your server version, due to a missing GUI(?), it may be helpful for testing purposes on the Raspbian OS. Or even assist in deducting correct settings. Which it did in my case.

  • wpa-supplicant and wpa_gui were developed alongside.So yes, wpa-supplicant is the way to configure WiFi for the Raspberry Pi 3. wpa_gui just offers a GUI for it. – user6224996 Aug 4 '16 at 16:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.