LoginSignup
0
0

How to setup wifi on RaspberryPi via Ubuntu CUI

Last updated at Posted at 2024-04-26

Overview

Just some random notes for setting up wifi on RaspberryPi so that I won't forget.

Environment

  • Raspberry Pi 4 Model B
  • Ubuntu Server 20.04 LTS

Setting Up

Wifi-file

You can edit the wifi settings here.

Terminal
/etc/netplan/50-cloud-init.yaml

Edit the file

Terminal
sudo nano /etc/netplan/50-cloud-init.yaml

The Terminal will show yaml file like this.

Terminal
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2
    wifis:
            wlan0:
                    dhcp4: true
                    optional: true
                    access-points:
                            "SSID":
                                    password: "Password"

Make sure you change the SSID and the password to your environment.

Apply the network

Terminal
sudo netplan apply

Confirm

Check if you got wifi on

Terminal
iwconfig

or this may do

Terminal
wifi-status
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0