What are the practical differences between Interix and Cygwin?

6,446

Solution 1

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.

  • Unix-like feel: Interix wins this one. The environment feels far more "complete". I'm not sure how to put it. Interix runs alongside the win32 subsystem, where as cygwin runs on top of it. So, interix is a "first class citizen" in Windows kernel land. Things like ps and df work fine.
  • Performance: Having not done any major performance testing, I'd guess that Interix wins this too. Again, it's running at a lower level. You're not just running Win32 apps with a POSIX compatibility DLL linked in.
  • Packages/random software: Cygwin wins this one for two reasons. Firstly, cygwin is far better known. A lot of Unixy software will have support for its quirks. You can also install things very easily from the GUI installer. Interix doesn't (I believe) have anything like this built into it. Sure, you can download something, compile it using gcc (Which I think you can get prebuilt), and pray that it works, but it's a bit like porting software to any other random variant of Unix (like Solaris, or AIX) - some things will work, other things will try to bite your leg off and murder your children.
  • Integration with Windows apps and tools: To be honest, both sort of suck at this. If you have, say, an Apache server running inside cygwin or Interix, then sure, it's going to be able to communicate over TCP with Win32 programs, but that's about as far as it goes. From inside interix, I believe you can kill Win32 programs and list them using ps, not sure if you can do this with cygwin. With both, you can use the Windows task manager to kill things.
  • Integration with VMs: Addressing your example of sharing a home directory, then yes. You can either use samba for this, and I believe NFS works on Interix too for something more unixy. You won't find any nice GUIs or anything to do the work for you though. Both cygwin and Interix allow you to access your regular filesystems.
  • Size of user base: Cygwin wins here, I'd say. It was very difficult to find things that had been tested and developed to run on Interix, where as most open source stuff seemed to support cygwin as a compile platform.

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.

Solution 2

/*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.

  • performance- SUA is much faster than services for unix but SFU was no slouch either, both are usually faster than cygwin (but not always)
  • integration- integration is the whole point of SFU/SUA and there is alot of docs on what you can and can't do on the technet site. Cygwin is designed to run *nix command on windows- not to make the 2 co-operate. See Unix/Linux interoperability components in Windows (SUA, IdMU, NFS, etc.)
  • user base-I think there are more working, supported solutions on the interix side than on the cygwin side and far less compatibility problems than with cygwin side see http://www.suacommunity.com/ (tool warehouse). Cygwin probably has more overall installs since it's good for the "I need a unix shell" solution Cygwin runs commands, SUA is a unix environment that is a peer to windows.

Solution 3

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.

Solution 4

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.

sua

Now you get to the real evil. Click shortcut for Download and you are taken to the download page.

old

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.

time

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.

Share:
6,446

Related videos on Youtube

Lolmister
Author by

Lolmister

Aw, shucks.

Updated on September 17, 2022

Comments

  • Lolmister
    Lolmister over 1 year

    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.

  • raja
    raja almost 12 years
    Let me understand you correctly- because there has been no no need to change the installer to run the version of unix that comes with win 7 somehow that mean not caring- and the fact that Cygwin actually allows you to download pieces (that you may then have to go back and get more) is somehow a plus? Certainly the recent decision to remove the unix components from windows a sign that users either aren't running unix under windows (IMHO most likely) or that somehow they just don't care but I'm not really seeing that.
  • raja
    raja almost 12 years
    it does come with windows, what you are downloading are unix command that are using the subsystem. Since some of the commands in Linux are over 40 years old I am not surprised they have not needed to be rewritten (and by your standard I suppose no one uses linux or unix anymore since its decades old) . New tools and commands are added at to the SU community at suacommunity.com/tool_warehouse.htm
  • raja
    raja almost 11 years
    Oddly enough I had to go thru some of the code and yup - its the same code from 40 years ago- guess those folks at GNU are doing something horribly wrong- or maybe- just maybe- there is no need to change something that isn't broken
  • Tobias Kienzler
    Tobias Kienzler over 10 years
    Concerning packages, Gentoo-prefix for Interix might be worth a shot
  • Vibhor Karnawat
    Vibhor Karnawat about 10 years
    Performance-wise, Interix actually wins here; many of the things traditionally implemented as *nix syscalls (like fork()) are kludges implemented on top of Win32 in Cygwin. Win32 does not have any notion of fork(), but Interix (and NT) does. Cygwin has trouble with that -- getting the address space exactly right for fork() -- and that leads to some serious performance issues. Someone's sure to get upset about the link containing more than this comment, but here it is, straight from the tap.
  • Vibhor Karnawat
    Vibhor Karnawat about 10 years
    How does it provide "much greater Windows integration"? "It even allows Windows and UNIX APIs to be used in the same program" -- this is true, too, for Interix; see this for the first party source; slide 37, "Mixed-mode processes", which has the bullet "Resulting mixed-mode process can make both SUA and Windows API calls in the same process"
  • adib
    adib over 8 years
    Fast forward to 2015, the answer now becomes simply "cygwin is still available and supported whereas Interix (a.k.a Services for Unix a.k.a Subsystem for Unix-based Applications) is discontinued"