From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A25761382C5 for ; Sun, 21 Feb 2021 22:23:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB1A7E08F9; Sun, 21 Feb 2021 22:22:57 +0000 (UTC) Received: from tncsrv06.tnetconsulting.net (tncsrv06.tnetconsulting.net [IPv6:2600:3c00:e000:1e9::8849]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 861F6E089A for ; Sun, 21 Feb 2021 22:22:56 +0000 (UTC) Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id 11LMMs03006660 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 21 Feb 2021 16:22:56 -0600 From: Grant Taylor Subject: [gentoo-user] Why do we add the local host name to the 127.0.0.1 / ::1 entry in the /etc/hosts file? Organization: TNet Consulting To: Gentoo-Users Message-ID: <65049b74-842b-0211-bbfe-35607c279a75@spamtrap.tnetconsulting.net> Date: Sun, 21 Feb 2021 15:23:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Archives-Salt: b9928aea-0f2b-4504-81d2-1234b0665bb1 X-Archives-Hash: 2d3bdd1fd2a0440ac9f90a2c45bad156 Hi, I'm reading Kerberos - The Definitive Guide[1] and it makes the following comment: > And to make matters worse, some Unix systems map their own hostname > to 127.0.0.1 (the loopback IP address). 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. 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. 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? Incidentally, adding the local host name to the 127.0.0.1 (or ::1) entry in the /etc/hosts file causes "hostname -i" to return 127.0.0.1 instead of the IP address bound to the network interface. Thank you for any input you can provide. [1] Kerberos: The Definitive Guide (p. 109). O'Reilly Media. Kindle Edition. [2] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/System#The_hosts_file -- Grant. . . . unix || die