How I configure DNS on Ubuntu Linux distros via the command line - it's easier than you think
'ZDNET Recommends': What exactly does it mean?

'ZDNET Recommends': What exactly does it mean?
ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.
When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.
ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form .
Follow ZDNET: Add us as a preferred source on Google.
Every once in a while, you might find yourself in a situation where you need to change DNS providers, and you don't have access to a desktop GUI. You might be dealing with a PC remotely, an at-home server, or maybe you just want to up your Linux skills.
Either way, you might want to know how to configure DNS with the Netplan tool, which is the command-line system for configuring networking on Ubuntu-based desktops.
Before we get into it, know that configuring DNS the GUI way is very easy, so if you have access to a desktop environment, you could do this without ever touching the command line. If, on the other hand, you've used SSH to remote into a machine (or the machine simply has no GUI), be glad the command line method is almost as easy (as long as you have at least a modicum of experience with the command line).
Also: 7 Linux commands I can't live without after 20 years in the terminal
Fortunately, it's not as hard as you think. All you need to do is edit a single file. Do note that this does work, whether you have your system set up for a DHCP IP address or a static IP address.
Source: ZDNet