Hacker News new | ask | show | jobs
by saboot 3966 days ago
Is there an overview article about the different unix emulators on Windows and how they differ in terms of what they provide, and how they are supposed to be used?

Between MSYS, MINGW, Cygwin, Cmder, Clink, Babun, etc. I am just wildly confused in general. I've used linux, I've used windows. Admittedly I am blessed enough to stick with Python but I know that even Anaconda does some msys magic behind the scenes on windows as well.

4 comments

MinGW is a compatibility library for compiling Unix programs to Windows. MSYS is a collection of tools on top of MinGW. Cygwin as a whole is comparable to MSYS. Has its own compatibility library, a broader collection of ported programs, and a way to choose which programs are installed. Babun is an extension of Cygwin.

The use case for them is "I want a Windows shell that works exactly like Unix" or "I want to port a Unix program to Windows with minimal effort."

Cmder and ConEmu address a bunch of deficiencies in the Windows Console Host (conhost.exe) that provides the UI for all console programs on Windows. They add features like resizable and tabbed windows but behind the scenes they're running conhost in a hidden window and redirecting i/o.

The primary use case for Cmder and ConEmu is "I think the Windows Console Host sucks and want something better."

GoW is a collection of GNU programs compiled for Windows with no dependencies on Cygwin or MinGW. The use case is "I want a Windows port of some common Unix command-line programs without any extra baggage."

I suggest if you're that confused you try linux again...you obviously didn't dig into it very hard.

There are shells, environment, terms (ttys), package managers, and then there a bunch of emulation packages on windows.

Go back and read the docs for each tool to understand what it provides (shell, environment, terminal support, library, or package manager).

Clear as mud?

That's why I suggest trying linux again.

Haaa clink, http://mridgers.github.io/clink/, the highest ROI when it comes to turning windows CLI friendly.
They all have something wrong with them. Grep is broken(so old there is no recursive option, or there is one but doesnt work) at least in MSYS, MINGW and Cygwin.
Recursive grep works fine in Cygwin.

I use Cygwin as my main interface on Windows, while my work machine is Linux. I've been using Linux since 96. There is very little functional difference between terminal-based userland on Cygwin and Linux, with the sole exception of speed; Cygwin syscalls are slow, and forking is to be avoided in shell scripts where possible.

Cygwin is a better Unix than OOTB OSX owing to not being stuck on GPL 2.

Not a direct answer, but I use the Windows port of The Silver Searcher (ag) and it works well: http://blog.kowalczyk.info/software/the-silver-searcher-for-...
Windows has this built in, it's called findstr, probably some gaps in the feature set compared to ag but it's quite capable.
grep is working fine in msys/mingw, and has been for many years. I do not remember if I have ever seen it not having the recursive option there. It has been working for my in Cygwin, too. As well as many other utilities ported from unix to Windows.