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

07
2014-07
  • John Sonderson

    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.

  • Answers
  • Doktoro Reichard

    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)


  • Related Question

    unicode - How to install and use GNU unifont in cygwin on Windows7?
  • Jens

    I'm using GNU unifont on FreeBSD and would like to have the same font available under Windows7 in a cygwin terminal. My attempts to install GNU unifont for general use (so it would be available in font selection) in Windows7 were futile, as I'm a newcomer to the Seattle family of operating systems.

    I have the unifont available in many formats (ttf.gz, zip, bdf.gz, pcf.gz), as offered on GNU Unifont Glyphs. Can a cygwin terminal be made to use any of these?


  • Related Answers
  • orluke

    Instead of teaching a Windows cmd.exe window to use GNU unifont, I decided to install X11 for Cygwin, then configure X11 to use the desired font. That way I have all the goodies of xterm right at my fingertips. Here's how to do it.

    1. If you haven't already, install the X11 that comes with Cygwin. See Cygwin/X User's Guide http://x.cygwin.com/docs/ug/cygwin-x-ug.html for details. When selecting additional X11 utilities, be sure to add mkfontdir and xset from category X11.
    2. Decide for a directory to place the GNU unifont. I chose ~/X11/font for the following.
    3. cp unifont.pcf.gz ~/X11/font/unifont.pcf.gz
    4. mkfontdir ~/X11/font
    5. If not already running, start an X server, e.g. with startxwin
    6. export DISPLAY=:0
    7. xset +fp ~/X11/font
    8. xterm -fn '-gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1'

    Voilà!

    You probably want to place the commands starting with step 6 in ~/.startxwinrc so they get read and executed automatically by startxwin.