Skip to content

Instantly share code, notes, and snippets.

@surendharreddy
Created April 25, 2021 04:23
Show Gist options
  • Save surendharreddy/9b76c214a6ae51cd18023a58ac701fc0 to your computer and use it in GitHub Desktop.
Save surendharreddy/9b76c214a6ae51cd18023a58ac701fc0 to your computer and use it in GitHub Desktop.
Connecting to WiFi on Ubuntu without GUI

Connecting to WiFi on Ubuntu without GUI

Navigate to /etc/netplan/50-cloud-init.yaml

network:
    ethernets:
         eth0:
             dhcp4: true
             match:
                 driver: bcmgenet smsc95xx lan78xx
             optional: true
             set-name: eth0
    version: 2
    wifis:
        wlan0:
            optional: true
            access-points:
                "REPLACE-WITH-SSID-NAME":
                    password: "REPLACE-WITH-SSID-PATH"
            dhcp4: true

Generate config files

sudo netplan --debug generate

Apply changes

sudo netplan apply
reboot

See https://netplan.io/examples/ for more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment