Reply
Old June 17th, 2004 Top | #1

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Thumbs up 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/....html?rev=1.20
Services for UNIX 3.5: http://www.microsoft.com/windows/sfu/
NetRyder is offline   Reply With Quote
Old June 17th, 2004 Top | #2

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

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
Attached Thumbnails
Services for UNIX 3.5-bash.png   Services for UNIX 3.5-fortunes.png   Services for UNIX 3.5-wget.png   Services for UNIX 3.5-ssh.png  
NetRyder is offline   Reply With Quote
Old June 17th, 2004 Top | #3

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

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
Attached Thumbnails
Services for UNIX 3.5-pico.png   Services for UNIX 3.5-gcc.png  
NetRyder is offline   Reply With Quote
Old June 17th, 2004 Top | #4

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

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)
NetRyder is offline   Reply With Quote
Old June 17th, 2004 Top | #5

OSNN Subscriber  
SPeedY_B's Avatar
I may actually be insane.
Joined: March 2002
Location: Midlands, England
Posts: 16,127
Reputation: 2877
Power: 292

Default

Very nice. Microsoft love UNIX really, they made IE for it back in the day
SPeedY_B is offline   Reply With Quote
Old June 17th, 2004 Top | #6
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,647
Reputation: 270
Power: 132

Default

Looks cool. I am downloading it now, see if I can make it work
Glaanieboy is offline   Reply With Quote
Old June 17th, 2004 Top | #7

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

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.
NetRyder is offline   Reply With Quote
Old June 17th, 2004 Top | #8

OSNN Subscriber
OSNN Folding Team  
Geffy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: United Kingdom
Posts: 7,854
Reputation: 1490
Power: 196

Default

heh, more and more stuff is being based on the *BSD OS's

cool stuff though


blogtumbloglastfmflickr#rubyonrails@twitter
"I could be replaced with a very small shell script"
Geffy is offline   Reply With Quote
Old June 18th, 2004 Top | #9
Xie

OSNN Subscriber
OSNN Folding Team  
Xie's Avatar
- geek -
Joined: September 2003
Location: NY, USA
Posts: 5,532
Reputation: 1408
Power: 154

Default

Originally Posted by NetRyder
* Works only with XP Pro (not Home), Win2000 and Server 2003
Hmm.. what does it need that Pro has over Home?

tehgeek | geeking out to tech | Chrome | IRC | *Parted Magic* | A+ Certified Professional
Xie is offline   Reply With Quote
Old June 18th, 2004 Top | #10

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

Originally Posted by Xie
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.)
NetRyder is offline   Reply With Quote
Old June 18th, 2004 Top | #11
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,647
Reputation: 270
Power: 132

Default

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>?
Glaanieboy is offline   Reply With Quote
Old June 18th, 2004 Top | #12

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

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.
NetRyder is offline   Reply With Quote
Old June 18th, 2004 Top | #13
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,647
Reputation: 270
Power: 132

Default

Ah, I see now. Sounds cool, definately worth an install. Thanks Net!
Glaanieboy is offline   Reply With Quote
Old June 18th, 2004 Top | #14

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

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.
NetRyder is offline   Reply With Quote
Old June 18th, 2004 Top | #15
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,647
Reputation: 270
Power: 132

Default

Thanks man!
Glaanieboy is offline   Reply With Quote
Old June 18th, 2004 Top | #16

OSNN Subscriber
OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,575
Reputation: 4260
Power: 280

Default

Glad to help. I thought it was really cool, so I just wanted to share the news with the rest of OSNN.
NetRyder is offline   Reply With Quote
Old June 18th, 2004 Top | #17
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,647
Reputation: 270
Power: 132

Default

Well, it's definately appreciated
Glaanieboy is offline   Reply With Quote
Old June 18th, 2004 Top | #18

OSNN Folding Team  
vern's Avatar
Dominus
Joined: March 2002
Location: Minnesota, USA
Posts: 1,584
Reputation: 660
Power: 125

Default

You're right. This does look really cool. Downloading it now. Thanks!
vern is offline   Reply With Quote
Old June 18th, 2004 Top | #19
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,647
Reputation: 270
Power: 132

Default

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!
Attached Thumbnails
Services for UNIX 3.5-sfu35install.png  
Glaanieboy is offline   Reply With Quote
Old June 18th, 2004 Top | #20
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,647
Reputation: 270
Power: 132

Default

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.
Glaanieboy is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unix Toolbox Dark Atheist Linux & BSD 5 March 23rd, 2008 1:21pm
Unix Error's ZeroHour Funny Farm 1 September 6th, 2004 11:39am
Some UNIX responses to some UNIX commands: Geffy Funny Farm 2 March 8th, 2004 11:25pm
Unix Hierarchy punkandacoke Linux & BSD 10 January 30th, 2004 5:15pm
which UNIX o/s ? SPeedY_B Linux & BSD 17 September 26th, 2002 2:05am