Skip to content

Instantly share code, notes, and snippets.

@natthasath
Last active January 26, 2024 07:03
Show Gist options
  • Save natthasath/b4936f20ae3ec1494c9bdce410fdab96 to your computer and use it in GitHub Desktop.
Save natthasath/b4936f20ae3ec1494c9bdce410fdab96 to your computer and use it in GitHub Desktop.
netplan.md
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    eth0:
      dhcp4: no
      addresses: [192.168.1.100/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    eth0:
      dhcp4: no
      addresses: [192.168.1.100/24]
      routes: 
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]
@natthasath
Copy link
Author

sudo netplan generate
sudo netplan apply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment