I have followed a number of tutorials recommending different things with netplan for connecting to the internet. None of them have worked. Should i be trying to connect with something else? or should netplan work and i have done something wrong? If you know of some tutorial i can follow that would help that would be much appreciated, thanks.

  • What tutorials specificaly did you follow, what didn't work, what was the output? Netplan is certainly the recommended interface to use on Ubuntu 20.04. – slangasek Jun 11 at 17:50
  • Could you please show the netplan config from /etc/netplan/*.yaml which is not working for you? – Lukas Maerdian Jun 22 at 15:26

If Netplan doesn't work, one alternative (there might be others) is to connect up to the wireless LAN the old-fashioned way using wpa_supplicant:

Note: All these commands should be run as root or with sudo:

First, check which interfaces you are working with:

ip link

You should see an interface beginning with "wlan" or "wlp" - for example: wlan0 or wlp2s0. Bring this interface up:

ip link set <interface> up

For example, if wlp2s0 is the interface:

ip link set wlp2s0 up

Create the wpa_supplicant configuration file with the following command (assuming your network is WPA-PSK encrypted):

wpa_passphrase "<SSID>" "<Password>" > /etc/wpa_supplicant/wpa_supplicant.conf

For example:

wpa_passphrase "MyHomeNetwork" "abcd1234" > /etc/wpa_supplicant/wpa_supplicant.conf

Start wpa_supplicant in the background:

wpa_supplicant -Bc /etc/wpa_supplicant/wpa_supplicant.conf -i <interface>

Finally, if you are using a DHCP connection, start dhclient:

dhclient <interface>

Now test your connection (optional):

ping ubuntu.com -c 5
| improve this answer | |
  • Thank you so much this worked! – jap101 Jun 11 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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