Both Interix and Cygwin appear to provide a Unix-like user environment in Windows. What are the practical differences between the two, in terms of, for example:
- Unix-like "feel"
- Performance
- Package availability/ease in compiling random software downloaded from the internet
- Integration with Windows applications and tools
- Integration/compatibility with virtual machines (e.g. is it possible for Interix and an Ubuntu virtual machine to share the same "home directory")
- Size of user base/level of community support
One difference I am aware of is that Interix requires Windows 7 Enterprise or Ultimate edition; Cygwin will run on anything.
I've only used Windows SFU on Windows 2008 before, but I believe that's based on Interix. I've played with cygwin on occasion, but not a huge amount, so someone please correct me if I say something obviously wrong here.
ps
anddf
work fine.If you have a copy of a Windows OS that will support Interix (as you said, an Enterprise edition, an Ultimate edition, or a Server edition), it's no harm giving it a go. It is a very complete feeling environment. Cygwin, as you said, runs on everything, and is better known and better supported, but feels a bit like a dirty hack to me. Some people use it regularly though.
/*meta note- I hate that comments are so short */
I'd mostly agree with andrews answer with a couple of comments. I've replaced many unix systems with SUA/SFU (no they are not the same but close) under windows.
Can't comment on JimB's answer, so tackling it here, in particular the point about Windows integration. Cygwin being based on Win32 instead of running in its own subsystem, while slower, provides much greater Windows integration. It even allows Windows and UNIX APIs to be used in the same program, which enables things like the Cygwin X server or the mintty terminal.
Cygwin's 'ps' does list Windows processes if you give it the -W option, and 'kill -f' will kill them. Windows programs can be invoked from within Cygwin and plugged together with Cygwin programs using all the usual mechanisms such as pipes. (I don't know whether that's possible in Interix.)
Windows-style paths, both with forward and backward slashes, are supported. Cygwin 1.7 made UTF-8 the default character set, and Windows' UTF-16 filenames are automatically translated, thus filenames in any language show up correctly in Cygwin. I don't know what Interix does here, but couldn't find any evidence of it supporting Unicode.
Other integration features include the 'cygstart' utility for opening a file as if you double-clicked it in Explorer, and the /dev/clipboard device for accessing the Windows clipboard.
Let me share my experience installing Interix for Windows 7.
Our Journey starts at an obscure page for Windows Server 2008.
Here you will discover that it isnt even called Interix anymore, but Subsystem for Unix-based Applications or SUA. Next you will notice only from a user comment that SUA is only available to Windows 7 Ultimate or Enterprise. This is not mentioned in the article anywhere. After installing the "subsystem" you will realize that it is no more than 2 shortcuts in your start menu.
Now you get to the real evil. Click shortcut for Download and you are taken to the download page.
Here we have 3 available files to download. These files are all over 400MB, and as of this writing over 4 years old. Plus we have no options whatsoever of downloading custom packages, certain parts, whatnot. You will then realize that this link is actually for Vista and not Windows 7, and will have to go searching the internet to find the Windows 7 page. At this point I gave up.
Cygwin
Go to cygwin.com. Download cygwin.com/setup-x86.exe. This file is 714 KB. Run a basic installation and you will see that it takes about 2 minutes.
After that you can reuse the installer for many other package to your preference. Moral of the story is that Cygwin cares about the user.
UNIX-like "feel" is pretty subjective. My vote goes with CygWin as it has CygWin/X Xwindows server with all necessary features. SFU got the basic X11 tools but it was too little and too late. Many (incl. me) were introduced to CygWin by the need to have a X11 server. In terms of completeness CygWin is also better positioned as it is open source and a lot of GNU or GPL-licensed software is ported to it. I have seen few commercial products for CygWin while have seen only one product requiring UNIX Services for Windows NT and none since. YMMV.
Package availability is a clear win for CygWin influeced by several factors: - lower entry cost: the "any Windows" with CygWin vs. server-class license for SFU/SUA. Some functionality is available for the desktop flavours of Windows but of the more expensive varieties and without the server components; - open source vs. closed source and more importantly openly available documentation. In the past even the list of commands and the APIs provided were available only to MSDN subscribers and little to no information was available on the Microsoft site. In contrast the GNU toolset was well documented and available both online and as man pages; - the naming and implementation changes are confusing. The early versions were using MKS toolkit which was later abandoned. The rename from SFU to SUA might look nice in the eyes of a marketing team but is confusing the unexperienced users.
Performance-wise one can argue that the Interix is closer to the kernel and thus enjoys shorter code run path. The real question is by how much and does it matter? For most of the programs the difference is few percent and is negligible. An artificial example with heavy I/O can be brought up, of course. I would prefer to put such loads on native UNIX as it would be faster than both native Windows and UNIX add-ons on top of Windows. Many have migrated from Windows to UNIX with the increase of the load while I know no example of conversion from CygWin to Interix (or vice versa). It is the UNIX compatibility which is sought and not the UNIX performance, so I put this on the end of the list.