Subsystem for UNIX-based Applications in Windows 7
Noticed a thing called Subsystem for UNIX-based Applications in the Turn Windows features on and off dialog under Windows 7. Never seen it before, and it seems interesting. What exactly is it really? What is it for and what could I use it for?
Solution 1:
Previously known as SFU or Services for UNIX. It's an environment subsystem in Windows, providing full POSIX compliance and a great load of tools that normally come with UNIX systems.
As an environment subsystem this means it runs alongside the Windows API, directly on top of the kernel. So it's no more emulated than the native Windows API itself is and therefore performs much better than cygwin, for example.1
It is mainly intended for building and running UNIX applications directly on Windows so if your favourite UNIX program doesn't come with a Windows port you can try building it in SUA:
Windows Services for Unix and Subsystem for Unix-based Applications provide header files and libraries that make it easier to recompile or port Unix applications for use on Windows; they do not make Unix binaries compatible with Windows binaries. It is best thought of as a distinct Unix-like platform.
The current version of SFU contains:
- Over 350 Unix utilities such as vi, ksh, csh, ls, cat, awk, grep, kill, etc.
- GCC 3.3 compiler, includes and libraries (through an MS libc)
- A cc-like wrapper for Microsoft Visual Studio command-line C/C++ compiler
- GDB debugger
- NFS server and client
- A pcnfsd daemon
- X11 tools and libraries
- Tools for making NFS mount points appear as Windows shares, and vice-versa (gateway services)
- An NIS server capability linked with Active Directory (AD)
- Some Windows/Unix authentication information synchronization tools
SFU does not contain the following (but binaries are available for a separate installation):
- bash, OpenSSH, sudo, CVS, ClamAV, bzip2, gmake, curl, emacs, Apache, XView, Ruby, Tcl, Python
(Wikipedia)
Since SUA does not try to be Linux or BSD but just plain POSIX this may also mean that many programs that rely on platform-specific things may fail to build or run. Shell scripts that assume bash instead of sh or Linux-specific system calls come to mind. Very few programs nowadays are written that can run directly on any POSIX-compliant system. Also the version of gcc that is included is somewhat old which means it may not support your most recent C99+ goodness.
1 It is still subject to Windows-specific limitations, such as slow process startup time, so extreme forking will still be very slow, which is why you'll wait ages for many ./configure
scripts or some makefiles to execute.
Solution 2:
You can use BSD-style packages for installing/uninstalling software. You can access SUA via SSH if you have OpenSSH installed.