Raspberry Pi4 Static WiFi IP

less than 1 minute read

Raspi4 version : 20.04.3 LTS focal fossa Ubuntu Server

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install dhcpcd5
sudo nano /etc/dhcpcd.conf

edit dhcpcd.conf File

interface wlan0
static ip_address=192.168.0.9
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
static netmask=255.255.255.0
sudo netplan apply
or
sudo /etc/init.d/networking restart
sudo reboot

wifi change

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


network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2
    wifis:
        wlan0:
            optional: true
            access-points:
                "SSID-NAME-HERE":
                    password: "PASSWORD-HERE"
            dhcp4: true


Go to top

Leave a comment