share
Super UserIs Cygwin the best Unix environment for Windows?
[+31] [13] nik
[2009-07-15 08:14:27]
[ windows unix cygwin ]
[ http://superuser.com/questions/250/is-cygwin-the-best-unix-environment-for-windows ] [DELETED]

Which Unix like environment do you prefer on Windows?

I have found Cygwin [1] to be very comfortable for a Windows platform (usually XP).

I am wondering if there is a better alternative (not because I want to move away from Cygwin).

What are the features of Cygwin that you like OR,
What are features you find in alternatives that you miss in Cygwin?

I am often miss binary compatibility of applications built on Cygwin.
These cannot be run directly on another Windows platform. But, usually fetching a copy of cygwin1.dll suffices.


A collection of other tools, many of which work directly on the Windows subsystem rather than emulating Unix, like Cygwin does:

must be migrated to stackoverflow.com - CodingTales
(2) @CodingTales, Really? Maybe you should elaborate that in an answer here. - nik
[+16] [2009-07-15 08:38:24] jtimberman [ACCEPTED]

"Unix" environment, yes, Cygwin is about the best, as it is pretty much the only one usable, and has a large library of software. Microsoft's "Services for Unix" (SFU) is usable for some people, but it is very corporate / enterprise centric, installing software can be a hassle and in my experience a lot of software available for Cygwin just isn't available via SFU.

While it isn't a Unix environment, I've heard great things about PowerShell, that it really unleashes a lot more potential of Windows for scripting and automation, that a semi-emulated Unix environment doesn't really match on Windows.


(9) I tried to deal with PowerShell, but it just didn't do it for me. I can't get anything useful done on Windows without cygwin installed. - Curtis Tasker
The question is asking specifically about UNIX environments, PowerShell is not one, I would leave that part out as it's not really relevant to the answer. - Mark Renouf
(10) I mention powershell because it can be an alternative to installing a Unix environment. - jtimberman
1
[+14] [2009-07-15 08:28:12] OscarRyz

I would rather Linux running on a virtual machine and mount a shared filesystem. It woks great and with enough ram you don't notice it.

The problem I had with Cygwin is that I ended up typing

explorer .

All the time. Command prompt support is much better in Vista.


(2) Please elaborate on this. How do you share the filesystem? SAMBA? - itsadok
(3) Some vm products ( such as VirtualBox ) mount the filesystem for you so you can access C:/ from Linux - OscarRyz
+1 agreed - imho, VirtualBox + full Linux OS (eg Ubuntu) renders Cygwin obsolete. With the VirtualBox solution, updates/installs are much easier and you don't have compatibility issues. - kfmfe04
2
[+9] [2009-07-15 09:12:17] demianturner

I found MSYS which is based on MinGW to be much better - great performance too.

http://www.mingw.org/


(1) MSYS is great if you just want to run ./configure && make && make install. However, some apps just won't build on MSYS and you need the cygwin dll. - Justin Dearing
Man, MSYS is fantastic. For my money, it's much better than cygwin. - Electrons_Ahoy
I found that a lot of the utilities that come with MSYS (sed, for example) are a bit back-versioned. I realise that one can make them, but it is some additional work than people may not feel worth while. - Brent.Longborough
3
[+5] [2009-07-15 09:37:51] NickNameNick

Cygwin is great, but make sure you install MinTTY [1] to get proper interactive editing for the terminal.

[1] http://en.wikipedia.org/wiki/MinTTY

Yes, I do use MinTTY. Its much better than the older default. - nik
(1) I just set up cygwin as ssh server and use Putty to ssh into it. - alumb
@alumb, I prefer freeSSHd for that. - nik
(2) puttycyg is also nice; a version of PuTTY patched to let you open cygwin sessions locally (no ssh). code.google.com/p/puttycyg - Nelson
4
[+4] [2009-07-15 08:16:34] Stefan Thyberg

I definitely enjoy Cygwin. It works so well that a lot of the programming projects we do can be compiled and run on Cygwin with none or only minor adaptations.


Exactly! I do that too. - nik
5
[+4] [2010-03-26 15:16:08] KyleFarris

I've been using SUA (Subsystem for Unix-based Applications) for a while now on my Windows 7 64-bit machine. My favorite part about it is that I can now SSH into my Windows box. That has come in handy on more than occasion.

You can natively (yes, natively) install applications like bash, apache, grep, vim, gzip, locate, openssh, curl, cat, awk, ruby, libtool, freetds, and hundreds of other things. You can also install an X server like Xming: http://en.wikipedia.org/wiki/Xming

This is a very good resource to checkout what's available and how to install it on your system: http://www.suacommunity.com/SUA.aspx

For you nay-sayers, this is not the same as SFU, it's a more-modern evolution of it. While SFU ran as a service, SUA is literally a subsystem that sits directly on top of the windows kernel.


(1) +1, SUA sounds interesting. Somehow I had not come across it yet. Seems that the XP related releases are nearing end of life, yet I'll check it out sometime. thanks. - nik
You're quite welcome. :-) - KyleFarris
(2) The posix subsystem runs as a service in SUA and SFU: psxss.exe. It was the same way with the OS/2 subsystem when it existed. FWIW, the Windows subsystem also runs as a service: csrss.exe. Unfortunately my sense is that all the ethusiasm for SFU/SUA/Interix is gone at MSFT. They seem focused on PowerShell and HyperV instead. The product is nearly abandoned. No new features for Win7 after a 6 month delay. Poll(2) is still not implemented except for the proc file system. Still ships with gcc 3.3 and an ancient perl and sendmail. It's sad because the technology is very cool. - Brian Reiter
6
[+3] [2009-10-22 05:28:04] Phillip Ngan

Cygwin is good when you want to use a Unix shell exclusively but are running under Windows.

However, for myself, I needed to run the cmd shell, and yet missed the Unix command-line tools. So I found that GNU utilities for Win32 [1] was a much better solution. It meant that I was running under cmd, and yet had access to the Unix commands that I was familiar with (e.g. ls, grep, wc).

[1] http://unxutils.sourceforge.net/

7
[+2] [2009-07-15 08:16:00] Mehrdad

IMO, The primary downside for Cygwin is performance (it emulates a POSIX environment). The native POSIX subsystem for Windows ( Services for UNIX Applications [1]) is also pretty good, and better than Cygwin performance-wise (it's a native subsystem rather than an emulation, it lives beside Win32 subsystem rather than on top of it).

[1] http://technet.microsoft.com/en-us/library/cc779522%28WS.10%29.aspx

@Mehrdad, can you add in some references? - nik
Performance is one downside, the other is the installer in my opinion. Otherwise cygwin is OK. - Ludwig Weinzierl
You can check out the Services for UNIX Applications community site at: suacommunity.org . There's lots of info there on SUA. - KyleFarris
8
[+2] [2009-07-17 13:04:03] nik

I have also run an X Server on the local Windows machine and then exported applications from the Cygwin system to connect to it.

But, it turned out to be a lot of activity and
I realized that most of the time it was just a terminal that I needed.

Since that, its been the default shell and then MinTTY on Cygwin.


9
[+1] [2009-08-25 14:33:38] jim in austin

Two suggestions from the extreme ends of the spectrum. For *nixy tools running in the Windows shell I use GnuWin32 [1] stuff. For a full Linux on Windows without partioning I use the Xubuntu flavor of Wubi [2].

[1] http://gnuwin32.sourceforge.net/
[2] http://wubi-installer.org/

10
[0] [2009-07-17 13:42:40] ldigas

I never found Cygwin comfortable - Unix wannabe shell on a Windows system always felt unnatural, like raping the system.

Unfortunatelly, the fact is that Windows is missing a good shell ( PowerShell [1] aside for now), and what's more, it is even more missing a good terminal. Cmd would be much all right if it came in a more useable terminal.

Cygwin takes care of some of those deficiencies, but it also creates some problems. It is a Unix shell. That means that if you're developing console applications for Windows, you're bound to run into problems concerning slashes/backslashes, file names ...

For that it is probably best to use some of the Unix tools that have been compiled for Windows. unixkit-tiny [2] is my kit of choice, and it works fine. Also, some DVD burners have problems doing their stuff while Cygwin is running (DLL interoperability).

[1] http://en.wikipedia.org/wiki/Windows_PowerShell
[2] http://eric.chromick.com/cli/unixkit-tiny/

Thanks for the unixkit reference, I'll look at it. But, why DLL incompatibilities? cygwin1.dll should not interfere with normal Windows activities/dlls. - nik
I had problems with ... uhhh, I think it was PowerBurner (maybe, I'll have to check, it's been a while) ... anyway, they had problems with cygwin running, with dll's from cygwin. It's a known bug, and have been recognized by both sides (cygwin's and theirs). I don't know if something changed in the meantime, but as far as I remember, it was a thing that couldn't be fixed at that time, cause it would require rewriting from scratch. - ldigas
I can't really download unixkit-tiny now. This is sad :( - sinni800
11
[0] [2009-07-17 13:46:50] MiffTheFox

I have cygwin, but I don't tend to use it for anything beyond runing unix applications on Windows.

My main way to script on Windows (beyond batch scripts) has been to use Cygwin's perl port, although I've been wanting to start using Python (the offical Windows version) as well.


Comfort of Unix apps on Windows is important. Meanwhile, there are Perl and Python ports for Windows that can be used directly w/o Cygwin. Yet, I feel comfortable using them in Cygwin. - nik
@nik Yes, the Unix apps I still use, mainly ls and find (which I have aliased to f, by the way). I just use them with cmd as my shell. :-) - MiffTheFox
Oh, I hardly ever use the cmd shell. Tend to do the inverse, firing the required EXEs from the MinTTY shell. To each their own I guess. But, if you faced any problems with the Cygwin shell (while using other EXEs) do tell me. - nik
12
[0] [2009-10-22 00:59:07] alfplayer

Another solution to consider is coLinux [1], a port of the linux kernel (as defined by the author) that can run on windows. It can be thought of for some purposes as an intermediate solution between Cygwin and full virtualization software like VirtualBox.

[1] http://www.colinux.org/

13