Loading ...
Sorry, an error occurred while loading the content.

55543Re: [linux] Re: Whatever happened to "Linux Magazine"?

Expand Messages
  • Herbert R Coburn
    Apr 3 7:03 AM
      Harold Williams wrote:
      > --- In linux@yahoogroups.com, "Thad Floryan" <thad@...> wrote:
      >> Now *THAT* (using /etc/hosts) is one of the most useful tips I've seen
      >> in ages! Many thanks!
      >> As a payback, assuming your partner is using, ahem, Windows, there has
      >> been an /etc/hosts equivalent on Windows OSs for at least 10 years now
      >> (Win2K, WinXP, Vista, Win7) per:
      >> C:\Windows\System32\drivers\etc\hosts
      >> Yes, "hosts" (without ".txt"). Its format is identical to Linux/UNIX
      >> for some POSIX compatibility.
      > At the risk of looking really dumb...Could someone explain what using /etc/hosts means?
      > If it is better than using Adblock plus in Firefox then I would like to implement it.
      > Thanks,
      > Harold

      At the risk of sounding even dumber, I forgot there was a time when I
      didn't know about /etc/hosts. Somewhere, I came to believe everyone
      was born with the knowledge. I looked and couldn't find it in the RUTE.
      So, it must be common knowledge, eh?

      The best explanation, IMHO, is at http://someonewhocares.org/hosts/

      This is my explanation.

      Computers speak in numbers. To get on the Internet, a computer has to
      have a unique name (a number) somewhere. People like me don't remember
      numbers, so we give computers names (words). For example, google.com
      is really under IPv4. When you tell your computer to
      connect to another computer, using a name, it looks in /etc/hosts to
      find the number. If the number is not there, it starts asking your
      DNS hosts (or your IP) for the number. They, in turn, do the same
      until eventually, someone returns a number.

      A long time ago, before the Dead Sea got the sniffles and I used to
      genuflect at the feet of greybeards, nobody had thought of using
      names to connect to another computer. Then somebody flipped a switch,
      a lightbulb came on inside their head and a hosts file was born.

      The first, so to speak, DNS. Soon, every computer had a list of URL's
      and their associated domain names. Well, until the greaybeards
      decided that updating hundreds of hosts files (even with a script)
      was too time-consuming. Then someone invented IPv4 with the idea that
      if a name wasn't in the hosts file, go ask until someone answered.

      Since your computer looks in the hosts file first, you can assign
      any number you want to any name you want. Now, points
      back to your computer (localhost). If I put a line in /etc/hosts
      that reads google.com

      whenever I try to connect to google.com, I will connect to myself
      instead of google.com.

      Adverts, tracking, spyware and other things I do not care for are
      usually just linked from the webpage I actually want to see. By
      associating the unwanted links to, when the page tells
      my computer to link to the unwanted, it looks in /etc/hosts, sees and obediently connects to itself and displays nothing.
      Voila! My personal ad-blocker!

    • Show all 25 messages in this topic