Gentoo Archives: gentoo-user

From: Andrew Udvare <audvare@×××××.com>
To: Gentoo Users <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Why do we add the local host name to the 127.0.0.1 / ::1 entry in the /etc/hosts file?
Date: Mon, 22 Feb 2021 06:20:12
Message-Id: FCB2B217-A237-404B-866C-14338E545BD8@gmail.com
In Reply to: [gentoo-user] Why do we add the local host name to the 127.0.0.1 / ::1 entry in the /etc/hosts file? by Grant Taylor
1 > On 2021-02-21, at 17:23, Grant Taylor <gtaylor@×××××××××××××××××××××.net> wrote:
2 >
3 > Hi,
4 >
5 > I'm reading Kerberos - The Definitive Guide[1] and it makes the following comment:
6 >
7 >> And to make matters worse, some Unix systems map their own hostname to 127.0.0.1 (the loopback IP address).
8 >
9 > This makes me think that the local host name /shouldn't/ be included in the 127.0.0.1 (or ::1) entry in the /etc/hosts file.
10 >
11 > However, according to the Gentoo AMD64 Handbook[2], we are supposed to add the local host name to the 127.0.0.1 (and ::1) entry in the /etc/hosts file.
12 >
13 > Will someone please explain why the Gentoo AMD64 Handbook ~> Gentoo (at large) says to add the local host name to the 127.0.0.1 (or ::1) entry in the /etc/hosts file? What was the thought process behind that?
14
15 The thought process is the same as the guide you are reading. https://www.oreilly.com/library/view/kerberos-the-definitive/0596004036/ch04s03.html
16
17 It says in the last paragraph on this page that the /etc/hosts file should have the '127.0.0.1 localhost <not-FQDN>' (last part is definitely optional) and then that the next entry should have the outer IP address mapped to the FQDN.
18
19 --
20 Andrew