Date: Mon, 26 Jun 2023 13:36:58 +1000 From: Ian Smith <smithi@nimnet.asn.au> To: "Dan Mahoney (Ports)" <freebsd@gushi.org>,Steven Friedrich <freebsdlouisville@gmail.com> Cc: FreeBSD Questions Mailing List <freebsd-questions@freebsd.org> Subject: Re: Using /etc/hosts, not dns Message-ID: <8140CE7E-9AEF-450E-821C-86308F627A6F@nimnet.asn.au> In-Reply-To: <198956D1-6B93-4E35-AAC9-872AC146C538@gushi.org> References: <846f37ec-c0b3-0b1a-6294-1da6a9260777@Gmail.com> <198956D1-6B93-4E35-AAC9-872AC146C538@gushi.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 26 June 2023 12:47:15 pm AEST, "Dan Mahoney (Ports)" <freebsd@gushi.org> wrote: > > On Jun 25, 2023, at 1:51 PM, Steven Friedrich > <freebsdlouisville@gmail.com> wrote: > > > > I have been using /etc/hosts for decades to identify local hosts. > I don't want the complexity of dns for this simple scenario. > > > > I issue: host slimline > > Host slimline not found: 3(NXDOMAIN) > > > > Here's the /etc/hosts: [...] > > ::1 localhost localhost.Friedrich.org > > 127.0.0.1 localhost localhost.Friedrich.org > > 127.0.1.1 Slimline.Friedrich.org [...] > > 192.168.2.9 Slimline.Friedrich.org Slimline > > Why won't host lookup slimline in /etc/hosts? > Because you also have to put it in /etc/hosts as its shortname, as > the two “localhost” examples above should have suggested. And from the second entry it would appear to be case-sensitive, though hosts(5) makes no such mention? But then, is a second entry with a different IP address meaningful anyway? cheers, Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8140CE7E-9AEF-450E-821C-86308F627A6F>
