Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #269536
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Address 127.0.1.1 |
| Date | 2024-05-24 19:40 +0200 |
| Message-ID | <IHH3A-fxQB-13@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <IHEp3-fwe2-9@gated-at.bofh.it> <IHES5-fwCW-3@gated-at.bofh.it> <IHF1L-fwGk-3@gated-at.bofh.it> <IHFl7-fwN0-3@gated-at.bofh.it> <IHGhb-fxli-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, May 24, 2024 at 05:22:13PM +0100, Joe wrote: > Long ago, lo used to be just 127.0.0.1, which is what most people would > try to ping to check localhost, and what appeared in /etc/hosts. There > is some subtle reason, which I used to know but have now long forgotten, > why Debian started using 127.0.1.1 in /etc/hosts instead. It's not "instead". It's "in addition". hobbit:~$ head -n2 /etc/hosts 127.0.0.1 localhost 127.0.1.1 hobbit.wooledge.org hobbit The first line is traditional. Exactly what it looks like. The second line ensures that my hostname will always resolve to a working IP address. Lots of programs need that. Some of the most common reasons back in the old days were X clients that had been told to use "myhostname:0" as their $DISPLAY. If "myhostname" didn't resolve to a working IP address (one which could contact the X server), then X client programs wouldn't work. A lot has changed since then, but the basic principle remains the same. Some programs are going to expect to be able to open a network connection to whatever IP address the system's hostname resolves to. 127.0.1.1 serves that purpose, without stepping on 127.0.0.1 which has its own legacy role to fulfill.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Address 127.0.1.1 Paul M Foster <paulf@quillandmouse.com> - 2024-05-24 14:10 +0200
Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 14:20 +0200
Re: Address 127.0.1.1 Dan Ritter <dsr@randomstring.org> - 2024-05-24 14:40 +0200
Re: Address 127.0.1.1 Marco Moock <mm@dorfdsl.de> - 2024-05-24 16:50 +0200
Re: Address 127.0.1.1 <tomas@tuxteam.de> - 2024-05-24 17:20 +0200
Re: Address 127.0.1.1 <tomas@tuxteam.de> - 2024-05-24 17:30 +0200
Re: Address 127.0.1.1 Marco Moock <mm@dorfdsl.de> - 2024-05-24 17:30 +0200
Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 17:50 +0200
Re: Address 127.0.1.1 Paul M Foster <paulf@quillandmouse.com> - 2024-05-24 18:20 +0200
Re: Address 127.0.1.1 Joe <joe@jretrading.com> - 2024-05-24 18:50 +0200
Re: Address 127.0.1.1 Paul M Foster <paulf@quillandmouse.com> - 2024-05-24 19:20 +0200
Re: Address 127.0.1.1 Andy Smith <andy@strugglers.net> - 2024-05-24 23:40 +0200
Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 19:40 +0200
Re: Address 127.0.1.1 Joe <joe@jretrading.com> - 2024-05-24 18:50 +0200
Re: Address 127.0.1.1 <tomas@tuxteam.de> - 2024-05-24 19:20 +0200
Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 19:50 +0200
Re: Address 127.0.1.1 Jeffrey Walton <noloader@gmail.com> - 2024-05-24 20:00 +0200
Re: Address 127.0.1.1 Greg Wooledge <greg@wooledge.org> - 2024-05-24 20:30 +0200
Re: Address 127.0.1.1 debian-user@howorth.org.uk - 2024-05-24 23:30 +0200
Re: Address 127.0.1.1 Jeffrey Walton <noloader@gmail.com> - 2024-05-24 19:50 +0200
Re: Address 127.0.1.1 David Wright <deblis@lionunicorn.co.uk> - 2024-05-24 19:50 +0200
csiph-web