Skip to content

Instantly share code, notes, and snippets.

@placecodex
Created April 1, 2021 13:27
Show Gist options
  • Save placecodex/d84d86d23a5e71e97c1a449334e43065 to your computer and use it in GitHub Desktop.
Save placecodex/d84d86d23a5e71e97c1a449334e43065 to your computer and use it in GitHub Desktop.
put static ip v4 ubuntu
sudo nano /etc/netplan/00-installer-config.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# 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:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: no
addresses: [192.168.1.9/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
sudo netplan apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment