Installing SUA Commands, Utilities and Libraries
Tech Note #2 in the "Interop Components in Windows" series
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 2003/R2, Windows Vista Ultimate and Enterprise and Windows Server 2008 (Beta). 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”:
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.
Let the selected features complete installing before rebooting.
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.
Now start the unzip and watch it run for a while:
…until it’s done.
The installer for the utilities and libraries will now start. For most people the beginning will have no surprises:
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.
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.
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).
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.
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.
The last window before the installation really starts is a basic summary of your choices:
Now the installation begins:
…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.
Now several thousand files have been installed:
And it’s time to reboot the system to allow special actions that will complete only with a reboot.
Once the installation is complete and you have logged back onto the system you can see the new entries in the Start menu:
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:
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 our
Interop Community forums.
Back to Learning Center