Tool-BarfreeBSD ArticlesSearch Our SiteHOMEfreeBSD LinksContribute to FreeBSD HelpFreeBSD FilesFreeBSD Script Corner

Setup and Installation of the host file in FreeBSD

 This is one of the problems that users are always having, so, if you are also having a problem understand on how to setup your hosts file in the /etc directory, then this tutorial is for you.
             hosts file.

  You wont get much help with using the man pages, when you first set your FreeBSD up, it will create a hosts file for you with the current IP and the in it, anything else you wish to add you need to add yourself.

Go into the /etc directory, and type  "vi hosts"
 Then create the following lines...

 Where " is, put your domain that you wish to use here. This line is probably already listed in the file, and you might just want to edit it.

This line is not included, and is important that you add it.


  We now need to give your machine a nickname if you so desire. But, if we have a Network Interface Card we will assign the IP that we gave it to our name:


  The sysinstall in the /stand directory normally creates these for you, but what happens if you didn't have a network card when you installed FreeBSD ?  If so, do the below example :


 If you have other machines on your network, and you want to add them, this is where we would add them at, for each machine add a new number, for example 10.0.0.x :


 This will show you what this file should now look like :


  After editing our hosts file, we can then go edit /etc/host.conf. We want to check the hosts file before we try named, so we want to have hosts before bind like so:


© 1997 - 20013 Defcon1, , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of and the content's original author.

Tool-Bar-2Defcon1  Webmail