|
The following FAQ's relate to Microsoft's Subsystem for Unix-based
Applications, Interix, Services for Unix (SFU), and Microsoft's NFS Server
& Client.
These questions and issues have come up in the SUA Community Forum and in
e-mails sent to us. We hope you find them useful. If these answers don't
do it for you, feel free to ask for clarification in the Forum.
(Please quote the FAQ number in your post).
Special thanks to Rodney Ruddock for compiling this list of
frequent questions and common issues.
Read First
The questions and answers apply to all versions of Interix, Subsystem for
Unix-based Applications (SUA), Services for Unix (SFU) and NFS unless the
question/answer specifically details it is only about a certain version.
If you are unsure where to start with the FAQ then start with entry 1.00
because it's good general information to start with.
FAQ Meta Index
- Installation FAQ's for Subsystem for Unix-based Applications, Interix and SFU
Including VIDEO links!
- User FAQ's for Subsystem for Unix-based Applications, Interix and SFU
- Administrative FAQ's for Subsystem for Unix-based Applications, Interix and SFU
- Developer FAQ's for Subsystem for Unix-based Applications, Interix and SFU
- Windows Interop FAQs
- NFS Server and NFS Client FAQ's for Microsoft Windows
- Software Availablility Questions About Interix, SUA & SFU
- Other Questions
- MYTHS and Incorrect Information
On-line Manual Pages
You may also be interesting in reading our
on-line manual pages (aka man pages).
FAQ Index
Installation FAQs
1.00 - Version/Release Information for Interix, SUA, SFU
1.01 - SUA & SFU (Interix) installation suggestions
1.01a - Where is the download for Windows 7 & Server 2008 R2 (SUA/Interix 6.1) for the Utilities and SDK?
1.01b - Are there more detailed or VIDEO installation instructions for the Subsystem for Unix-based Applications (SUA)?
1.01b2 - Is there a command line to install Subsystem for Unix-based Applications?
1.01c - Is there a detailed overview of the Subsystem for Unix-based Applications and Interix ?
1.01d - Which versions of Windows will Interix, Subsystem for Unix-based Applications (SUA) and Services for Unix (SFU) run on?
1.01d - Is Windows XP 64-bit supported for Interix/SFU?
1.02 - Cannot connect to Interix subsystem, Interix will not start
1.02 - Terminal (ksh or csh) does not respond
1.03 - Setuid at install or after?
1.04 - Installing /Tools packages
1.04b - I'm not allow FTP access. Are the Bundles available by HTTP?
1.05 - I tried to install package XXXX and it failed
1.06 - Can't find package "env_XXX-bin.tgz" when installing
another package
1.07 - I'm behind a firewall / I use an FTP Proxy
1.08 - Can I save the packages locally and install them?
1.09 - I'm not allowed to use FTP
1.10 - How can I avoid always typing "ftp://ftp.interopsystems.com/pkgs/3.5"
1.11 - Is there a GUI I can use to manage application packages
instead of the shell command line?
1.12 - Don't use Windows Explorer (Win32 File
Explorer) for file permissions
1.13 - How do I turn filesystem Case Sensitivity ON after installation?
1.14 - Are there updates or Hotfixes available ?
1.15 - How can I tell which version of the subsystem am I running?
1.16 - How do I tell the release or version of Interix (SFU or SUA) I'm running?
User FAQs
2.01 - Pathnames with spaces
2.02 - Can I run a BSD/Linux/AIX/etc. binary using Interix?
2.03 - Xterm "-e" not working
2.04 - Running X11 programs
2.05 - What is the "interix" terminal?
2.06 - The "interix" terminal type is not recognized when I
telnet.
2.07 - I'm running on a new machine and my program core
dumps (segmentation violation), but it's fine on other machines.
2.07a - Bash dumps core or does SEGV when I try to use it.
2.08 - What is this file ".netrc" about?
2.09 - What are the application packages that have been updated
most recently or are new?
2.10 - How do I set tab completion with 'ksh'?
2.11 - Can I access files greater than 2G?
2.12 - How can I get 'ftp' to do proxy?
2.13 - Cpio isn't handling symbolic links
2.14 - On non-English systems csh/tcsh scripts
are crashing
2.15 - Need an update of utility/library
Administrative FAQs
3.01 - Running a command without a windows opening
3.02 - What is "$$psxjunk"?
3.03 - How do I change my default shell?
3.04 - Setting the principal domain
3.05 - What shells are available with SFU/Interix?
3.06 - Using Clearcase with Interix shows some problems.
3.07 - I can't find the /etc/passwd and/or the /etc/group file.
What's up?
3.08 - How can I verify what a user's home directory is in the
user database?
3.09 - How do I properly set a user's home directory?
3.10 - I'm running Windows 2000 and just installed SP1 and
Interix won't run now.
3.11 - Administrator doing "su <user>" can't
access network drive.
3.12 - Setuid Program(s) not working
3.13 - Which Registry Entries are important?
3.14 - Which Registry Entries can I Configure or Fix?
3.15 - How can I turn the Firewall off?
3.16 - Is S/KEY (or skey) available for Interix/SUA?
3.17 - How do I login using S/Key ?
3.18 - Why do I want to use S/Key with an SSH/OpenSSH connection?
Building / Developer FAQs
4.01 - Debugging Interix processes with gdb and WinDbg
4.02 - Using GNU's configure
4.03 - Is there a GUI for looking at manual (man) pages?
4.04 - Does Interix/SUA/SFU come with a compiler?
4.05 - I can't find the 'gcc', 'cc' and/or 'c89' compilers with my SFU installation. Where are they?
4.05a - 'c89' and 'cc': Explanation of these utilities?
4.05b - 'c89' and 'cc': update available?
4.05c - Can I build Win32 or Win32 binaries?
4.06 - I have a program that verifies a user's password to the content of /etc/passwd. How do I port this to Interix?
4.07 - Where is the GNU source code for what ships with SFU?
4.08 - Can I create a software package myself like in the /Tools
Warehouse?
4.09 - When linking ""__res_state"" is not found
4.10 - Which C compilers are available?
4.11 - Which C++ can be used?
4.12 - Which FORTRAN compilers are available?
4.13 - Can gcc generate 64-bit binaries?
4.14 - How can I generate 64-bit binaries?
4.15 - Getting 32-bit c89/cc binaries on 64-bit machine
4.16 - Missing 64-bit libraries ?
4.17 - Is X11R7 available ?
4.18 - Any comments about HPC on Subsystem for Unix-based Applications ?
4.19 - How do I tell if a program uses shared libraries?
4.20 - How do I list the shared libraries a program uses?
4.21 - My shared library cannot be found for loading... help?
4.22 - Are 64-bit shared libraries available?
4.23 - On my 64-bit Interix/SUA where are the 32-bit shared libraries?
4.24 - I built a program and when I run it I get "__pctype_used" undefined
4.25 - Is the poll() API available?
4.25 - The poll() API doesn't seem to be working?
4.26 - Can I speed-up group lookups?
4.26 - The getgrnam and getgrgid function take a long time
4.27 - How can I do "inline" functions with c89/cc/MSVC ?
Windows Interop FAQs
5.01 - Accessing Win32 APIs
5.02 - Running Win32 programs from Interix “on the glass”
5.03 - Running Win32 programs from Interix "via telent/rlogin/ssh”
or xterm
5.04 - Creating a desktop shortcut
5.05 - Junction points
Microsoft NFS Server & Client FAQ's
6.00 - Is there a white paper on NFS I can read?
6.01 - Which version of NFS is supported?
6.02 - Is NFS version 4 supporting yet?
6.03 - Does Microsoft NFS work with Unix, Linux, AIX, HP/UX, Sun Solaris, etc.?
6.04 - Windows File Explorer isn't refreshing my view of an NFS share.
6.05 - What is Gateway for NFS?
6.06 - Is Gateway for NFS still available?
6.07 - Which socket ports does NFS Client use?
6.08 - What is UNM (User Name Mapping) ?
6.09 - Should I implement UNM (user Name Mapping) or RFC2307 with AD ?
6.10 - What if I don't implement either UNM or RFC2307/AD ?
Software Availablility Questions About Interix, SUA & SFU
7.01 - Is a up-to-date 'sendmail' available?
7.01b - Can 'sendmail' be used fully on SUA / Interix?
7.02 - Is there is ssh / sftp / scp client available ?
7.02b - Can ssh do passwordless (aka public key exchange) login ?
7.03 - Does this OpenSSH work with SUN's Grid Engine?
7.04 - Is the bash and/or zsh shells available
7.05 - Is gzip, gzgrep, zgrep, zless, et al available?
7.06 - I'm try to use cc or c89 but it's giving errors and warnings
7.07 - How do I get ls to do colours/colors ?
Other Questions
8.01 - Are monkeys and chimpanzees the same thing?
8.02 - I'm an ISV using Interix and/or SUA. Can I post in the Forum?
8.03 - Can I post a commercial message in the Forum?
Installation FAQs for Subsystem for Unix-based Applications, Interix and SFU
1.00 - Version/Release Information for Interix, SUA, SFU
Microsoft Windows currently is available for installation on 32-bit and
64-bit CPU systems. The 32-bit Windows can be installed on the 32-bit and
the 64-bit CPU systems (but the 32-bit runs as 32-bit). When you install
Interix/SUA/SFU you must match the Windows bit size with the bit size
of the Utilities and SDK. There are a several different chip manufacturers
but only a few installation package variations of the Utilities and SDK
are needed.
Interix, SUA, SFU Table
| Release | Windows OS | 32-bit | 64-bit † * | Notes |
| Interix/SUA 6.1 | Win7, 2008/R2 | yes | yes | Win7 Ultimate & Enterprise |
| Interix/SUA 6.0 | Vista, 2008 | yes | yes | Vista Ultimate & Enterprise |
| Interix/SUA 5.2 | 2003/R2 | yes | yes | Don't confuse 2003/R2 with 2003! |
| Interix/SFU 3.5 ‡ | 2000, XP*, 2003 | yes | NO | |
† - 64-bit includes all 64-bit CPU's Windows supports*.
‡ - Distribution of SFU 3.5 ends in 2009 with standard support ending in 2011 and extended support ending in 2014.
* - Windows XP 64-bit is not supported (see entry 1.01c below).
Utility & SDK Table
| Release | Utilities Package Name: "x86" (32-bit) | Utilities Package Name: "AMD64" (64-bit) † | Utilities Package Name: "IA64" |
| Interix/SUA 6.1 | All Intel, AMD, etc, 32-bit | Intel and AMD 64 bit except IA64 † | Intel IA64 only |
| Interix/SUA 6.0 | All Intel, AMD, etc, 32-bit | Intel and AMD 64 bit except IA64 † | Intel IA64 only |
| Interix/SUA 5.2 | All Intel, AMD, etc, 32-bit | Intel and AMD 64 bit except IA64 † | Intel IA64 only |
| Interix/SFU 3.5 | All Intel, AMD, etc, 32-bit | N/A | N/A |
| Interix/SFU 3.0 | All Intel, AMD, etc, 32-bit | N/A | N/A |
† - This includes "authenticamd", "genuineintel", and
"EMT64". These are all the generic "x64" chips (sometimes referred to as
"x86_64" in configure scripts).
1.01 - SUA & SFU 3.5 Utilities & SDK Installation Suggestions
When you are installing Subsystem for Unix-based Applications Utilities or
Services for UNIX 3.5 we suggest that
you select the "Custom" install choice.
When presented with the additional selections to install choose the GNU
Utilities. This will add a couple more useful utilities, but more importantly
it will installed the shared library tools. This is helpful to get some
of the packages in the "Tool Warehouse" running.
If you are a developer you should also choose to
install both the Interix SDK and GNU SDK. This will also load the shared
library runtime tools.
When the appropriate box appears asking if you would like "Case
Sensitive Pathnames" active and "Setuid Binaries" active select
both boxes. By selecting both boxes you will get the best UNIX
behavior.
Do not install SFU 3.5 under an absolute junction point; you may
install under a relative junction point, but we recommend you
avoid this. For SUA, don't worry, it is installed in a good location
automatically and you can't change it to a bad location.
If you are installing on Windows 2003 you should use the SFU 3.5
download from November, 2004 because it has a fix.
If you have SP1 for 2003 you will need to obtain Hotfix Q899522
from MS Support/PSS (it's free, but you still have to get it
from PSS). Q899522 corrects a system problem with shell scripts
executing/completing. Also refer to notes below about DEP."
1.01a - Where is the download for Windows 7 & Server 2008 R2 (SUA/Interix 6.1) for the Utilities and SDK?
For Windows 7 and Windows Server 2008/R2 (aka SUA/Interix 6.1)
the http link to the download location for the Utilities and SDK is
correctly located at:
http://go.microsoft.com/fwlink/?LinkId=139521
An incorrect link/download is given in the menu. The http link above is the
short link. It will take you to the web page at Microsoft named "Utilities and SDK for Subsystem for UNIX-based Applications in Microsoft Window 7 and WIndows Server 2008 R2" (yup, that's a mouthful of a title).
1.01b - Are there more detailed or VIDEO installation instructions for the Subsystem for Unix-based Applications (SUA)?
Yes there are three excellent installation references:
a white paper and two videos:
1.01b-2 Is there a command line to install Subsystem for Unix-based Applications?
To install just the subsystem plus the Start Menu entries you can run the command:
servermanagercmd -install Subsystem-Unix-Apps
or
start /w pkgmgr /l:suain.etw /iu:SUA
Please note that this does not install the Utilities & SDK. You still need
to do that separately as the download and install. You can install the
Utilieis & SDK from the command line too. The following example will
install everything except Perl (you should install the update from the Tool
Warehouse because it is more upo-to-date and has more functionality) and
the System V utilities (most people don't want to install them).
A caveat is that SetUid and case-sensitive registry
entries may not get set correctly (as with the GUI).
msiexec /i ADDLOCAL=BaseUtils,BaseSDK,GNUUTILS,GNUSDK,VSAddin /L*v C:\my_sua_log.log
1.01c - Is there a detailed overview of the Subsystem for Unix-based Applications and Interix ?
A very large breadth-wise paper is in our
SUA Articles section named
Subsystem for Unix-based Applications (SUA): Orientation for Users, Administrators and Developers. A long title but it originally covered 41 printed pages!
You will also want to watch the video
SUA After / Post Installation VIDEO
to provide a good overview too.
1.01d - Which versions of Windows will Interix, Subsystem for Unix-based Applications (SUA) and Services for Unix (SFU) run on?
1.01d - Is Windows XP 64-bit supported for Interix/SFU ?
There are a number of different version releases of Interix, SUA and SFU.
Some of these versions are fairly old now, so this is not an exhaustive list.
However, this list covers the versions that are currently supported.
- Interix/SFU 3.0: NT 4.0, Windows 2000, Windows XP
- Interix/SFU 3.5: Windows 2000, Windows 2000-SP3, Windows 2000-SP4, Server 2003 (not R2), Windows XP -- 32 bit systems only
- Interix/SUA 5.2: Windows Server 2003/R2 (32 and 64 bit)
- Interix/SUA 6.0: Windows Vista (Ultimate & Enterprise editions), Server 2008 -- 32 and 64 bit systems
- Interix/SUA 6.1: Windows 7 (Ultimate & Enterprise Editions) and Server 2008/R2 -- 32 & 64 bit systems
Older versions of Interix will run on older versions of Windows/NT. If you are
using Interix 3.0 we recommend you update to Interix/SFU 3.5 since it is a free
upgrade. If you are running Interix 2.2 on the older DEC Alpha hardware you
will have to stay at Interix 2.2.
Windows XP 64-bit is not supported for Interix/SFU. Windows XP 64-bit was
a working concept; not everything was implemented in the kernel for
supporting the Interix subsystem. For 64-bit support you will have to use
one of the systems listed above.
1.02 - Cannot connect to Interix/SUA subsystem, Interix/SUA will not start
1.02 - Terminal (ksh or csh) does not respond
After an upgrade to Interix 3.5 or with a new installation you
encounter a problem with Interix starting. The most common
reason is that a security script has been run at some point that
disallows any subsystem from starting other than the Win32
subsystem. This can be corrected by resetting the registry key:
HKLM->SYSTEM->CurrentControlSet\Control\Session Manager\SubSystems\Posix
to "%SystemRoot%\system32\psxss.exe"
and the registry key
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Optional
to "Posix".
Then reboot the system. If you are on Windows
2003 refer to the note in FAQ 1.01 also.
Note: Some systems
have disabled the subsystem in their Security Policy. It
doesn't happen often, but can be worth checking if the
suggestions above don't resolve the problem. Under "Control
Panel" -> "Administrative Tools" ->"Local Security Policy" ->
"Local Policies" -> Security Options" -> "System Settings:
Optional Subsystems" make sure that "Posix" is listed as an
optional subsystem. If it is missing then add it and reboot the
system. Note: The exact naming of each of the menu items varies
between Windows versions, but will be similar.
There is also a web page describing all of the
Registry Entries in the
SUA/Interix Articles section.
1.03 - Setuid at install or after?
We recommend that during installation you select the box of
enabling "setuid behavior". There are several programs that work
best with setuid behavior being active (ssh/sshd for example).
If you need to change it after you have installed, then you can
through the registry editor. Go to the key HKLM\SOFTWARE\Microsoft\Services
for UNIX\EnableSetuidBinaries and set the value to 1 to turn on;
set the value to 0 (zero) to it turn off.
1.04 - Installing /Tools packages
You may install the software packages in two ways: by individually selecting
software packages, or by installing a Bundle that includes most packages
at once.
-
To install individual packages from the /Tools Warehouse (which are
available via ftp) you need to install
the installer. The installer comes as a package for people
upgrading to a newer version; the installer can update itself.
For people who have freshly installed SFU, the installer will
need to be 'bootstrapped' onto the machine. There is a special
shell script to do this. Current instructions for bootstrapping
the installer are located at the top of the
Tool Warehouse web page.
-
Alternatively you may install one of the software Bundles that contain
many of the most common packages from Main Page.
For detailed information about using the installation tools/utilities
please read the Package Install web page.
1.04b - I'm not allow FTP access. Are the Bundles available by HTTP?
Yes, you can download the bundles via HTTP by visiting our simplified
web page for downloading Bundles by HTTP. Please note that the preferred method is still by FTP since the HTTP
site may not always be available.
1.05 - I tried to install package XXXX and it failed
Be sure that you are using the "pkg_update" utility since it
is the easiest to use. Check that you spelled the package name correctly.
Also check that you provided the '-L' option.
Typos happen. Before installing the installer you must have already
installed Microsoft Services for UNIX (Interix/SFU) 3.5 or Interix/SUA
(Subsystem for Unix-based Applications).
You can download SFU freely from the
SFU 3.5 download page then follow
our suggestions in FAQ 1.01.
Please note that the download will cease to be available some time in 2009.
1.06 - Can't find package "env_XXX-bin.tgz" when
installing another package
You likely downloaded just the packages you wanted to install instead of
letting the pkg_update utility work out the details for you.
We always recommend you use pkg_update whenever possible so
this error does not happen. Otherwise you need to download this
"env_XXX-bin.tgz" package too into the same directory as your
other packages. Then try to install again.
Packages at /Tools that need a common action to be taken during
an installation depend on another package. This reduces errors
and the amount of clutter on your machine.
1.07 - I'm behind a firewall / I use an FTP Proxy
The ftp utility is used to transfer packages from the ftp site
to your machine. You can set ftp to work with an FTP Proxy
server by setting the environment variable "ftp_proxy" to the
URL of your FTP Proxy server. You will find this information on
the ftp manual page.
1.08 - Can I save the packages locally and install them?
Yes, you can. If you do, try and keep all of the packages in one
directory. When you do an installation (using pkg_add) do it
from this directory or be sure to set the PKG_PATH environment
variable to this directory. Download all of the "env_*.tgz"
packages too.
1.09 - I'm not allowed to use FTP
Some people are not allow FTP access but are allowed HTTP access. It's
silly because it has little to do with security. If you are trying to download one of our Bundles then you can visit our special web page
downloading Bundles by HTTP.
Some people are at secure locations and are not allowed direct
access to the /Tools FTP site or allowed to download by HTTP.
You may be interested in ordering
the Interop Toolworks CD instead. This CD will correctly install
from itself all of the packages or just the packages that you
choose. This CD is regularly accepted after going through a
"clean room" check so that it may enter a facility. The
Toolworks CD is updated regularly. If you have a special need
please let us know so that we can help you. To obtain the Toolworks CD you
will have to send us e-mail ("tools@interopsystems.com").
1.10 - How can I avoid always typing "ftp://ftp.interopsystems.com/pkgs/3.5"
Most sites have a more recent version of the installer now and can use
the 'pkg_update' command (as always recommended). So for many people
this FAQ entry may confuse more than help. However, if you are still using
an older version of the installer:
You can set the environment variable PKG_PATH to this URL. Refer
to the pkg_add manual page for more information. Or instead of
using pkg_add you can use pkg_update to install or update
packages (refer to the manual page).
1.11 - Is there a GUI I can use to manage application
packages instead of the shell command line?
Yes, there is an X11 Tcl/Tk script that is part of the 'pkg'
installer. You will need to have an X11 server for the GUI to be
displayed. The GUI program is named 'tkpkg' and can be started
from a shell command line. You will need to have the installer
package ("pkg") and the Tk package already installed of course.
1.12 - Don't use Windows Explorer (Win32 File Explorer)
for file permissions
Yes, this is correct. Don't use Windows Explorer to change
file/directory permissions for Interix-created files/directories
unless you really know what you are doing. If you are
reading this FAQ entry for the first time, then you likely don't
know what you are doing. Windows Explorer will incorrectly
changes the ACEs in the ACL and also change the order of the
ACEs in the ACL. File Explorer also knows nothing about
setuid/setgid, character/block special files or symbolic links.
Windows Explorer is a very blunt tool. So just don't.
(This message is brought to you on behalf of members who have
suffered the pain!)
1.13 - How do I turn filesystem Case Sensitivity ON after
installation?
We always recommend you turn filesystem case sensitivity ON
during installation. If you didn't (or couldn't because of an
unattended installation) you can turn it on now by editing the
registry. Go to the location
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel
and key "obcaseinsensitive" should get set to 0x0
to turn case sensitivity ON. Now reboot the system.
Also refer to the
1.14 - Are there updates or Hotfixes available ?
Yes, there are updates or Hotfixes available for Subsystem for Unix-based
Applications (SUA) and Interix / SFU (Service for Unix). Depending on what
you are looking to update we'll recommend different actions.
If you are wanting to update the subsystem then visit the "BUGS" web page
at Interix.ca. This easier than searching
the Microsoft Support site.
If you want an update to a utility or library then we suggest you install the
version from our Tool Warehouse. Important examples of this are sendmail, Perl,
libm and libcrypt -- there are many others. Our versions are backward
compatible with the Microsoft version. Microsoft's most recent utility
update is based on our versions.
We recommend you install one of the Software Bundles listed on
our main web page.
1.15 - How can I tell which version of the subsystem am I running?
Look at the output from the "fileinfo" command. Here's an example from
Interix 3.5:
/dev/fs/C/WINNT/system32/PSXSS.EXE 8.0.1969.32
/dev/fs/C/WINNT/system32/PSXDLL.DLL 8.0.1969.32
/dev/fs/C/WINNT/system32/POSIX.EXE 8.0.1969.32
/dev/fs/C/WINNT/system32/PSXRUN.EXE 8.0.1969.32
/dev/fs/C/WINNT/system32/drivers/PSXDRV.SYS 8.0.1969.1
The numbers at the end indicate the build number and version. This is
the number you compare when looking at Hotfix information.
1.16 - How do I tell the release or version of Interix (SFU or SUA) I'm running?
First point to note is that Subsystem for Unix-based Applications is
Interix. The Unix system of SFU is Interix. Interix is Interix.
Run the command "uname -a". For Interix / SFU 3.5 it will look like:
Interix squirtle 3.5 SP-8.0.1969.32 x86 Intel_x86_Family15_Model2_Stepping7
while on SUA 6.0 it will look like:
Interix ponyta 6.0 10.0.6000.0 x86 AMD_x86_Family15_Model4_Stepping10
The third column "3.5" and "6.0" indicate the release (or version) number.
back to top
User FAQs
2.01 - Pathnames with spaces
If you have a path with spaces in the name you should quote the
pathname so that the spaces are understood to be part of the
name instead of as a delimiter between commands. Otherwise the
command shells tend to treat space as word delimiters.
2.02 - Can I run a BSD/Linux/AIX/etc. binary using
Interix?
No. Binary emulation is not supported. You will need to
recompile the program first. Use the two SDKs plus available
/Tools Warehouse libraries to help with this process. You can
post questions about porting in the /Tools Forum. For long or
detailed help we suggested you hire someone on a per hour basis.
We can provide recommendations.
2.03 - Xterm "-e" not working
Using the command 'xterm -e {utilitypath}' is not working. The
xterm with X11R6 exhibits this problem. Use the X11R5 xterm
instead ("/usr/X11R5/bin/xterm") or install the newer build of xterm
from the Tool Warehouse. We suggest the Tool Warehouse package because
it is the newest and cupports colour.
2.04 - Running X11 programs
Services for UNIX comes with X11R5 and X11R6 utilities and
libraries. SFU does not come with a X-server to display the
graphical output of these X11 utilities. You can set your
"DISPLAY" environment variable to the name of a machine on your
network to display the X11 utilities. If you would like to
display X11 locally then you will need to purchase an X-server.
There are several X-servers available. You should look for an
X-server that will handle X11R6 (X11R6.6 is preferred since this
is the best match). You can purchase an X-server from Interop
Systems at the
Products
page.
There is an updated X11R6 set of libraries available from the Tool Warehouse
that has a few bugs fixes and noticeable speed improvements from what
ships from Microsoft. These are available for free, drop into place
easily and are backward compatabile. The package can be cleanly
uninstalled later if you wish.
For questions about X11R7 refer to the entry below
(4.17 - Is X11R7 available?).
2.05 - What is the "interix" terminal?
The "interix" terminal is a fully capable color terminal similar
to a color DEC VT series or rxvt terminal. You can run color
curses programs on it, scroll, buffer, 64 function keys, etc.
Shortcuts for scrolling include <shift-pgup>, <shift-pgdn>,
<ctrl-up> and <ctrl-down>. Escape codes can be sent to it for
inserting, deleting, etc. as with most fully capable terminals.
2.06 - The "interix" terminal type is not recognized when
I telnet.
Get a more up-to-date version of the Terminfo database installed
on the machine you are telnet'ing into and install it. The "interix"
terminal type has been included in the terminfo database for
many years.
back to top
2.07 - I'm running on a new machine and my program core dumps, but it's fine on other machines.
2.07a - Bash dumps core or does SEGV when I try to use it.
There can be two causes of this: 1) DEP (Data Execution
Prevention), or 2) the core shared libraries have not been installed.
DEP solutions
For (1) you may either:
- turn DEP off (aka the NX flag) or
- install hotfix KB942312
— To turn DEP off you need to edit the file
"C:\Boot.ini" and add the line "/noexecute=AlwaysOff". Then
reboot the system.
— To obtain Hotfix 942312. You can get it at this link
http://support.microsoft.com/kb/942312/en-us from Microsoft.
The preferred solutions are the hotfix or the newer libdl since these
do not turn DEP off.
DEP background information: There are some programs, most notably 'gcc',
that place some executable code in the stack. With DEP/NX on,
these programs are stopped. With Windows XP Service Pack 2 (SP2)
and Windows 2003 SP1 this flag was turned on. This affects AMD
and Intel 64-bit hardware in particular, but also 32-bit
machines. A good write-up of DEP and controlling it can be found
at:
http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2mempr.mspx
With 2003 SP1, in addition to DEP, there is a system problem
with running shell scripts that is corrected with Hotfix Q899522
that can be obtained for free from Microsoft PSS/Support.
Core Shared Libraries Need Installing
For (2) you have not installed the shared libraries. The fix
is to install the GNU utilities at installation. If you have
already installed then you can restart the installation and have
this component added without needing a full re-install.
2.08 - What is this file ".netrc" about?
The ".netrc" file has been around for a long, long time. It is
not a new invention. You can find full details on the ftp manual
page. The ".netrc" file stores ftp login names and passwords for
ftp sites. It is similar to the ".rhosts" file for rlogin and
rsh. For security it needs to be owned by the user and should
have a permission mode of 0600 (rw-------). This file used to be created
for access to our FTP site when access was by registered (but still free)
membership. Access currently is by anonymous FTP making this entry less
critical.
2.09 - What are the application packages that have been
updated most recently or are new?
Subscribe to the /Tools Forum "Tool
Warehouse Updates." We post here when new packages become
available for installation. We also post here when packages have
been updated to a newer version or for bug fixes. Starting with
version 2.0 of the 'pkg' installer you can use the pkg_update
utility to regularly check for this information too ("pkg_update
-ni"). Refer to the pkg_update manual page for more detailed
information.
2.10 - How do I set tab completion with 'ksh'?
The short answer is "set -o vi-tabcomplete" at the command line
or in your ".profile" in your home directory. For a longer
answer read the 'ksh' manual page and search for "tabcomplete."
2.11 - Can I access files greater than 2G?
The current limit with Interix with version 3.5 is 2G for APIs
that take or report in-file locations such as lseek() and
stat(). With some slight of coding you can extend this to 4G
with stat(). The read() and write() API's have no size limits
per se. But all of the STDIO file APIs are limited to the 2G
boundary because internal STDIO structures keep track of the
file pointer location. The /Tools version of 'rcp' is an example
of some "slight of coding" to avoid the 2G limit. 'rcp' can send
up a file up to 4G outbound and accept inbound an unlimited
size.
Future versions of Interix beyond version 3.5 do support large
file sizes. However, currently, it is only available with the 64-bit versions
of Vista, Windows 2008/R2, WIndows 2008, Windows 7 & Windows 2003/R2
(not XP, 2000, or 2003).
2.12 - How can I get 'ftp' to do proxy?
Refer to the 'ftp' man page and look for "ftp_proxy". "Ftp_proxy"
is an environment variable that you can set to have 'ftp' go
through an FTP proxy server. An example is:
export ftp_proxy=http://192.168.1.234 {with sh/ksh/bash}
or
setenv ftp_proxy http://192.168.1.234 {with csh/tcsh}
where 192.168.1.234 is the IP Address of the proxy.
2.13 - Cpio isn't handling symbolic links
There is a minor bug in one of the system calls for Interix version
3.0 that causes symbolic links to not be handled correctly when using cpio to
write or read an archive. The updated cpio in the /Tools
warehouse works around this small difficulty. So we recommend
you update to using this version of cpio.
More recent versions of Interix/SUA have the bug corrected and this should
not be an issue.
2.14 - On non-English systems csh/tcsh scripts are
crashing
Version 6.08.03 of tcsh/csh ships with SFU 3.0 and 3.5.
It has been reported several times about scripts crashing on
non-English systems (that's the only relationship we can see).
If you install the current /Tools version of tcsh this will
correct the problem. You can see the tcsh version by typing:
% echo $version
The /Tools version is currently 6.17.0.
2.14b - Is it safe to install your tcsh/csh?
Yes, it is safe to install our version of tcsh/csh on your system.
I did the first build of tcsh for OpenNT (as Interix and SUA were called
then) and was the first user. I use tcsh every day as my preferred shell
(my BSD roots are firm). I also contributed the initial SJIS code
of tcsh. The Microsoft version of tcsh is based on the version built here.
2.15 - Need an update of utility/library
If you need a newer version of a utility or library for Interix
you may find that it is already available in the /Tools
warehouse (link at top of page). Alternatively you can make a
request to us about your needs. Requests are added to our great
"to do" list. If an update is very important you can become a
sponsor for the project. Examples of sponsored packages are
gnuplot and Xview. If you prefer the package to be privately
available to you only, this can be arranged.
back to top
Administrative FAQs
3.01 - Running a command without a windows
opening
Typically when you run a command it is at a shell prompt. When
you start a shell from the desktop menu or desktop shortcut it
uses the program POSIX.EXE to set up the communication with the
Interix subsystem and a window is opened to display. When you
would like to run a command without opening a window for display
you should use the program PSXRUN.EXE. There is a man page "psxrun"
with full information. For example, to start an xterm from a
shortcut the usage of PSXRUN will be 'PSXRUN -u -p /usr/local/bin/xterm
-- xterm -ls -sb'.
3.02 - What is "$$psxjunk"?
The directory "$$psxjunk" is a special directory that is used by
the Interix subsystem to help it provide correct file system
characteristics when performing certain Posix/UNIX actions.
3.03 - How do I change my default shell?
Use the utility 'chsh.' Verify that the shell you are specifying
is listed as a valid shell in the file "/etc/shells." There is a
man page you can read for 'chsh'.
3.04 - Setting the principal domain
By default when you install the Principal Domain for Interix, it
is set to the name of the domain that the machine belongs to. If
the machine is a stand-alone workstation then the name of the
machine is the domain. To set or adjust the value, use the
registry editor to set the key. If you are using Services for Unix the key is:
HKLM\SOFTWARE\Microsoft\Services for UNIX\PrincipalDomain
While the key on Subsystem for Unix-based Applications (SUA) is:
HKLM\SOFTWARE\Microsoft\SUA\PrincipalDomain
This key may not exist initially meaning you will need to create it.
When a user logs in via telnet, ssh
or rsh and the username is not fully qualified (domain+user)
then the username is assumed to be prepended with the Principal
Domain.
3.05 - What shells are available with SFU/Interix?
The 'ksh' (sh) and 'tcsh' (csh) shells ship with SFU 3.5. The 'ksh'
shell is based on "pdksh" and has several Interix-specific
modifications including a special treatment of the environment
variable PATH_WINDOWS (refer to the ksh man page for details).
An updated version of 'tcsh' is available from the /Tools
Warehouse (we recommend you install it).
Also available from the /Tools Warehouse are versions
of 'bash', 'zsh' and 'sch'. These are the most commonly used
shells. If you have a shell that you are interested in please
let us know.
3.06 - Using Clearcase with Interix shows some problems.
Correct. Clearcase did not properly write its driver. Sadly, too
many people don't seem to write filesystem drivers correctly.
It's documented in the DDK what is "correct" but the advice does
not get followed. Clearcase users have experienced mounted
filesystems "crashing".
A workaround has been found:
add the mount point to your Interix PATH environment variable.
$ export PATH="${PATH}:/dev/fs/C/Program Files/Clearcase/bin"
Java (JVM) applications using the JFileChooser need to do the same workaround.
back to top
3.07 - I can't find the /etc/passwd
and/or the /etc/group file. What's up?
The user database of information for UNIX was long ago set in
/etc/passwd. This was easy to implement and manage at the time
it was originally designed. The number of computer users has
grown and technology has changed. Unfortunately people continue
to misunderstand that things have evolved. The portable method
of obtaining user information is through the user and group
API's (getpwnam(), getgrgid(), etc.). These API's are a standard
with POSIX and SUS. No one, or no program, should be relying on
a file named /etc/passwd. Information may now be distributed
across several differently named files, stored with NIS, LDAP or
Kerberos.
With Windows the user database is managed through Active
Directory and/or
the local LSA. That some UNIX systems running on Windows
continue to use and/or create /etc/passwd file just shows a bad
design. As an example, U/Win originally did the same thing with
periodic refreshes of /etc/passwd. During one conference when it
was pointed out to the U/Win folks that Interix was regularly
dealing with Domains of 40,000+ users. They realized that the
file could be out of date before it was regenerated
(ignoring all of the processing and network time to do this
work). Having it integrated works best for size, speed,
security, etc.
3.08 - How can I verify what a user's home directory is in
the user database?
The easiest way is to run an application that will display this
information. The most commonly available is the 'finger'
utility. If "/" is displayed as the user's home directory then a
home directory has not been set for the user.
3.09 - How do I properly set a user's home directory?
The correct solution is to add a home directory for each user in
the user database. Having the "HOME" environment variable is not enough
for most applications for security reasons (it's too easy too spoof the
user account). For using ssh you must set a home directory in
the user database. The same is true for using rsh and rlogin
as well as running any login or startup shells scripts on a per user basis
(these shells include ksh, csh/tcsh, bash and zsh).
For users with an Domain account:
You'll need to open Active Directory (AD) for
Users & Groups for a Domain. Then find the user and open the
Properties Panel for that user. Go to the Profile tab and set
the home directory. You set it in Win32 syntax or UNC syntax.
This path will be translated by the system during the API call(s)
to UNIX syntax. We recommend that you set the home directory
with a UNC path. This allows for easy access by all machines
across the network without the filesystem being mounted to a
specific drive letter.
For local user accounts:
If you are using a stand-alone machine or an account that is only local
to a particular machine (not a domain account) then from the Control Panel
start the Computer Management application. Similar to the above instructions,
open the property panel for the user and change the home directory on the
profile tab. Enter the path in Win32 syntax. The path will have be a local
path (not a network path).
3.10 - I'm running Windows 2000 and just installed SP1 and
Interix won't run now.
There is a hotfix available from Microsoft for this. You need to
contact Microsoft support (aka PSS, Professional Support
Services) to get the hotfix. You should be able to get it
without a service charge, but Microsoft likes to keep track of
hotfix distribution. The most current CD image that installs SFU
has been updated to include this fix. So newer installations on
Windows 2000 with SP1 should not be affected.
3.11 - Administrator doing "su <user>" can't access
network drive.
With Interix three user accounts have a power very similar to
Unix "root": System, Domain Administrator and local
administrator. These accounts have the power to create a process
with a security token of any user without a password (just like
Unix "root"). But the security token is limited to the local
machine and the local machine's filesystems. By default if you
are Administrator and do "su" to a user you will not be asked
for a password and therefore will not have access to remote
filesystems. If you update to the Tool Warehouse "su" you can use the
"-p" option to always ask for a password. With a password
a security token will be create that allows for remote filesystem access as that user.
3.12 - Setuid program(s) not working
With Interix 5.2 (SUA on W2K3/R2) sometime the installation will
not properly put the information on disk for setuid files (files
that execute as the owner of the file). This results in the
setuid files/programs not running and an error being reported.
This does not happen with most Interix 5.2 installations. The
fix is to remove the setuid bit on the file(s) and then re-apply
the setuid bit. To do this correctly you must do this as the
local Administrator; no other user will do since it must run as
the local Administrator to work correctly.
It should work fine after that. Sample:
% chmod -s /bin/regpwd
% chmod +s
/bin/regpwd
3.13 - Which Registry Entries are important?
3.14 - Which Registry Entries can I Configure or Fix?
The most complete information on which Registry Entries are important
or can be configured are described in the article
Registry Entries on Interix and Subsystem for Unix-based Applications.
You will want to read this article if something has changed the behavior
of Interix/SUA or the subsystem is not booting.
3.15 - How can I turn the Firewall off?
The Windows firewall can be annoying at times. It can regularly get
turned on and then have the GUI grey-out the ability to turn it off.
You can issue a command from the shell (CMD.EXE or a Unix shell).
netsh.exe firewall set service mode=disable type=all
or
/dev/fs/C/Windows/System32/netsh.exe firewall set service mode=disable type=all
3.16 - Is S/KEY (or skey) available for Interix/SUA?
Yes, an skey package has been available for several years now.
It is administered the same as on BSD systems. Manual pages come with the
installation. An updated login comes with the package so that
telnet and other remote connection utilities can use S/Key.
The openssh package is built to use S/Key too.
3.17 - How do I login using S/Key ?
First we suggest that you read the manual pages (RTFM) for skey(1) and
skeyinit(1). Then set up skey to be used with an account (there is an example
on the skeyinit(1) man page).
When it is time to actually login from a remote machine or site using
telnet or rlogin then enter the string "s/key" when prompted
for the password (you won't see this echoed at the time).
The utility login(1) is used by both of these
remote connection tools so there are notes on the man page for login.
You will get another prompt to enter the current one-time passphrase (S/Key).
When you are connecting from a remote machine/site using ssh,
sftp or scp you will append the string ":skey"
to the username. This will result in the SSH password prompt accepting the
one-time passphrase (S/Key). E.g.:
ssh fred:skey@somemachine
3.18 - Why do I want to use S/Key with an SSH/OpenSSH connection?
You do not need to be paranoid to use S/Key with SSH. You do need to
understand the security risks of not using S/Key when you are
doing a remote login. If you are on a machine that you cannot personally
verify has not been altered (physically or with software, including drivers)
then you should use S/Key. If you are in a location that you will not
have or cannot guarantee absolute privacy you should use S/Key. For the
former there are many programs and drivers that can capture keystrokes
and thus compromise your system because your password becomes known to
the nasty person who bugged the keyboard. For the latter someone may
be watching over your shoulder, spying from a distance or even
watching you through a camera at the remote site. An Internet Cafe is a good
candidate for keystroke grabbing, spies and recording cameras.
With the S/Key one-time-passphrase-good-only-for-one-login you won't have
to care if CrackerDude009 is staring at your keyboard at login. That
password is used, gone never to be valid again.
back to top
Building / Developer FAQs
4.01 - Debugging Interix processes with gdb and WinDbg
You will need to build your program using 'gcc' as the compiler
and linker using the '-g' option (refer to the gcc man page for
more information). Then you can use the 'gdb' debugger to
examine the process as you would on other systems.
You can also use the 'truss' command to help debug a process.
The truss utility outputs a list of actions that that happen when
the program requests things to be done outside of user space. Examples are
opening a file, calling fork() and reading from a file. This can be a great
way to narrow down where a problem is before starting the debugger. Also,
since the debugger itself sometimes will correct a problem so it doesn't
appear, truss may help you narrow it down.
The principal and best debugger to use is gdb which is available
for all versions of Interix and Subsystem for Unix-based Applications.
However, starting with Interix/SUA release 5.2 there is an optional
add-on for the Microsoft Visual Studio debugger. However, I wouldn't bother
with the MSVS debugger. Instead I will recommend that you download and install
the "WinDbg" debugger to debug Interix/SUA programs built using cc
and c89.
The gdb debugger is currently only capable of working with 32-bit
objects. For 64-bit objects you will have to use WinDbg after compiling
with cc or c89 plus the '-g' option for creating debuggable
code.
4.02 - Using GNU's configure
When using GNU's configure script to configure a build environment for an application it is suggested that you set the following environment variables before running configure.
CFLAGS="-D_ALL_SOURCE -D_REENTRANT"
CPPFLAGS="-D_ALL_SOURCE -D_REENTRANT -I/usr/local/include"
LDFLAGS="-L/usr/local/lib"
If you have the newer BIND installed (see entry 4.09)
you will want to have configure use this BIND since it has more functions
and seems to be faster than the subsystem calls. In this case the environment
variables should be set as:
CFLAGS="-D_ALL_SOURCE -D_REENTRANT"
CPPFLAGS="-D_ALL_SOURCE -D_REENTRANT -I/usr/local/bind/include -I/usr/local/include"
LDFLAGS="-L/usr/local/lib -lbind"
Then you can run configure with the options you want active (or inactive)
for that software package. Many softare packages have started using the
more modern poll() API instead of the select() API (technical
comparison left for entry 4.25 below). The poll()
API exists but should not be used. Therefore can deactivate it getting used
by configure with the "ac_cv_func_poll=no" addition:
./configure ac_cv_func_poll=no
If you are running configure on an Interix/SUA 64-bit system you should
install the most current c89 (see FAQ entry 4.05b
because to build 64-bit you need to use c89/cc. Also
shared libraries cannot be built in 64-bit at this time so you should
disable shared library building. An example is:
./configure ac_cv_func_poll=no --disable-shared
If GNU's configure complains that the type of system is not recognized then
you need to update the file "config.guess." Some applications have
multiple copies of "config.guess" so be sure to find all of them. You can
find them using the command:
find . -name config.guess
An updated "config.guess" can be downloaded from
"ftp://ftp.interopsystems.com/pub/config.guess" if you need it.
You may also need to update your LD_LIBRARY_FLAGS if you are using shared
object libraries (DSOs), but this is likely already done for you if you
have installed a /Tools packaged library.
Also reference the FAQ entries 4.19 to 4.21.
4.03 - Is there a GUI for looking at manual (man) pages?
Yes. You will need to have an X11 server for the GUI to be
displayed. The 'tkman' program is part of the 'tkman' package
available from the /Tools warehouse. It allows you to expand and
collapse subsections of a man page and to follow
links/references.
4.04 - Does Interix/SUA/SFU come with a compiler?
SUA/Interix comes with the ability to use MSVC and gcc/g++. The gcc
compiler comes with the SUA/Interix installation when you select from
the Custom install option. Note that BOTH the Interix SDK and
the GNU SDK must be installed. The MSVC compiler is a separate
download that is now free. It is recommended that you have MSVC
installed before installing SUA/Interix, but you can do it after. You
need to have at least the Interix SDK installed. The utilities
cc and c89 are used to control MSVC compiling programs. You can
get more information on downloading MSVC from:
http://msdn.microsoft.com/visualc/vctoolkit2003/.
Subsystem for Unix-based Applications (Interix) is available for both
32-bit and 64-bit Windows systems starting from Windows 2003/R2 forward.
However, at this time the gcc compiler and hence the gdb
debugger are only available for creating 32-bit objects. 32-bit programs
can be run on the 64-bit systems. To create 64-bit objects you will
need to use the MSVC 64-bit compiler. On the 64-bit systems cc and
c89 are set to use the 64-bit MSVC. See FAQ entries 4-13 to 4.15 for
more information.
4.05 - I can't find the 'gcc', 'cc' and/or 'c89' compilers
with my SUA/Interix/SFU installation. Where are they?
You likely just installed the default selection of
components. At installation time you should have also selected
both the "Interix SDK" and "Interix GNU SDK"
components from the
Custom Installation. Now that you have SUA/Interix installed you
can add these components to the current installation by starting
the SFU installation again. The SUA installer
will see that you have already done an installation and ask if
you want to add/remove components.
Check the boxes in the tree-like list of components for *both* the
"Interix SDK" and "Interix GNU SDK." This will install all
of the developer tools and manual pages including 'gcc', 'cc' and 'c89'.
4.05b - 'c89' and 'cc': update available?
The c89 and cc utilities were first written for OpenNT 2.0
(OpenNT was the original name for Interix). As new releases have happened
updates have happened to match MSVC changes, to extend functionality and
to extend compatability. Microsoft has contracted us to update c89
a couple of times and to make the update available for everyone.
You can install the most recent update of c89 and cc
in the package named c89 with the command:
pkg_update -L c89
We have made the c89 updates available for all currently supported
versions of Interix (Services for Unix & Subsystem for Unix-based
Applications). Some of the newer extensions we have added have been to
accept or deal with many gcc options that many build scripts
use by default.
4.05c - Can I build Win32 or Win32 binaries?
Yes, you can build Win32 or Win64 binaries using the wcc utility.
This allows you to use a Unix/Linux build environment (scripts, utilities,
etc.) to build Win32/Win64 programs and DLL's.
Originally the wcc utility was stand-alone. The most reccent version
has been merged with the c89/cc script in the c89
package. When you read the c89, cc or wcc manual
page you will see that the information for all of them is the same page.
4.06 - I have a program that verifies a user's password to
the content of /etc/passwd. How do I port this to Interix?
Use the API setuser() instead. One of the flags you can pass to
the setuser() API is SU_CHECK to verify a password. When you
want to actually change the user we recommend you use setuser()
with the SU_COMPLETE flag rather than a set of setuid(), seteuid(),
setgid() and setegid() API calls because it is faster and with
create a better security token.
4.07 - Where is the GNU source code for
what ships with SUA / SFU?
Every CD (or downloaded CD image) has the GNU source code with
it. From the root of the CD look in the directory
"sources/Interix/gnu." You will find three tar files there with
the sources.
4.08 - Can I create a software package myself like in the
/Tools Warehouse?
Yes, you can! Refer to the 'pkg_create' manual page for most of
the information. You can "disassemble" existing packages with
'tar' to see what has been done as a comparison. Once you have
done this give it a try! It's pretty straight-forward compared
to a lot of other installers. You may always post questions to
the Forum as well. If you would like to donate your package to
the /Tools Warehouse you can. We'll look at the package and
place it available in a "beta" location for a trial period
before it goes "live."
4.09 - When linking ""__res_state"" is not found
You are compiling/linking software that has been built against a
more recent version of the BIND library than what ships with SFU
3.5. You should install the BIND 9 package from the /Tools
Warehouse. Then ensure that "-I/usr/local/bind/include" is part of
the compile line and that "-L/usr/local/lib" and "-lbind" are
part of the link line.
4.10 - Which C compilers are available?
There are four different compilers available:
- gcc - comes with the distribution
- Visual C - available from Microsoft
- PGI C - available from PGI
- Intel C - available from Intel
4.11 - Which C++ can be used?
We'd recommend you stick with using g++ which is part
of the gcc suite. It keeps you portable with most Unix and
Linux systems.
4.12 - Which FORTRAN compilers are available?
There are two FORTRAN compilers available. One is PGI FORTRAN and the
other is Intel FORTRAN. Both will create SUA/Interix binaries.
4.13 - Can gcc generate 64-bit binaries?
The gcc compiler with all versions of Interix/SFU/SUA can only
generate 32-bit binaries, even on the 64-bit machines.
The 64-bit machines can still run these 32-bit binaries without
a problem. There is no plan that we currently know about for
64-bit-izing gcc with Interix though we have made proposals to
Microsoft and many users have asked Microsoft as well. Go ahead and
encourage Microsoft :-)
4.14 - How can I generate 64-bit binaries?
You can generate 64-bit binaries on Interix/SUA (from versions
5.2 and forward) using the c89/cc compiler which, under the
covers, uses MSVC. You need to have a version of MSVC that
supports 64-bit such as version 8.0 (aka 2005).
4.15 - Getting 32-bit c89/cc binaries on 64-bit machine
You have likely used the 32-bit compiler for cc rather than the
64-bit.
cc, as you know, uses MSVC. When MSVC is installed, not all
versions of MSVS/MSVC install the 64-bit compiler (even if you
are on a 64-bit machine). In other words, you may not have it
installed. So you need to double-check.
The other thing is that the default path will find the 32-bit
first.
You need to modify your PATH to have the 64-bit version of MSVC
be found first. If you look in, for example, "/dev/fs/C/MSVS8/VC/bin"
all of the binaries there are for 32-bit compiling. The
sub-directory of "bin" named "amd64" has the
64-bit-producing binaries for the compiler for AMD64 and EM64T (aka
authenticamd and genuineintel respectively). It is similar for IA64 systems.
4.16 - Missing 64-bit libraries ?
On the 64-bit release of Subsystem for Unix-based Applications (aka Interix 6.0)
not all of the libraries that ship from Microsoft with the 32-bit systems
are available. This can cause problems for some people (no surprise).
We do have available several of these missing 64-bit libraries such as
librcplib (the RCP library) and others. Currently the X11 libs are only
available in 32-bit because no one has told us they *need* them.
4.17 - Is X11R7 available ?
Currently X11R6 and X11R5 ship from Microsoft. We have available an updated
release of X11R6 that has performance improvements (similar to our
performance improvements for libm the math library). We did a port of X11R7.1
but it (not Interix / SUA) had problems with its locking order and was not
usable except for a few applications. The X11R7.4 libraries and include
files are available as a package ("x11r7") from the Tool Warehouse.
4.18 - Any comments about HPC on Subsystem for Unix-based Applications ?
Sure, I'll comment :-)
I will recommend you use SUA / Interix over some of the alternatives because
it is faster; faster for reading, faster for writing, way faster for
fork()s and exec()s.
I will also recommend that you use the new libm (math library) we have
available because it has sigificant performance improvements (especially
for 64-bit) and many new math API's currently found on other Unix-like
systems.
If you are using the 'gcc' compiler be sure to use the '-O2' or '-O3' option.
You may be insterested in knowing that the Sun / Solaris Grid Engine project
has a build available for Subsystem for Unix-based Applications (SUA).
There are quite a few members of SUA Community who do HPC or related work. A
few have worked at getting newer versions of 'gcc' ported to support HPC
work. Search the forums for more information on this.
4.19 - How do I tell if a program uses shared libraries?
There are a few ways ways to tell if a program uses shared libraries.
The easiest is to use the file utility. It will tell you the type
of binary the program is plus some other useful information. There is a manual
page will all the information for you to read ("man file"). Here are
a couple of examples below -- the first is a static program and the second
program uses shared libraries:
% file /bin/ed
/bin/ed: Windows NT, PE format, executable, static, stripped, Interix-CUI, no debug info, Intel x86
%
% file /usr/local/bin/rsync
/usr/local/bin/rsync: Windows NT, PE format, Interix dynamic shared library, Interix-CUI, debug info, Intel x86
4.20 - How do I list the shared libraries a program uses?
If the program uses shared libraries you can get a list from the output
of the objdump command with the right options. Additional information
will be output at the same time so you may want to filter it with egrep
to control the information volume. Here's an example:
% objdump -p /usr/local/bin/rsync | egrep "NEEDED|RPATH"
NEEDED libiconv.so.2
NEEDED libc.so.3.5
In the example above there is no RPATH information for rsync. This
means that to find the shared libraries at load-time the loader (ld.so)
will use its pre-set paths plus the paths listed in the environment
variable LD_LIBRARY_PATH. When RPATH is specified then these paths will
be search first (and often more successfully).
4.21 - My shared library cannot be found for loading... help?
Shared libraries are loaded by the program ld.so in a specific order.
The order is the list output from the objdump command. The shared
libraries are found by ld.so by searching paths listed in the
following order: RPATH, internal list, and LD_LIBRARY_PATH.
The ld.so loader that ships from Microsoft has an internal list
that of one path only: "/usr/lib". The ld.so loader that ships
from here (SUA Community, aka /Tools) is an update that has an internal
list of "/usr/lib", "/usr/local/lib" and "/usr/local/ssl/lib"; on the
64-bit systems even more subdirectoies are searched. Further, you
can add internal paths to the new ld.so using the ldconfig
utility. With no surprise, we recommend you install the newer version.
The new version is in the software package "libdl".
You can set RPATH with your program using the option "-rpath {path}"
when you are compiling your program. You can also add more paths to the
environment variable LD_LIBRARY_PATH. The only difficulty with using
LD_LIBRARY_PATH is that daemons (aka services) do not have the LD_LIBRARY_PATH
available because of the way they get started. It's best to install the
package libdl to get the newer ld.so and have anyone using
your software do the same.
4.22 - Are 64-bit shared libraries available?
At this time only 32-bit shared libraries are available because there is
not currently a 64-bit generating version of gcc (or to be more
precise the linker). Static 64-bit libraries are available.
4.23 - On my 64-bit Interix/SUA where are the 32-bit shared libraries?
On 64-bit Interix and Subsystem for Unix-based Applications (SUA) 64-bit
static libraries will be found in the tradtional locations (/usr/lib,
/usr/local/lib, etc.). Both 32-bit shared and static libraries can be found
in subdirectoies of the traditional locations named "x86". So "/usr/lib/x86"
contains many of the 32-bit libraries on a 64-bit system.
32-bit programs (and their 32-bit libraries) can be used to run or build 32-bit
programs on a 64-bit system. The library packages available from here
(SUA Community, aka /Tools) for 64-bit systems contain the 64-bit libraries
and the 32-bit libraries. Unfortunately not all packages have 64-bit
versions yet (various reasons) so you may have to use a 32-bit package.
Those 32-bit packages will place shared libraries in the traditional
location rather than the subdir 'x86'. This is not a problem or an error.
You should have the newer ld.so loader installed from the
updated libdl package (in the Tool Warehouse) that handles all
the different locations that shared libraries can be found. If the newer
ld.so doesn't handle one of your locations you can configure it
using ldconfig.
4.24 - I built a program and when I run it I get "__pctype_used" undefined
There is a patch that can be applied before you do the final link for
your program to help clear this up. If you install the package
gcc_3.3_patch it will modify the gcc 3.3 files for you to link
with the "libcompat30" library.
The "__pctype_used" is an older reference from the Interix 3.0 days. To
maintain "backward compatability" it is an unresolved reference in a few
of the shared libraries still. It seems the Microsoft build of 'curses'
still references __pctype_used. The best thing to do is install the newer
'curses' library from here since it is clear of this problem (pkg_update -L ncurse).
4.25 - Is the poll() API available?
4.25 - The poll() API doesn't seem to be working?
You should not use the poll() API with Interix for the currently released
versions. The poll() API is available but is only correctly functional
for the process file system. You should not use it in with your programs
or libraries. If you are building a program using 'configure' (see
FAQ entry 4.02) you should disable it using the poll() API.
If you do try to use the poll() API your program will block on
the API call forever. You must direct your program to build using the
select() API.
During the development of the version Interix code named "Firebrand" the
poll() API was implemented to support only the process file system. This
was to support the gdb debugger specifically. The intension (by
the developer) was to complete poll() system-wide for the next minor
release. This work was done at Softway Systems in 1998.
In 1999 Microsoft acquired Interix but not all of the developers.
Microsoft released Firebrand 3 years later (with
some minor changes) as Interix 3.0 (a component of Service for Unix; SFU).
Additional functionality has been added by Microsoft over the years since
then (such as Pthreads), but poll() has not been completed. We have poll()
on the "list of things" we'd like enhanced by Microsoft and we send this
in regularly to Microsoft. You are encouraged to let Microsoft know of your
enhancement requests too (more voices!).
4.26 - Can I speed-up group lookups?
4.26 - The getgrnam, getgrgid & getgrent functions take a long time
When your machine is part of a domain that has tens of thousands of users
a lookup for a group may take a very long time when you ask for information
about a group that has many users. Typically this happens with the API's
getgrnam, getgrgid and getgrent. The POSIX and SUS
Standards, and traditional Unix behavior, has these API's returning the
name and GID for the group as well as every user that is a member
of this group.
Many programs do not require a list of every user in a group. Many programs
only require that the name or GID matching the GID or name provided. The
extra overhead of obtaining every user in the group is unneeded. On Interix
this is addressed with the "_nomember" (pronounced "bar-no-member")
function extensions: getgrnam_nomember, getgrgid_nomember and
getgrent_nomember. There is a manual page for these API's. The
performance improvement can be notable on systems with only a few dozens users.
The _nomember API's have been available since OpenNT/Interix 2.0.
4.27 - How can I do "inline" functions with c89/cc/MSVC ?
With existing source that you have that is gcc friendly you already
specify inline functions with the syntax "inline". If you are trying
to use or must use (on 64-bit builds) c89 or cc which use
MSVC (Microsoft Visual C) then you need to change to use the syntax "__inline".
That's two (2) leading underscores. To keep your code portable it's best to
conditionalize the source code with #ifdef or similar guards.
This code snippet is a good example:
static
#ifdef _MSC_VER
__inline
#else /* _MSC_VER */
inline
#endif /* _MSC_VER */
int myspecial(char *alpha, int beta)
Windows Interop FAQs
5.01 - Accessing Win32 API's
You cannot link Win32 APIs with Interix APIs. You can
communicate between Interix and Win32 processes with several
methods: common files, memory mapped files, sockets and pipes.
This actually gives you a large amount of controlled
communications between the two systems. If you are looking to do
COM you will need to make a "wrapper" for the Win32 program that
will link with COM and handle the communications between Interix
and Win32.
Starting with Windows 2003 R2, Interix (aka Windows Subsystem
for UNIX-based Applications) is included as part of the OS and
Interix and Win32 API's can be both linked into the same
program. This is called "mixed mode" programming. This is an Interix / SUA
program that can include Win32 calls. This is intended for actions
such as database access.
5.02 - Running Win32 programs from Interix "on the glass"
When you are logged on to Windows at the screen (aka "the
glass") and you are running an Interix terminal (one of the
shells: ksh, csh, tcsh, bash, zsh) you can run Win32 programs.
If the Win32 program is a command line oriented programs it will
display in the same window from which the command was run. If
the Win32 program is a GUI (Graphical User Interface; such as
notepad) it will open its own graphics display. You are able to
do this without a problem because everything is working within
the same "window station" (what you see on the glass).
back to top
5.03 - Running Win32 programs from Interix via telnet, rlogin, ssh
or xterm
When you are logged in to the system via telnet, rlogin or ssh,
OR you are working from a locally displayed xterm terminal you
cannot run all Win32 programs. When you are logged in this way
you do not have access to a "window station." This might change
in the future, but this is the way it is now. Without a window
station some Win32 programs cannot run, or will run but their
output is confused or missing some information. Win32 programs
that are GUI (graphically based) cannot run because there is
nowhere for them to display. For programs that are command line
based the majority run correctly. There are a few that Win32
command line programs that are not well written that attempt to
"draw" to the terminal. These command line applications will
appear to be missing information in their output.
5.04 - Creating a desktop shortcut
The quickest way to create a desktop shortcut is to make a copy
of the menu entry for one of the shells (csh or ksh) under
"Start->Programs->Windows Services for UNIX". Use the right
mouse button to popup a menu to make the copy. Then go to the
desktop and click the right mouse button to popup a menu: select
paste shortcut. You can then open the properties panel for this
shortcut to make any adjustments you would like.
5.05 - Junction points
Interix 3.0 and 3.5 can deal with junction points when they have
been specified with relative pathnames (not absolute pathnames).
Using symbolic links is likely a better method for portability
with UNIX scripts and NFS. You should avoid installing
Interix/SFU under a junction point. An absolute junction point
is not handled by Interix currently and thus your installation
will not work (or will have serious problems).
back to top
Microsoft NFS Server & Client FAQ's
Is there a white paper on NFS I can read?
Yes, there are a couple of white papers you can read. We recommend you visit our
Learning Center
to read them all. The key paper is "Implmenting and Configuring
NFS on WIndows Server". There are several papers on directory and
authentication services with AD and LDAP that will be informative there too.
6.01 - Which version of NFS is supported?
The current release of NFS Server is version 3 (NFSv3) with Windows 2003/R2,
Server 2008 and Server 2008/R2. The NFS Client is also version 3 for Vista
and Windows 7 (for the Ultimate and Enrterprise editions only).
For Windows XP, Windows 2000 (server & Workstation) and Windows 2003 (not R2)
you can install SFU 3.5 (both server and client) that supports NFS versions
2 and 3 (NFSv2/NFSv3).
Note: Microsoft will stop distributing SFU 3.5 in
2009 and support will finish in 2011.
6.02 - Is NFS version 4 supporting yet?
No, NFSv4 (NFS version 4) is not currently supported. Microsoft will in
the future release NFS v4 but currently there is no timeline provided.
6.03 - Does Microsoft NFS work with Unix, Linux, AIX, HP/UX, Sun Solaris, etc.?
Yes, both the NFSv3 client and server interoperate with these other systems.
There are many other systems using NFS that will work too. Understand that
NFS works with the passing of UID's and GID's which are Unix ID's. Since
Windows ID's are SID's you need to install the correct software on the Windows
system to do the mapping (UID/GID <--> SID). This is usually called
"Identity Mapping", "IdMU", "Identity Mapping for Unix", or
"User Name Mapping" (UNM). Starting with
Windows Server 2003/R2 this is integrated into Active Directory as RFC2307
(aka LDAP server).
6.04 - Windows File Explorer isn't refreshing my view of an NFS share.
Refer to the Microsoft web page http://support.microsoft.com/kb/894071 for information. While this indicates it applies to SFU 3.0 and should be correct for other, more recent systems.
6.05 - What is Gateway for NFS?
Gateway for NFS is a specical NFS Client that will serve Windows systems that
do not, or cannot, have NFS Client installed. The NFS share will appear as an
SMB share to these system.
6.06 - Is Gateway for NFS still available?
No, Gateway for NFS is no longer available. It was originally available with
Services for Unix (SFU) 3.0. Performance was deemed too slow because the
share requests had to go through a secondary machine or server process.
Since virtually all Windows systems can now run NFS Client directly, which
is faster and more secure, this is the recommended method.
6.07 - Which socket ports does NFS Client use?
By default the Windows NFS client just uses sockets that are available.
You must understand that WinSock is different from Unix (or Linux) sockets
in that port 0 through 1024 are not reserved for "root" or secure types
of communication. However, you can specify that a "secure range" of port
numbers be used to interoperate with Unix / Linux machines better. Refer
to the registry key:
HKLM\Software\Microsoft\Client for NFS\CurrentVersion\Default\UseReservedPorts
This will limit the ports an NFS Client uses to between 900 to 999 inclusive.
This is a "DWORD" if you need to create it. Set it to '1'. You may need
to have the latest NFS Client Hotfix fopr this to work depending on which
version of Windows you have.
6.08 - What is UNM (User Name Mapping) ?
User Name Mapping (UNM) is method and tool used to map NFS UID's and GID's
to Windows SID's. This is the implementation of Identity Management (IdMU)
mentioned in FAQ 6.03 above.
Recall that NFS sends Unix a Unix UID and/or GID with
each NFS communications package for identification and permission
purposes. The UID's and GID's are usually maintained by the system
administrator to be unique within the network that the NFS fileystems are
being served. Windows uses a SID (Security IDentifier) which is much
larger (more bits) than a UID/GID and is unique by machine/domain. To mesh
these two ID methods together UNM is used to map UID/GID's to SID's and the
reverse.
UNM is available as part of Service for Unix (SFU) 3.0 and 3.5 which can run
on Windows 2000, Windows XP, Server 2003 and Server 2003/R2. Server 2003/R2 is
the last Windows release to support UNM. Replacing UNM starting with Server
2003/R2 is RFC2307 in Active Directory (AD).
6.09 - Should I implement UNM (user Name Mapping) or RFC2307 with AD ?
The answer is: it depends or both.
If you have NFS clients that are Windows 2000 and/or Windows XP systems
then you will need to have a server that uses UNM.
If you have NFS Clients that are Windows Vista and/or Windows 7 systems then
you will need to have a server that uses RFC2307 with Active Directory (AD).
Windows Server 2003/R2 allows you to implement either UNM or RFC2307, but
not both at the same time. You can implement just UNM with Server 2003 or
Windows XP using SFU 3.5. With Server 2008 and Server 2008/R2 you can implement
just RFC2307.
6.10 - What if I don't implement either UNM or RFC2307/AD ?
If you do not implement UNM or RFC2307/AD then you will be reduced to anonymous
access only. This usually results in access difficulties for which the
recommended fix is to implement UNM or RFC2307/AD.
7.01 - Is an up-to-date 'sendmail' available?
Yes, the version available in the software bundles or by individual
package is up-to-date for security fixes . There is a hotfix available from
Microsoft, but it is now out-of-date (time march on).
Our update also unifies the same version
across all releases of Interix / SUA / SFU the same as 99% of our other
software.
7.01b - Can 'sendmail' be used fully on SUA / Interix?
Absolutely! You can do everything with 'sendmail' on Interix / SUA that
you can on any other Unix system. This gives you full 'sendmail'
capabilities with the same behavior on a Windows system.
This provides sendmail on Windows identical to Unix/Linux.
7.02 - Is there is ssh / sftp / scp client available ?
Yes, we have OpenSSH (and OpenSSL) ported to work with Interix and
Subsystem for Unix-based Applications. We have been making this available
for almost seven years now. The OpenSSH bundle is included in all of our
bundles and can be installed individually. This provides OpenSSH on
Windows.
7.02b - Can ssh do passwordless (aka public key exchange) login ?
Yes you can. Refer to our White Paper which has the details:
Configuring OpenSSH for Passwordless Login on Interix
You should do a test of logging-in using a password first to make sure the
account is set-up correctly (i.e. you have created a home directory of
this user specifically (x-ref: FAQ entry 3.09).
7.03 - Does this OpenSSH work with SUN's Grid Engine?
Yes it does. If you have specific questions about OpenSSH running on
Interix and SUA post them in our Forum. If it's a Grid Engine question
you best ask those folks :-)
7.04 - Is the bash and/or zsh shells available
Yes, both the 'bash' and 'zsh' shells are available. Both are included
in all of the software bundles as well as being available for separate
download as packages. This provides bash and zsh on Windows.
7.05 - Is gzip, gzgrep, zgrep, zless, et al available?
All of these compression / decompression utilities are available in the
software Bundles. The gzip package includes gzip, gunzip and zcat.
The gzgrep utility is available as zgrep. Also available are zdiff, zmore,
znew, zforce and zless (instead of gzdiffm gzmore, gzless, etc.).
7.06 - I'm try to use cc or c89 but it's giving errors and warnings
Both cc and c89 are scripts to use Microsoft Visual C/C++ (aka MSVC).
A lot of peoples already existing scripts, makefiles or other build tools
have a lot of gcc-isms. This trips up the script that shipped with your
version of Interix, SUA or SFU. An update is available for all releases
from our Tool Warehouse to better handle more options and work better
with newer versions of MSVC including the 64-bit releases.
7.07 - How do I get ls to do colours/colors ?
Install the ls package from the Tools Warehouse to start. If you
have installed, or are going to install one of the software Bundles, the
ls package is included.
When you use ls you can use the '-v' or '--colour' or '--color'
option to cause. If you want to change the default colours used then
you can set the environment variable LS_COLOURS or LS_COLOR with specific
colour directives. The directives and an example are given on the ls
manual page in the "ENVIRONMENT" section.
8.01 - Are monkeys and chimpanzees the same thing?
An interesting question that popular media has helped befuddle.
But it has nothing to do with Interix, SFU, NFS, Subsystem for Unix-based
Applications (SUA), IdMU. So you will have to consult the
Jane Goodall Institue or Wikipedia.
Sorry, but we try to keep the site focused.
8.02 - I'm an ISV using Interix and/or SUA. Can I post in the Forum?
We answer everyone's questions (or more correctly, we try). The better your
knowledge, the better your product and the more people that use Interix and
SUA. The more the better.
8.03 - Can I post a commercial message in the Forum?
If your commercial message has nothing to do with Interix, Subsystem for
Unix-based Applications (SUA) or Services for Unix (SFU) then the answer
is a straight "no".
If you are an ISV or a software project using Interix,
SUA and/or SFU then a "qualified yes" -- do post release announcements
and bug patches but please no posting price lists and no statements that
are "over the top". If you have a white paper
about your product we can likely publish it in our Articles section
after a brief review.
MYTHS and Incorrect Information
There are several Myths and other incorrect information that some web sites
publish and other materials about Interix and the Subsystem for Unix-base
Applications (SUA). Some of these are a result of the information being old
and not updated. Others are up-to-date and appear to be publishing
incorrect information for their advantage.
9.01 MYTH - Win32 API's cannot be used by Interix / SUA
Starting with Windows Server 2003/R2 Interix/SUA programs can link with
Win32 libraries. This is called "mixed-mode" programming because it mixes
two paradigms together. This means you can link to Win32 API's to use
Oracle API's calls and other Win32 libraries.
9.02 MYTH - Win32 and Interix/SUA applications cannot communicate
Interix/SUA and Win32 programs can communicate to each other in variety of
ways: files, sockets, shared memory, etc. They are not isolated from
each other as much as some people attempt to claim -- the mixed-mode
programming further emphasizes this point.
You can run Win32 programs from Interix/SUA and the reverse.
Programs do run in their own memory space as virtually all modern OS's
have their program execute. Information is not shared through a common
process running in user-space. Security information is handled with the
same control and access mechanisms that Win32 uses.
9.03 MYTH - Interix / SUA subsytem is a Security Risk
There is no security risk. Microsoft does not recommend removing the
Interix/SUA subsystem.
People attempting to scare-monger will make reference to very old list
for the IIS web-server. This list applied to Windows 2000 only and was
not Microsoft Corporate or security policy. It made reference to the
older Posix subsysem from the NT 3.5 days. The Interix/SUA subsystem
available since NT 4.0 is a competely different subsystem. The inclusion
in the IIS web-server list was also technically baseless. Which means
any reference to it is technically baseless.
|