Windows 7 Ultimate versus Cygwin: POSIX compliance and is it practical to install a GNU system directly on Win 7 Ultimate without Cygwin

1

What are the advantages or disadvantages of using GNU/Linux utilities on Windows 7 via Cygwin as opposed to making use of Windows 7 Ultimate SUA (Subsystem for UNIX-based applications) support (formerly known as Interix). Apparently the SUA implementation on Windows 7 is fully POSIX compliant.

What I would like to know is:

  1. How good is the POSIX compliant environment and Unix utilities provided with Windows 7 Ultimate?

  2. Can I run Unix/Linux executables (such as ELF files) on Windows 7 Ultimate without recompiling them for Windows 7?

  3. I've read that some systems such as Debian have been ported to such Windows 7 Ultimate SUA. Where can I download such distributions.

On my laptop I currently run Windows inside VirtualBox, often via Vagrant configuration files, given that I don't need to use my laptop as a server, and given that some applications only run on windows, and booting Linux in such manner seems to be more convenient than installing Linux on a separate partition and dual-booting these days. However, if I could even run an entire Linux distribution, properly, with native support from the Windows kernel rather than via user-space support provided by Cygwin, than that would be preferable (no need to even wait for Linux to boot inside of VirtualBox).

Thanks.

John Sonderson

Posted 2013-11-23T00:22:01.543

Reputation: 2 816

1It isn't a "basic" question, but it lacks some research... You can see the utilities you get by installing Cygwin by seeing their webpage. But Cygwin isn't a system in the definition of an OS, it is more of a development environment. Other than this, what system have you? You mention not having Windows 7 so I'm assuming you have a Linux system or otherwise this would befall into a XY problem. – Doktoro Reichard – 2013-11-23T00:57:27.653

1

The SO question http://stackoverflow.com/q/4746043/318716 may be useful.

– Joseph Quinsey – 2013-11-23T01:43:49.030

Yes, it is useful. In particular if I understand it properly the original poster managed to run a shell without the need to recompile it but said there were some memory management problems on his system. – John Sonderson – 2013-11-23T01:55:16.687

Answers

1

I still find your question confusing, but from the way the question is asked I can see you are trying to transition from a Linux system to Windows and want to retain Linux/UNIX-like functionality.

Well, here is what Cygwin is:

  • A collection of tools which provide a Linux look and feel environment for Windows.
  • A DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality.

... and what is is not:

  • A way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
  • A way to magically make native Windows apps aware of UNIX® functionality like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.

Advantages and disadvantages of using Cygwin are all dependent on what product or usage you are trying to compare to. From the description, as Cygwin is in essence a toolset, you gain the advantages of having the tools inbedded within Cygwin. The main disadvantage, if you could call it like that, is that the disk gets slightly more full, since you've installed a toolset.

Although I never used extensively Cygwin, as it doesn't uninstall anything, cmd and bash contained in Cygwin should operate separately. As such, you can use bash alongside cmd, although you should stick to a single command line.

It is near impossible (unless considering virtualization) to install an OS over another without rendering the first useless. As such, no GNU systems, in the sense of Operating Systems, have been made that work alongside another OS. This being said, Cygwin comes close, as it proves you in an Windows environment, most tools Unix has to offer.

(On a side note, I still think your question is confusing, particularly the POSIX part. Windows (not NTFS) and some versions of Linux aren't full POSIX compatible, and as you didn't refer what particular functions of POSIX you wanted to use, I'm stumped in this regard)

Doktoro Reichard

Posted 2013-11-23T00:22:01.543

Reputation: 4 896

Thank you for your clarification. Obviously the main difference is that software that runs within Cygwin has to be recompiled and built against the Cygwin dlls in order to run within Cygwin, whereas on Windows 7 Ultimate's subsytem for Unix based applications, such applications run out of the box with no need to recompile them. My understanding is that for instance I can just mount a Unix partition and run the applications from within Windows. – John Sonderson – 2013-11-23T01:45:47.110

When I talk about POSIX compatibility I mean availability of POSIX API functions for the C programming language and the availability of POSIX implementations of tools such as vi, sed, awk, and so on and so forth. Apparently, Windows 7 Ultimate is POSIX compliant (although some people may not be aware of it), otherwise what is this Wikipedia article all about? http://en.wikipedia.org/wiki/Interix

– John Sonderson – 2013-11-23T01:47:26.883

1

If you're referring to this then you would also fall on the same problem.

– Doktoro Reichard – 2013-11-23T01:47:34.833

Sorry if I do not follow, but exactly which same problem are you referring to here? Thanks. – John Sonderson – 2013-11-23T01:48:47.593

1

You would need (apparently) to recompile your code in order for it to work on Windows. Can you try to edit your question? It seems to me like you are trying to solve a problem by seeing if your solutions work (i.e. the XY problem). If you can explicit your concrete problem then more qualified people might help you solve this. Personally, I don't have a great deal of experience in UNIX so other people's experience will come in handy.

– Doktoro Reichard – 2013-11-23T01:53:27.857

OK, I've rephrased my question. Hopefully it is clearer now. – John Sonderson – 2013-11-23T02:07:17.007

I understand your answer now. In both cases, whether Cygwin is being used or whether the SUA support of Windows 7 Ultimate is being used, in either case, to run a Unix/Linux application which is not present on the system, it needs to be compiled for that system (from source code unless a binary developed for that particular system is made available over the network as is the case with Cygwin via its installation program). – John Sonderson – 2013-11-23T02:14:29.490

Anyways, even though SUA is source-compatible with POSIX (but not binary-compatible with Unix applications (which have been compiled so as to run on Unix systems)), I find that the POSIX support feature could indeed prove quite useful. – John Sonderson – 2013-11-23T02:16:12.890

Here is the Link for the Debian on Windows porting project. Unfortunately it does not seem to be active at present: http://www.debian-interix.net/

– John Sonderson – 2013-11-23T02:21:09.630