Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why does Windows have %systemroot%/system32/drivers/etc/hosts, as opposed to something more "Windowsy"? It feels like a relic from the BSD derivative Windows got some bits from eons ago. Is this purely a compatibility thing?

share|improve this question

closed as not constructive by Linker3000, 8088, random Nov 9 '11 at 18:08

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Unix (and Linux) is a great system that works very well. Implementing things like /etc/hosts is a good idea because it's beautifully simple and extremely effective. Perhaps a developer at Microsoft decided to copy this concept instead of re-inventing the wheel. –  Randolf Richardson Nov 8 '11 at 23:34

1 Answer 1

up vote 5 down vote accepted

Yes it arrived with Microsoft's adoption of TCP/IP based on the BSD sockets API as implemented according to the WinSock spec.

Winsock follows the Windows Open System Architecture (WOSA) model; it defines a standard service provider interface (SPI) between the application programming interface (API), with its exported functions and the protocol stacks. It uses the sockets paradigm that was first popularized by Berkeley Software Distribution (BSD) UNIX. It was later adapted for Windows in Windows Sockets 1.1

http://msdn.microsoft.com/en-us/library/windows/desktop/ms740673(v=vs.85).aspx

Compatible as in

A local text file in the same format as the 4.3 Berkeley Software Distribution (BSD) UNIX \etc\hosts file.

http://technet.microsoft.com/en-us/library/bb727005.aspx


One version of the story is here

share|improve this answer
    
That's far more reasonable than expected. Thanks :) –  Malediction Nov 8 '11 at 23:45
1  
@David: The /etc/hosts format is UNIX-style; a simple list of "address hostname [aliases]" entries. The one described in RFC 952 is way more complex. –  grawity Nov 9 '11 at 0:47
1  
And now I was expecting an Old New Thing post I haven't read yet. . . –  surfasb Nov 9 '11 at 3:04
    
@surfasb: Yeah Chen's blog is always worth reading. However " 'A question about the windows networking system...' - I have no idea.", he wasn't involved in everything. –  RedGrittyBrick Nov 9 '11 at 9:54
1  
@RedGrittyBrick: As always, we forget that he's still human, and you know, didn't write Windows himself. –  surfasb Nov 9 '11 at 17:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.