127.0.1.1 in /etc/hosts
Tom H
tomh0665 at gmail.com
Fri Dec 1 10:05:38 UTC 2017
On Thu, Nov 30, 2017 at 6:11 AM, Colin Watson <cjwatson at ubuntu.com> wrote:
> On Wed, Nov 29, 2017 at 04:11:58PM -0500, Tom H wrote:
>>
>> "127.0.0.1" should resolve to "localhost" and "localhost" should
>> resolve to "127.0.0.1". Debian's been using "127.0.1.1" since 2005 for
>> the system's hostname.
>>
>> In 2005, AFAIR, Thomas Hood proposed an nss module that would resolve
>> the system's hostname to 127.0.1.1 so as not to have an entry for it
>> in "/etc/hosts" (which is exactly what Lennart's "nss-myhostname" -
>> called "libnss-myhostname" in Debian and Ubuntu - does, but with
>> 127.0.0.2). There was pushback so he proposed adding a "127.0.1.1
>> system_hostname" line to "/etc/hosts". This was accepted and it became
>> the Debian and Ubuntu default.
>
> Indeed. Minor correction: this is only the case if the installer hasn't
> been told that the system has a static IP address.
Thanks and sorry. I assumed a dhcp setup :(
More information about the ubuntu-users
mailing list