TYLOR.TECH

Search
Close this search box.

Setting A Static IP Ubuntu 18.04

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

network:
  version: 2
  renderer: networkd
  ethernets:
    ens18:
     dhcp4: no
     addresses: [10.0.0.22/24]
     gateway4: 10.0.0.1
     nameservers:
       addresses: [8.8.8.8,8.8.4.4]

sudo netplan apply

Share this Post:
Scroll to Top