Home Interop News Interop Community [ Learning Center ] Resource Links Products & Services About Interop Systems

Learning Center Titles

Interop Tech Notes
Interop Components in Windows

Active Directory Identity Management

Windows PowerShell Screencasts

Introduction to PowerShell for those familiar with Unix-style shells

 

Installing SUA Commands, Utilities and Libraries


Tech Note #2 in the "Interop Components in Windows" seriesDownload Tech Note                    

By Rodney Ruddock (Interop Systems)

The Subsystem for Unix-based Applications (SUA) is part of the Windows OS distribution, so installing the subsystem requires no additional CD. It’s a component/feature of the base distribution of Windows Server 2008, Windows Server 2003 R2 and Windows Vista Ultimate and Enterprise. All you need to do is turn the features on. After this, you download the package from Microsoft that has the utilities and libraries.

Let’s go through the screen-by-screen images of what you need to do with helpful comments about each step.

Adding the SUA Components

First, from the Control Panel, select Programs and Features (on earlier Windows systems this was called Add/Remove Programs). From the Programs and Features window select “Turn Windows features on or off”:

Fig1-features-on-off.gif

Scroll through the list presented in the next window and check the box for “Subsystem for UNIX-based Applications.” Similarly, you can choose NFS client and other features before clicking OK to proceed.

Fig2-features-on-off2.gif

Let the selected features complete installing before rebooting.

Fig3_features-complete.gif

Installing the Utilities and Libraries

From the Start menu, under All Programs then under Subsystem for Unix-based Applications you can find the link that will automatically retrieve the commands and SDK from the Microsoft web site.

After you have downloaded the install package you need to unzip the file to a local disk. Usually it’s a good idea to place it somewhere that you’ll remember in case you want to run it again later to install more parts or to do a repair.

Fig4-Unzip.gif

Now start the unzip and watch it run for a while:

Fig5-Unzip2.gif

…until it’s done.

Fig6-Unzip3.gif

The installer for the utilities and libraries will now start. For most people the beginning will have no surprises:

Fig7-util-install.gif

Fig8-util-install2.gif

The first screen requiring a decision asks you if you want a standard installation or a custom installation. For the greatest amount of utility power the custom installation is recommended. This provides the largest number of installed utilities from this installation itself and the greatest operability with any third-party application you may install later. If you are a developer this path will provide you with the gcc compiler, libraries and manual pages.

Fig9-util-install3.gif

The custom installation choice will display a window with a tree-like set of choices. The first screen below shows the tree with the default choices. The “Base Utilities” are what most Unix users (BSD and Linux) expect for behavior. The “SVR-5 Utilities” are more rarely used and are suggested only for IT shops that have pre-existing scripts needing exit codes and error messages to match exactly. Otherwise the Base Utilities provide more functionality.

Fig10-select1.gif

For more interoperability, selecting the “GNU Utilities” is usually an easy choice. Adding the “GNU SDK” is also a good choice because it provides the shared libraries that many third-party applications require to run. Of course if you are a developer you will want both SDKs to have access to programs such as gcc and gdb as well as the ability to use the Microsoft Visual C compiler for creating binaries.

You may notice with the screen below that “Perl” has not been selected. If you need Perl for any of your scripts you can select this option as well. Since Perl is one of the Open Source tools that changes regularly you may want to install the version of Perl kept up to date at the Interop Community website instead. (It’s a free download).

Fig11-select2.gif

Because the GNU components have been selected you will get the next window as a warning. Before this scares you, don’t panic. Using the GNU utilities does not require you give up family secrets nor reveal your company’s private code. Being just a user does not put any additional responsibilities on you. As the warning window clearly states, the GPL and LGPL only place obligations on you if link with libraries that specifically have the GPL or LGPL license. If someone else does the linking and you just use the program then it’s the obligation of that someone else to follow the GPL or LGPL license.

Fig12-GNU-SDK.gif

The next window will seem a little unusual for most Unix users. It’s unusual because on the vast majority of Unix and Unix-like systems this set of options never arises. In fact, if these options are not actively chosen, then behavior issues and problems can happen when an application is run. As such, it’s best to always make sure that all of these options are checked so that programs run with the same behavior and correctness on Unix systems. If you do not choose these options then some programs will not be able to run correctly -- cron and friends are an example.

Fig13-security.gif

The last window before the installation really starts is a basic summary of your choices:

Fig14summary.gif

Now the installation begins:

Fig15-installing.gif

…and proceeds for quite a while. You can watch it if you want or go get a coffee because it will take some time and it requires no babysitting.

Fig15b-completing2.gif

Now several thousand files have been installed:

Fig16-completing.gif

And it’s time to reboot the system to allow special actions that will complete only with a reboot.

Fig17-restart.gif

Using SUA

Once the installation is complete and you have logged back onto the system you can see the new entries in the Start menu:

Fig18-start-menu.gif

You can start one of the shells from this menu to access and run all of the installed utilities. When the ksh or csh is started it will look like this:

Fig19-shells.gif

Summary

As you can see from the above descriptions the installation is not difficult. You now have a powerful environment with, in effect, two operating systems that can work together on the same machine.

Feel free to post your questions, comments or corrections in the SUA Community forums.

Download Tech Note

Back to Learning Center