APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Microsoft's Services For Unix

Microsoft's Services For Unix produce an acceptable emergency Unixish environment under Windows. That's the best I can give it.

Gosh, you'd never expect me to say something pleasant about a Windows machine, would you? Well, actually that's not entirely true: I've been known to grudgingly admit that while it isn't Unix, Windows XP Professional really isn't awful. In fact, if you can live without Unixy stuff at your beck and call, Windows XP is pretty good - there are even things I actually LIKE about it.

But there is that lack of Unix shells and commands, and for all its other charms, that alone makes XP (or any Windows operating system) unpalatable for me. Well, for $99.00 or less, Microsoft has a solution: Services For Unix, and while I still plan on keeping my iBook, if i HAD to use Windows (right after they finish killing off everything else, I guess), having this would surely make me a lot happier about it.

So here's a screenshot (XP running under Virtual PC, Korn Shell under Windows Services For Unix) showing a Korn shell open.

For me, that's 90% of the battle right there. Yes, I need vi and sort and a few other things (which are all there), but most of what I hate about Windows is the lack of a command line shell. Dos "command" doesn't even begin to cut it. In recent years I have grown to prefer bash, but there's nothing wrong with ksh: I can adjust to the minor differences. There's also an (ugh!) csh included for those poor folks who still think that abomination should even be allowed disk space on their machines.

This isn't just a set of Unixy tools for Windows; it's a real POSIX environment.


Did you notice that DISPLAY=aplxp:0:0 ?

If you looked at /usr/X11R5/bin, you'd find X programs, so you might think this is all ready to go. Well, not quite. You need X11 running, and that isn't included. Easy enough to get though: plenty available on the web.

Filesystem stuff

I was happily surprised to find that both hard and symbolic links are supported. Hard links do require a newer Windows file system; you can't do a hard link on FAT. But symbolic links work fine.

Filesystem semantics also may affect permissions. For example, a "chmod 755" on a FAT filesystem results in 777. You get warned when that sort of thing happens.

Speaking of permissions, setuid is supported too. It's not exactly like Unix, but it makes sense in Windows: there's no "root" user, but any Administrative user effectively has the same powers. Like any extended permission, you need a filesystem that can store the bits, and FAT of course cannot.

su and passwords

The "su" command does work regardless of filesystem, though you need to be using passwords for the users. As there is no root user, you wouldn't expect a simple "su" with no name to work, but in fact it switches you to the Administrator account. As that may have been renamed during XP installation, that can be a little confusing. For example, when I installed XP, the Administrator account became "tony". I also added three other users: one with admin privileges and a password, one limited account with a password, and one limited account without a password.

Logged in as any user, I can run ksh and then "su" to any other user. I'll be prompted for their password as you would expect. If I just use "su", I am prompted for a password and I can either use "tony"'s current password (because "tony" was the Administrator account when XP was installed) or the password that "tony" originally had: apparently that sticks with "Administrator". This behavior changes after the "tony" password is changed again: XP passwords are a little odd.

Although "tony" is an Administrator, "su tony" isn't quite the same as just "su". After "su", I can su to any other user without being prompted for their password, but as "su tony", I can't. Obviously just "su" is closer to a "root" concept.


Services for Unix includes both an NFS client and server. There's a PCNFS server too, though I cannot imagine why. I didn't experiment with any of the NFS tools; perhaps there is some good reason for PCNFS. There's also Gateway for NFS, which lets this machine become a bridge for normal SMB Windows clients to access NFS shares on some other computer. That could be helpful.

Mounted drives

Other drives are found under /dev/fs (/dev/fs/A is your floppy, D might be your CD, etc). You of course can make symbolic links to have these any place that's convenient for you. I managed to kill Ksh dead by cd'ing to my Virtual PC Z drive, which is really my Mac Desktop. I don't think it was entirely reasonable of me to think that would work, so I wasn't upset that it didn't.

NIS and Active Directory

There's another area I didn't bother with. I don't have Windows Domains of any kind and tend to avoid them - not that domains are a Bad Thing, just that they really aren't needed in the small business area I play in. But the docs claim that password synchronization across Windows/Unix machines is possible with this.


A telnet client (apparently no different than that built into XP) and a telnet server are include. No ssh though, which is too bad. Of course it isn't hard to find ssh clients for Windows, and it might even be possible to compile an sshd here.

Development Tools

This includes the GNU compilers etc. but these are not installed by default. I went back and installed these, but ran into problems: I'd type cc or make, and an error message would shortly come up telling me that I needed a compiler option set because it couldn't find CL.EXE. That's the Visual C++ compiler, which I don't have, so I couldn't do much here.

A product evangelist from Microsoft tells me:Interesting read. You can compile lots of code with SFU using gcc (not cc). Many tools that you'd want are available at http://www.interopsystems.com

I'm sure there will be problems with porting programs. Windows Services For Unix is a POSIX environment, not truly Unix. Some things, like path names, could be resolved with symbolic links. If you are using NTFS, the Interix environment takes care of case sensitivity, giving you Unix-like upper and lower case capability. But there may be differences in allowed file name characters that could trip you up, and little POSIX gotchas will surely prevent or at least make some ports very difficult.

But that's hardly unusual, is it? I'm not very interested in porting stuff anyway: if you need a full Unix environment, why would you run Windows? No, this is for interoperability and perhaps for people like me if we had to use Windows for some other reason. As such, it seems pretty good to me. Did I actually say that? Ayup: XP or Windows 2000 with the addition of Windows Services for Unix is pretty darn good.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Microsoft's Services For Unix


More Articles by

Find me on Google+

Click here to add your comments
- no registration needed!

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments

If you want a picture to show with your comment, go get a Gravatar
Kerio Samepage

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Jump to Comments

Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

I am a Kerio reseller. Articles here related to Kerio products reflect my honest opinion, but I do have an obvious interest in selling those products also.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

This post tagged:

       - Microsoft

       - Reviews

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!

book graphic unix and linux troubleshooting guide

Buy Kerio from a dealer who knows tech:
I sell and support

Kerio Connect Mail server, Control, Workspace and Operator licenses and subscription renewals