Connecting to personal wifi on Ubuntu Server 20.04

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.

3

2 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 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
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 apply

in 1 minutes it connects.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like