Why does Windows have a Unix-style etc/hosts? [closed]
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?
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