-
Notifications
You must be signed in to change notification settings - Fork 13
Netplan
reubenajohnston edited this page Apr 13, 2023
·
6 revisions
- Configuration files are
*.yamland located in/etc/netplanfolder - Bring an interface down using:
$ sudo ip link set <interface> down - Bring an interface up using:
$ sudo ip link set <interface> up - Apply changes from *.yaml using:
$ sudo netplan apply - Query netplan configuration using:
$ netplan get all
Netplan uses systemd-resolvd for name resolution and the /etc/resolve.conf file is usually a symlink to /run/systemd/resolve/stub-resolv.conf. The stub-resolv.conf uses 127.0.0.53 for loopback interfaces. Nameservers defined in /etc/netplan/*.yaml files are written to /run/systemd/resolve/resolv.conf. You can redirect /etc/resolv.conf to point to /run/systemd/resolve/resolv.conf as follows.
$ sudo unlink /etc/resolv.conf
$ sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ sudo systemctl restart systemd-resolved.service
Useful links: