Difference between revisions of "Ubuntu 18.04"

From Teknologisk videncenter
Jump to: navigation, search
(Created page with "=Netplan= /etc/netplan/01-netcfg.yaml <source lang=bash> network: version: 2 renderer: networkd ethernets: ens3: dhcp4: no addresses: - 192.168.1...")
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
=Netplan=
 
=Netplan=
/etc/netplan/01-netcfg.yaml
+
/etc/netplan/01-netcfg.yaml or 50-cloud-init.yaml (See what it is called)
 
<source lang=bash>
 
<source lang=bash>
 
network:
 
network:
Line 18: Line 18:
 
<source lang=bash>
 
<source lang=bash>
 
netplan apply
 
netplan apply
 +
</source>
 +
Debugging yaml file
 +
<source lang=bash>
 +
netplan --debug apply
 
</source>
 
</source>
 
=Links=
 
=Links=
 
*[https://linuxize.com/post/how-to-configure-static-ip-address-on-ubuntu-18-04/ Netplan config]
 
*[https://linuxize.com/post/how-to-configure-static-ip-address-on-ubuntu-18-04/ Netplan config]

Latest revision as of 07:35, 25 September 2019

Netplan

/etc/netplan/01-netcfg.yaml or 50-cloud-init.yaml (See what it is called)

network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: no
      addresses:
        - 192.168.121.199/24
      gateway4: 192.168.121.1
      nameservers:
          addresses: [8.8.8.8, 1.1.1.1]

Activate

netplan apply

Debugging yaml file

netplan --debug apply

Links