How do I change nameservers in Ubuntu?
Isabella Floyd
Updated on April 01, 2026
How do I change nameservers in Ubuntu?
Change DNS Nameserver via GUI
- Launch Settings and click the Network tab in the menu on the left.
- Click the cogwheel next to the connection you wish to set up.
- Go to the IPv4 tab.
- Disable automatic DNS configuration by turning off the switch next to the DNS field.
- Type new DNS addresses in the field.
- Click Apply.
What is nameservers ubuntu?
Domain Name Service (DNS) is an Internet service that maps IP addresses and fully qualified domain names (FQDN) to one another. Computers that run DNS are called name servers. Ubuntu ships with BIND (Berkley Internet Naming Daemon), the most common program used for maintaining a name server on Linux.
How do I set permanent DNS nameservers in Ubuntu?
- Installing resolvconf package. Depending on which version of Ubuntu/Debian you’re using, resolvconf may or may not be installed, so let’s check before we continue. Open up a Terminal window and enter the following code: sudo systemctl status resolvconf.service.
- Set DNS servers in resolv. conf using head file.
What is name server in resolv conf?
The most important option in resolv. conf is nameserver, which gives the IP-address of a name server to use. If you specify several name servers by giving the nameserver option several times, they are tried in the order given. You should therefore put the most reliable server first.
How do I find the server name in Linux?
To check the current nameservers (DNS) for any domain name from a Linux or Unix/macOS command line:
- Open the Terminal application.
- Type host -t ns domain-name-com-here to print the current DNS servers of a domain.
- Another options is to run dig ns your-domain-name command.
What do name servers do?
Nameservers play an essential role in directing traffic on the Internet by helping to connect your domain name with the IP address of your web server. To do this, they help web browsers and other services access your domain’s DNS records.
Which file holds the list of the name servers Linux?
The named.ca file establishes the names of root servers and lists their addresses. If your network is connected to the Internet, named.ca lists the Internet name servers; otherwise, it lists the root domain name servers for your local network.
How do I find my server name?
Open the Terminal application. Type host -t ns domain-name-com-here to print the current DNS servers of a domain. Another options is to run dig ns your-domain-name command. To find the delegation path from the root name servers, try: dig +trace your-domain-name.