NetRyder
Tech Junkie
- Joined
- 19 Apr 2002
- Messages
- 13,256
Let me start off by saying...wow!
This has got to be one of Microsoft's hidden gems. It's been around for a while, but I decided to give it a try only a couple of weeks ago.
Read on...
Services for UNIX 3.5: http://www.microsoft.com/windows/sfu/
This has got to be one of Microsoft's hidden gems. It's been around for a while, but I decided to give it a try only a couple of weeks ago.
Read on...
Source: http://www.arslinux.com/viewcvs.cgi/linux.ars/volume-17.html?rev=1.20Since its inception, one of the features of Windows NT has been its POSIX layer. This is a small set of libraries implementing the core parts of the POSIX specification—POSIX being the formal specification describing the APIs, utilities, and shell that a system must provide to be called UNIX. In the olden days, the POSIX layer was a rather sorry affair; the basic APIs were there, but not a lot else; next to no-one used them.
To bolster the weak POSIX layer capabilities, MS provided something called Services For UNIX (SFU). This included a host of extra functionality; NFS client and server support, password synchronization, a telnet daemon (which back in the NT 4 days was more useful than it is today, as a telnet daemon is now a standard part of Windows 2000 and 2003), and a ksh-like shell licensed from MKS. In the olden days, these parts for the most part ignored the POSIX layer too.
But a company called Interix didn't ignore the POSIX layer. Instead, they wrote a replacement for it. This replacement was far more fully-featured than the default layer; it came with ports of many GNU tools (perhaps most importantly, gcc), and used pd-ksh. Interix was later acquired by MS, and the Interix POSIX layer, shell, and utilities became a part of SFU as of version 3.
Within the next week or two, SFU 3.5 will be released (We've heard variously the 15th and 22nd of January; we will see). SFU 3.5 is of particular interest for a few reasons. The simplest reason is its price; traditionally SFU cost money, about $99, but as of version 3.5 it will now be gratis.
For those working in mixed environments, the NFS and NIS functionality are perhaps most useful; NFS becomes integrated into Windows, allowing one to browse NFS shares in Network Neighbourhood in the way that Windows users expect. NFS in 3.5 appears to be both faster and more reliable than previous versions, and could probably be used as an effective alternative to SMB/CIFS for mixed-environment filesharing.
As for making things more Unixy, SFU 3.5 builds on the work of 3.0. Again, it provides a complete replacement for the NT POSIX subsystem. It offers considerably more APIs than its predecessor -- of particular interest is that SFU 3.5 supports pthreads and comes with a fairly recent (3.x) version of gcc, so one can now compile a broader selection of software -- or you can download a small selection of pre-compiled tools from Interop Systems.
For the NFS client and server facilities SFU 3.5 is almost certainly the best option for Windows -- that it significantly undercuts its competitors is reason enough for that. But as a shell, things get a bit more interesting. SFU isn't the only way to get a *nix-style shell on Windows. Cygwin and UWIN are two more *nix-style shells for Windows, and I'm sure there are others that I'm forgetting.
SFU, Cygwin, and UWIN all provide a *nix-like environment for Windows. SFU is set apart from the others in that it's a genuine NT subsystem. Cygwin and UWIN are both Win32 libraries, sitting above (and written using) Win32. SFU isn't; it sits alongside Win32 rather than on top of it. This allows SFU to avoid issues that the Cygwin developers have had to address regarding, for instance, case sensitivity. Cygwin is just a Win32 program, and works on Windows 9x; as such, it isn't case-sensitive (there is or was some way of turning on case-sensitivity, but it isn't the default and seems to be little talked about), because on Windows 9x it can't be. NT, on the other hand, is case-sensitive (though the Win32 subsystem that isn't), and as a result, so is SFU. One has to be a little careful with case sensitivity nonetheless, as Win32 programs still don't expect it, but it's there all the same.
Another difference -- which will probably be particularly pleasing to the unix diehards -- is that SFU uses no .exe file extensions. Both Cygwin and UWIN perform internal translation so that if one runs, for instance, "ls" then what actually gets run is "ls.exe". In SFU there's no extension -- ls is called ls. Executability is determined the Unix way; by the permissions on the file. A +x file is executable, anything else ain't. There are differences in the fileystem layouts; all the environments emulate a Unix-style single-rooted filesystem; for example, Cygwin mounts its own directory as "/" and uses its /cygdrive mountpoint to access drive letters. SFU uses double slash-preceded letters for drives (for example //C/Windows would be equivalent to C:\Windows). And there are lots of other little changes, like the handling of /proc and other special places (SFU's is vanilla, Cygwin's has some of the extra things that one finds on Linux).
Which environment one prefers is going to depend on which tools and features one wants, and which filesystem layout one prefers. I find myself increasingly using the SFU shell instead of Cygwin, because it feels (in some hard to nail down sense) more "correct". It doesn't have the filename munging, case insensitivity, or file extensions. It integrates better with Windows (for example, its 'ps' can tell me more information about more processes), so is more useful for managing Windows things, and it integrates better with other parts of SFU, such as NFS. Cygwin's killer feature is its X Server, but that's all I find myself using it for. It's also increasingly supported as a target for much open source software, which currently Interix isn't. I hope that this will change in the future, especially as SFU should become far more widespread now.
All in all, SFU 3.5 represents a pretty compelling package for the Windows user. Making it free is an interesting step from MS. They're doing it to promote migration from Unix to Windows -- and certainly, the improved POSIX support and GNU toolchain will be useful in that regard -- but one can't help but feel that in so doing, they're also helping people migrate away from Windows -- NFS and NIS support mean that it'll play nicer in mixed environments. There is also some talk of a future version being actually bundled with Windows -- this appears to have been the purpose of the license MS bought from SCO. Whichever way people migrate, SFU 3.5 is a welcome update, and highly recommended to anyone wanting to make their Windows machine more Unixy.
Services for UNIX 3.5: http://www.microsoft.com/windows/sfu/