Date: Fri, 8 May 2009 05:58:24 +0200 From: Polytropon <freebsd@edvax.de> To: Daniel Underwood <djuatdelta@gmail.com> Cc: Andrew Gould <andrewlylegould@gmail.com>, freebsd-questions@freebsd.org Subject: Re: Xfce unable to lookup hostname Message-ID: <20090508055824.e4c425f5.freebsd@edvax.de> In-Reply-To: <b6c05a470905071726m55294b95v6bc946c40fc8824a@mail.gmail.com> References: <b6c05a470905070614h5a665f8ai15b03a192666b1b9@mail.gmail.com> <d356c5630905070634p32f22c1m5086061fbd1c8178@mail.gmail.com> <b6c05a470905071726m55294b95v6bc946c40fc8824a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 7 May 2009 20:26:40 -0400, Daniel Underwood <djuatdelta@gmail.com> wrote: > I added the line > > "127.0.0.1 bsdbox bsdbox.my.domain" > > and now it works perfectly, thanks! > > Question: what does the line I added tell my computer? I.e., what does > that line "do"? It simply associates the given hostname to that IP adress. This enables the system to resolve to this IP when the "literal" name is given. This resolution is one of the basic principles. Allthough the line works, it should be formed this way (or, it should be two lines): 127.0.0.1 <hostname>.<domain> <hostname> 127.0.0.1 <hostname>.<domain>. Note the dot. In your case, it would be 127.0.0.1 bsdbox.my.domain bsdbox 127.0.0.1 bsdbox.my.domain. This enables the following resolve patterns: bsdbox -----> 127.0.0.1 bsdbox.my.domain -----> 127.0.0.1 (You've got only this) The first one is the "alias" / "short name" of the host, its hostname. The second one is the "full name" including the hostname and the domainname. Refer to % man hosts for a much better explaination. :-) An addition: It's important that the system can resolve "localhost", too, because that's an important "reserved literal name". For example, the CUPS often addresses "localhost:631" (if I remember correctly, I use apsfilter). Furthermore, the system's mail subsystem relies on such settings. So you could add or complete: ::1 localhost 127.0.0.1 localhost It can cause big (stupid) problems if you miss them. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090508055824.e4c425f5.freebsd>