Updated
Updated · ZDNet · Jul 20
ZDNET Shows Ubuntu Users How to Set DNS With 2 Netplan IP Addresses
Updated
Updated · ZDNet · Jul 20

ZDNET Shows Ubuntu Users How to Set DNS With 2 Netplan IP Addresses

1 articles · Updated · ZDNet · Jul 20

Summary

  • ZDNET’s latest guide walks Ubuntu users through changing DNS from the command line by editing a Netplan YAML file in /etc/netplan, using Cloudflare’s 1.1.1.1 and 1.0.0.1 as examples.
  • The method is aimed at systems without a GUI or machines accessed over SSH, and ZDNET says it works on both DHCP and static-IP setups across desktops and servers.
  • NetworkManager may override desktop DNS settings, so the guide says users can disable that control in NetworkManager.conf and restart the service before applying Netplan changes.
  • After adding the nameservers section, the guide applies the update with sudo netplan apply and verifies it with ping google.com or resolvectl status, noting YAML indentation errors are the most likely problem.

Insights

How can you permanently stop NetworkManager from overriding your custom DNS settings on Ubuntu?
How do you activate encrypted DNS-over-TLS on Ubuntu 26.04 using only the command line for enhanced privacy?
What fail-safe command prevents you from getting locked out of a remote server after a bad network configuration?