freebsd, how to set and get dns name stored in the system.

How do I set dns name and get dns name not just of itself but others as well.
Who is Participating?
jeremycrussellConnect With a Mentor Commented:
To configure a freebsd and linux box to use DNS, you'll edit two files.


look for the "hosts: " line in /etc/nsswitch.conf make sure it uses files and dns.

hosts:      files dns

Then in /etc/resolv.conf you'll setup your DNS servers and search domains.


To create a DNS entry for your machine, its a little more involved.  It all depends if you are hosting a local domain, on a local server, or if you have a registered domain somewhere.

To set up a name for your server you'll edit the /etc/hosts file for one.

You'll have a line with the IP of your machine and its name... usually followed by the fqdn, if you want to configure that.  For example.              yourhostname

You can also set the machines hostname using the "hostname" command.

# hostname yourhostname

JAN PAKULAConnect With a Mentor ICT Infranstructure ManagerCommented:
on domain i would use nslookup
try dnsubound
rgbcofAuthor Commented:
Very nice jeremycrussell.  Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.