Ubuntu 20.04: Connect to WiFi from command line

Lubos Rendek Ubuntu May 13, 2020 12:46 PM (GMT+9)

In this tutorial you will learn how to connect to WiFi from command line using Netplan. This could be useful if you are running a headless

Ubuntu 20.04

system such as server or Ubuntu 20.04 on Raspberry Pi.

In this tutorial you will learn:

https://linuxconfig.org/images/01-ubuntu-20-04-connect-to-wifi-from-command-line.png

Ubuntu 20.04: Connect to wifi from command line with Netplan

Software Requirements and Conventions Used

Untitled

Ubuntu 20.04: Connect to WiFi from command line with Netplan step by step instructions

  1. First step is to identify the name of your wireless network interface. To do so execute:Depending on your Ubuntu 20.04 system the wireless network interface name would be something like: wlan0 or like in this case it is wlp3s0.

    $ ls /sys/class/net
    enp0s25  lo  wlp2s0
    
  2. Next, navigate to the /etc/netplan directory and locate the appropriate Netplan configuration files. The configuration file might have a name such as 01-network-manager-all.yaml or 50-cloud-init.yaml.

    $ ls /etc/netplan/
    
    

SUBSCRIBE TO NEWSLETTERSubscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.