• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Services for UNIX 3.5

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...
Since 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.
Source: http://www.arslinux.com/viewcvs.cgi/linux.ars/volume-17.html?rev=1.20
Services for UNIX 3.5: http://www.microsoft.com/windows/sfu/
Here are some screenshots showing some of the capabilities:

Pic 1: Just a demo of some common *nix shell commands
Pic 2: The *BSD fortunes we know and love!
Pic 3: wget downloading the Mozilla installer
Pic 4: Using ssh natively to connect to a remote ssh server


Some more screenies, showing how it's possible to compile stuff using gcc.

Pic 1: pico, one of my favorite *nix CLI editors
Pic 2: Compiling "Hello World" using gcc, then running it :D


Some other info for those who are interested:

* Works only with XP Pro (not Home), Win2000 and Server 2003

* Based off OpenBSD, so it uses a similar package management system (pkg_add, pkg_info etc.)

* Lots of extra installable packages available here: http://www.interopsystems.com/tools/warehouse.htm

* Includes optional daemons like Apache, sshd etc. Also includes cron for scheduling.

* Integrates perfectly with Windows...you can use your favorite *nix commands like grep on Windows files stored on your NTFS partition, just like you would use any other cmd shell command.

* Much faster and integrates much better with the OS compared to cygwin. It feels like you're just using the regular cmd shell (except that it's now infinitely more powerful =P)
It comes with KSH (Korn Shell) and CSH by default. I personally prefer bash, so I had to install it from the Interop Systems site which I mentioned above. Just letting you know, in case you start looking for bash, but can't find it.

No worries...installation is really easy, and the package management system is great when you want to install extra tools. It even automatically downloads the dependency packages if you don't have them.
Xie said:
Hmm.. what does it need that Pro has over Home?
No idea, but here's the official blurb from the Microsoft page:

* Microsoft Windows Server™ 2003
* Windows XP Professional with Service Pack 1
* Windows 2000 Server with Service Pack 3 or later
* Windows 2000 Professional with Service Pack 3 or later

(Windows Services for UNIX 3.5 does not work with Microsoft Windows 95, Windows 98, Windows Millennium Edition, Windows XP Home Edition, Windows NT® Workstation, or Windows NT Server.)
I haven't installed it yet (I am at work now), but have I understand it correctly and can you use *nix commands in Windows natively after installing this package? I am especially interested in the use of SSH. Can you just open up cmd.exe and type in ssh <ip>?
It's not really cmd...what you're opening up is an Interix shell (either KSH, CSH, bash etc...whatever you prefer). The prompt opens up and looks/feels exactly like cmd though. When I said "natively," I meant that it integrates very well into Windows, and it's much faster than emulation-based stuff like cygwin. You can also use all the common *nix commands on any of your files.

And yes, as you could see in one of the screenshots above, you can just type in "ssh -l username hostname" at the prompt to connect to an SSH server.
Awesome. Let me know if you have any other questions before/after you install it. I've only used it for a couple of weeks, but I should be able to help anyone out with basic issues or questions.
If anyone wants any more screenshots, feel free to ask too.
I need help. Upon installing, it's asking this: (attachment). I use seperate useraccounts on Windows and FreeBSD, so usernames and passwords must be manually synchronized (by me). So I guess I have to choose the second and third option, but then it's asking me for the location of the NIS server. What's that? Please help me Net!


Never mind. I choose the second and fourth option and I copied the group and passwd files to a temp dir on my Windows drive and specified the paths. it's now installing... fingers crossed.

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member