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.
32 Answers
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 linkYou should see an interface beginning with "wlan" or "wlp" - for example: wlan0 or wlp2s0. Bring this interface up:
ip link set <interface> upFor example, if wlp2s0 is the interface:
ip link set wlp2s0 upCreate 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.confFor example:
wpa_passphrase "MyHomeNetwork" "abcd1234" > /etc/wpa_supplicant/wpa_supplicant.confStart 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 3 netplan is able configure but underlaying system fails. ubuntu server 20.04 dont include wpasupplicant (which is only 1.4Mb), You should connect ethernet cable and restart then
apt install wpasupplicant
netplan applyin 1 minutes it connects.