1

I'm seeing a lot of guides on internet telling me to assign through

cd /etc/netplan

sudo nano 50-cloud-init.yaml

Unfortunately I edited it with tabs at first and now I'm not sure how to fix that mistake.

Also, it says that changes in this file will not take effect!

#This file is generated from information provided by
#the datasource. Changes to it will not persist across an instance.

How can I revert this file back to default and make the proper edits to assign our Ubuntu server a static IP?

steeldriver
  • 131,985
  • 21
  • 239
  • 326
null.void
  • 11
  • 1
  • Edit the .yaml with gedit and it'll show you where the tabs are. `sudo -H gedit /etc/netplan/50-cloud-init.yaml` – heynnema Apr 16 '19 at 17:01

1 Answers1

0

Look at this example: How do I reload network configuration with cloud-init?. Also, you can try to revert back to the original file format which is stated below.

network:
    ethernets:
        eno1: <-- or whatever your connection states it is
            dhcp4: yes
version2:

This should do it. This is the default config. for the .yaml src at 50-cloud-init.yaml at /etc/netplan/.

Seth

P.S. Then, use sudo netplan apply to finish off your "change." If the sudo netplan apply command does not work, try to look around on this forum. I have found some info. that is dedicated to netplan or ubuntu server specifically.

De Funct
  • 131
  • 9