DEV Community

Stack All Flow
Stack All Flow

Posted on • Originally published at stackallflow.com on

How to Add a DNS Server via resolv.conf in Ubuntu?

resolv.conf

Is /etc/resolv.conf useless in Ubuntu 12.04 LTS (Precise Pangolin)?

I see that the DNS server information is stored in NetworkManager now. The nmcli command line tool can list that for you.

If I want to add one more DNS server, will adding it to /etc/resolv.conf by using the resolvconf package help?

Accepted Answer

If /etc/resolv.conf contains nameserver 127.0.0.1 then adding entries to /etc/resolvconf/resolv.conf.d/tail won’t really do anything useful.

If you are using NetworkManager then you should instead statically add nameserver addresses via network indicator: Edit Connections… | Edit… | IPv4 Settings | Additional DNS servers.

If you really want to add more entries to /etc/resolv.conf, create a /etc/resolvconf/resolv.conf.d/tail and add them there.

As with every Ubuntu release, it’s recommended to read the Ubuntu Release Notes, available here:

The Desktop and Common Infrastructure sections contain a link to

The post How to Add a DNS Server via resolv.conf in Ubuntu? appeared first on Stack All Flow.

Top comments (0)