Ubuntu Server Netplan Static IP Settings

Ubuntu Server Netplan Static IP Settings

This post is the basic configuration needed to setup a static IP address on Ubuntu Server. It is VERY important to note that when using Netplan spacing must be exact. DO NOT use tabs to fill out spaces. Make sure to change the interface name to the interface presented in your installation otherwise this will not work.

  1. Netplan configuration which is located at /etc/netplan most files are named 00-installer-config.yaml
network:
  ethernets:
    enp0s3:
      addresses:
      - 192.168.60.2/24
      gateway4: 192.168.60.1
      nameservers:
        addresses:
        - 8.8.8.8
        search: []
  version: 2

2. Apply the configuration using sudo netplan apply . If the configuration fails to paste check your spacing as everything must be spaced properly.

Leave a Reply

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.