Unix/Linux to Windows: Migration, Porting & Using
by Rodney Ruddock
The Interix / SUA Solution
Interix, Service for Unix (SFU) and Subsystem for Unix-based Applications (SUA)
provide support for Unix or Linux applications being used on Windows systems.
Interix is the Unix-like subsystem that runs as a peer to the Windows subsystem on the Windows OS. Interix is a component of SFU and is the core of SUA.
The Subsystem for Unix-based Applications is included as part of the Windows
OS distribution in servers W2K3/R2, W2K8 and W2K8/R2 plus the workstation
releases Vista Ultimate and Vista Enterprise. Eariler releases of Windows
(XP and W2K3) can use SFU.
You may be working in a multiple OS environment or have been told that you
must move your applications to Windows from a Unix or Linux system. The
work involved porting or migrating source code and scripts is usually much
higher and will take longer than anticipated if the target is Win32. By using
Interix/SUA the effort is dramatically reduced because the target is "just
another Unix platform".
The advantages of using Interix/SUA over other solutions can be highlighted
with a few of the key factors that matter to users (summarized):
- Speed and performance
- Complete Unix environment
- Root powers for super-user
- Case-sensitive filesystem
- Unix/Posix signal support
- User database access integrated with Active Directory (AD)
- No reliance on .NET
- IP not tied to GPL
Many people are also comforted by the fact that it is Microsoft supported
around the world. This means people with support contracts can get help
through their regular channels. Support is also available through the
SUA Community forums here at this site as well.
Speed and Performance
Over many years the Performance of Interix has been improved even when it
was already ahead of the alternatives. After all, when do users not want
better performace?! A central part of the better performance is that
Interix/SUA is a subsystem. This closer relationship to the Windows OS
kernel means functionality and fidelity of Unix is not an
emulation. For example in the last performance testing I did the fork/exec
test was 5 times better for Interix/SUA. The write performace was 3.7 times
faster than one of the alternatives.
Complete Unix Environment
By having all of the standard shells, utilities and daemons available the
working environment for your aplications and your developers a migration
or porting is made much easier. Familiar ways of solving a problem can still
be done the same way giving the same result. The familiar environment also
means that there will not be new unexpected conditions for you, your programs
or scripts to handle.
Root-like Powers
One of the big advantages of a Unix environment is the power that "root" has.
This can help you solve many problems in a straight-forward manner. This
can range from small actions such as changing ownership on a file to
having an application 'setuid' to run as a particular user. On Interix/SUA
the local and domain Administrator are set as special accounts that have
the "root" powers without extending this power to the Win32 system. Executable
files can be 'setuid' just like on a Unix, BSD or Linux system.
Unix/Posix Signal Support
Full Unix/Poisx signal support is very important for the fidelity of
program behavior when migrating/porting source code. The delivery of all
signals in a correct manner is not always supported by alternative -- some
only work with a subset of signals. If you must migration Unix code to Win32
then very significant source code changes will be needed. Even after these
changes the behavior can no longer be identical to a Unix or Linux system.
Interix/SUA has all of the Unix/Posix signal support and the behavior
remains unchanged.
User database with AD
Interix/SUA accesses and sets user and group information through Active
Directory (AD). There is no cacheing to a "passwd" file that will be rapidly
out of date. When you work in an environment of 10,000 users it is impossible
to keep synchronizing special files to AD and maintain accuracy. By not
working with AD directly security difficulties may arise too.
No .NET
With no reliance on .NET Interix/SUA runs on all versions of Windows Server.
This means your scripts and programs work on all your server systems. It also
means a lower overhead for resources when applications are running.
IP (Intellectual Property) not tied to GPL
All of the Microsoft distributed libraries contain no GPL code. This means
any programs you migrate, port or develop will not be tied to the GPL.
Many people are aware, and many not, that if your application uses
a GPL library, such as readline, then your application must be placed
under the GPL if you distribute it. This can have consequences for
businesses, retailers and secure sites.
Of the 400 utilities that come with Interix/SUA only 3 or 4 are GNU based.
GNU based utilities, though under GPL, do not force users to use the GPL.
The same holds true for applications built with the 'gcc' suite of tools.
What's Available with Interix, SUA & Subsystem for Unix-based Applications (SUA)
A more detailed, stand-alone article is the proper way to treat this
part of the topic. But we'll give brief coverage to touch on the key points.
From Microsoft Interix/SUA comes with over 400 utilities and daemons that
are common to the Unix/Linux base of utilities. This imcludes the manual
pages, system configurations files, shells, scripts and tools. By adding
both SDK's support is added for using Microsoft's Visual C (MSVC) compiler
and for using GNU's gcc suite to build and debug programs. The SDK portion
includes the API manual pages as well as additional tools for building
and using shared libraries or DSO's.
The SUA Community web site has been providing additional software for
Interix and SUA for over 7 years now. The packages are available individually
(pick what you want) or as pre-built bundles (collections of packages). These
packages help augment what comes from Microsoft. This includes programs
that Unix/Linix frequently use such as OpenSSH for ssh & sftp, bash
as a shell, and Apache. For developers additional development libraries
are available too such as OpenSSL, glib, BIND and Qt. Updates to the
Microsoft utilities are available as well that have additional functionality
or enhanced options -- for example, long options. There is also a special
library, libport, to help when porting source code.
Another site that builds over the Microsoft base installation is the
Debian/Interix site. It uses the Debian versions of software (GNU based).
Interix / SUA in Use
Recently we held a survey of SUA Community users that over 560 people were
gracious enough to take the time to answer. This is the most comprehensive
survey to date of Interix, SFU and SUA users.
People and companies using Interix/SUA vary from individuals though
small businesses to very large corporations (100,000+ employees).
The types of uses vary from aircraft design, to POS, to print management,
Universities, product manufacturing, Governments (several), R&D and Big Oil
with the large users. In the middle to small range Consultants, churches
and R&D use Interix/SUA to "get the job done".
Many of these users are involved with HPC or similar applications where
speed is important (you want the answer in two days or eight days?).
These users benefit from the performance that Interix/SUA comes with plus
the updated, faster libm math library from SUA Community (it's free).
Conclusion
Interix/SUA is a strong alternative to use when you become involved with
a Unix/Linux migration porting or code use to Windows OS. If there are
specific questions you can ask in the SUA Community Forums or send me e-mail.