Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Aug 2006 14:47:24 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Ro BGCT <robgct@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Confused on how to properly set /etc/hosts
Message-ID:  <44D5F2EC.5090901@infracaninophile.co.uk>
In-Reply-To: <1414d640608060624k67066ca9i90db6e6bcc7699fa@mail.gmail.com>
References:  <1414d640608060624k67066ca9i90db6e6bcc7699fa@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Ro BGCT wrote:
> Hello,
> 
> I am new to FreeBSD and am wondering if someone couldt tell me how to
> properly set /etc/hosts.  Right now it is:
> 
> 127.0.0.1 localhost localhost.my.domain
> 
> It says to replace "my.domain" with the domain name of my machine.  If
> I am using this box remotely and its hostname is "web1.server.net",
> would I make the change like:
> 
> 127.0.0.1 localhost web1.server.net
> 
> Or am I doing it wrong?

The instructions mean you should edit the line to read:

127.0.0.1	localhost localhost.server.net

Generally if you have a fully qualified domain name eg 'web1.server.net'
then 'web1' is frequently referred to as the 'host name' and 'server.net'
as the 'domain name'.  It's shorthand, and it's technically not correct[*]
but it's commonly understood.

Don't get too hung up over the /etc/hosts thing.  Arguably it's equally
correct to have just:

127.0.0.1	localhost

Any extras on that line won't make any noticeable difference at all on
most setups.

	Cheers,

	Matthew

[*] In the DNS *everything* (fully qualified or not) is a domain name,
whether it refers to a host, a web site, a whole network or whatever.

-- 
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE1fLy8Mjk52CukIwRCNTmAJ0YNH7YeyY2X9kxiJZioQvcMqH1RgCgjVeY
pSjvPwfjzW3YueMn17+OrZA=
=vMh3
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44D5F2EC.5090901>