Frage

I researched about how to add a name server in the file resolv.conf, I found this command on this site:

namerslv -a -i ip address

I'm also confused with the example in that site, this one:

namerslv -a { -i IPAddress | -D DomainName| -S SearchList}

so which one I should use if I want to add just the name server?

-i
-D or
-S (I have doubts about this)

When I try to use it, it's not supported on my Linux.

Also, why is it important to list at least two name servers in the file resolv.conf?

War es hilfreich?

Lösung

vim /etc/resolv.conf

Edit file - usually you would have:

nameserver 8.8.8.8
nameserver 8.8.4.4

possibly:

domain local.example.com

or:

search local.example.com

This will help you with searches like:

host hostname

rather then

host fqdn

Adding more than one DNS entry is important from the redundancy point of view - if one fails you can still resolve names.

Andere Tipps

why cant you edit and modify it directly

nameserver search company.com

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top