Confused on how to properly set /etc/hosts
Matthew Seaman
m.seaman at infracaninophile.co.uk
Sun Aug 6 13:48:03 UTC 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060806/6877bc8a/signature.pgp
More information about the freebsd-questions
mailing list