Skip to content

Netplan

Setup Static IP

Bash
sudo nano /etc/netplan/00-installer-config.yaml
YAML
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
     dhcp4: no
     addresses: [192.168.1.201/24]
     gateway4: 192.168.1.1
     nameservers:
       addresses: [8.8.8.8,8.8.4.4]

gateway4 has been deprecated use instead:

YAML
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
     dhcp4: no
     addresses: [192.168.1.201/24]
     routes:
      - to: default
        via: 192.168.1.1
     nameservers:
       addresses: [8.8.8.8,8.8.4.4]

Check examples here