Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Gow - A lightweight alternative to Cygwin (github.com/bmatzelle)
79 points by rlaitila on Aug 7, 2015 | hide | past | favorite | 60 comments


Related: If you find yourself in a Windows terminal a lot, check out Cmder (http://gooseberrycreative.com/cmder/). It's the only thing keeping me sane when using a Windows console.

Cmder is a little slow by default, but faster if you disable the git branch in the prompt. Other people I know use Clink (http://mridgers.github.io/clink/), the library the powers the readline-like portion of Cmder.


Regarding command line and Windows, I can't imagine myself working without Far Manager (http://farmanager.com/) in combination with ConEmu. I find that a file manager, a terminal and a simple file viewer/editor for quick edits are a very natural combination for a lot of software-related tasks. Much more efficient than both the usual unix cd/ls/cp/... tools and the GUI drag-and-drop based file managers.

Only problem is that Far's default configuration kinda sucks (LeftCtrl+4 is the first thing I do on a new install).

Another invaluable tool for Unix-y stuff on Windows is Rapid Environment Editor (http://www.rapidee.com/en/about), because the integrated editor for environment variables in Windows is just horrible.


Why not mention ConEmu, the best solution? https://code.google.com/p/conemu-maximus5/


Because that's a very subjective answer. I've had a lot of issues with ComEmu. On several occasions, (I'm speculating that it's been after updates) it seems to completely forget all of my settings, and revert to defaults. It happened several times when I didn't have the time to track down the problem, so I've stopped using it.


Cmder is just a shortcut to using ConEmu. It literally is ConEmu with a different set of default settings and some extras preinstalled.


Never happened to me. However, it seems to mess up ncurses rendering (eg, tig is broken on my work laptop).


Tried it, but it crashes on me all the time.


The Windows 10 console host fixes a bunch of the past deficiencies. Line-based selection, copy / paste hotkeys, windows are resizable the normal way. Now I just need to wait 10 years for all of the pre-Windows 10 servers to go away...


I liked cmder But have you tried mobaxterm???? mobaxterm changed my Windows life!


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.


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.


This won't be to everyone's taste but if you value 'lightweight' over 'feature-complete' busybox-w32 [1] may be worth a look. It's a port of BusyBox to WIN32, with random code borrowed from GNUlib for stuff that Microsoft omitted.

I maintain the most active fork and got into using it when I ported my last employer's software to Windows. This was originally developed in the early 1990s to run on Unix workstations. For portability it used Bourne shell (not bash) and nawk (not gawk). BusyBox allowed them to bundle a single executable with the Windows version that was adequate to run those scripts.

Some projects use busybox-w32 to allow a Unix-centric build system to work on Windows. Julia, for example, seems to use it just to get echo and printf.

[1] https://github.com/rmyorston/busybox-w32


If Microsoft added these utilities to Windows and included a decent shell it would go a long way to getting developer mind share back from Apple.


FYI: these tools install with GitExtensions for windows, and that includes a bash shell.

I use it with ConEmu, and it goes a long way towards usability. I also use Clover as a file explorer wrapper/replacement. I usually have a couple browsers, editors/ide, clover and conemu open at all times.. tabbed interfaces are beyond useful.

As is having a bash shell (although some things aren't quite the same).


so true. Well there is Cygwin although it feels sometimes like an alien on Windows IMHO. It is not that Microsoft tried to do this: https://en.wikipedia.org/wiki/Windows_Services_for_UNIX but it seems not good enough :/


Lol... Bunch of .exe files checked into Github. Seems legit


Why put the executable in source control without the actual source text files?


Or why put output binaries to source control at all? Who is going to ever clone that? Github has "releases" feature for that which the project seems to be using too (https://github.com/bmatzelle/gow/releases)


You've expanded my point, which made me reflect on how I communicate. In my mind I did mean what you said, "binaries to source control at _all_"


I really like the idea of gow but it's horribly unmaintained. Check the issue list length. You're probably better off installing Git with the "add gnu utilities to PATH" option ticked.


Yes. wget 1.11? It's not even funny. I understand author took last GnuWin32 release, but amount of changes in wget related to many things (including adequate https support) since 2008 is too big.

Moreover, using cross-platform Unicode-aware tools in (still not really Unicode-aware) cmd.exe will blow up sooner than later on “funny” filenames. As others said, you need proper shell and terminal.


Honestly, I'd recommend anyone to just install native GNU/Linux operating system. Getting the awesome, absolutely amazing coretuils to work on Windows seems like swimming upstream.


Windows is pretty ok for my gaming box. Nice to also be able to sling some code with it.


Am I blind or are there no sources for the binaries?


It appears to be one of those rare (but legitimate) GPL projects which do not disclose publicly viewable source, but should hand it over upon request if they are to obey licensing terms.

UnxUtils and DJGPP are other alternatives.

Speaking of which, this project has been posted on HN at least 4 times previously.

EDIT: No, they appear to be publicly available in Releases, as mentioned by another poster.


Looks like the maintainer provides the sources in the release section:

https://github.com/bmatzelle/gow/releases


Most of the sources and binaries are from 2012. That version of bash would have the shellshock bug(s).

This project is a Good Idea, but it would be overwhelmingly more useful if it tracked modern versions.


So binaries in source control, source files in release. I don't know what to write.


You are not blind. There are no sources for the binaries.


Channeling my inner stallman. This looks like a lot of GNU utilities for windows, just like the name says. But the title says Linux utilities.


My first post. I wanted to put something up that would spur interesting discussion. I'll be sure to look closer at how I name a submission.


Can someone familiar with `UnxUtils` evaluate this and determine the difference?

Both are out of date and distributed as binaries... What else? :)

Seriously though, if you fork the project and dump the tarballs into a branch, I'll check it out and run make. Or, I'll write a script that runs a bunch of individual makes. Whatever.

I like `UnxUtils` (and Gow) but this practice is not sustainable..


UnxUtils hasn't been maintained for a dozen years. There is also GnuWin32 which has only been dead for five years.

GoW is pretty much the same thing but not abandoned yet. Some things are definitely out of date, I end up pulling curl from elsewhere, but it provides most of the important things and they Just Work. Beats the hell out of using Cygwin.


msys2 is also a good alternative to Cygwin with slightly more up to date packages than Gow.


Msys2 doesn't emulate file permissions, at least not since I checked last. Cygwin does. This saves a lot of hassles when working with version control.


    > * Shell window from any directory: Adds a Windows Explorer shell 
    >   window so that you can right-click on any directory and open a 
    >   command (cmd.exe) window from that directory.
    > * Simple install/remove: Easy to install and remove, all files 
    >   contained in a single directory in a standard C:\Program Files path.
    > * Included in PATH: All binaries are conveniently installed into the Windows 
    >   PATH so they are accessible from a command-line window.
These three bullets seem contradictory, how can it modify explorer context menu and PATH by just adding files in a Program Files directory. Besides, the first bullet is already built into windows explorer without any add-ons, just hold shift while right-clicking and the option will appear.


@statico cmder is definitely a great thing for windows, however it's fault buggy due to way it operates.

Overall the best long term option is to simply stop developing on windows and start using Linux, docker, mono, nodejs etc.

I did this 10 years ago, and the situation on windows still hasn't improved.


What do you mean "due to way it operates?" Can you explain?

Also, how does node have anything to do with this discussion?



> Shell window from any directory: Adds a Windows Explorer shell window so that you can right-click on any directory and open a command (cmd.exe) window from that directory.

That's one of the reasons why I keep virtualbox around on my Windows box. I don't want any integration with the shell, I want applications to be self-contained and not spam on Windows as much as possible.


Along sort of similar lines, StExBar adds a few nice features to explorer:

http://stefanstools.sourceforge.net/StExBar.html

The regex rename for multiple files is quite nice.


> It is designed to be as small as possible, about 10 MB, as opposed to Cygwin which can run well over 100 MB depending upon options.

What's the size of a new cygwin install? Well it can be larger than 100MB, sure. It has lots of packages.


I personnally use mingw if I need to compile something to C or C++ for windows , and for any serious work , Vagrant and Linux. Cygwin an likes are just horrible and I just don't see the point of these today.


When I get a source tarball and I want to run it on Windows, Cygwin gives me the highest probability of a successful compile; higher than Solaris, for sure, and that's a genuine Unix. YMMV.


Nit pick, but, I think it's safe to say you don't compile anything to "C" or "C++", when you're using mingw, you're compiling a "C" or "C++" program to assembly.


Nit pick, but plenty of things compile to C / C++.

https://stackoverflow.com/questions/6498850/programming-lang...


Sure, I agree. But, I believe the parent comment believed she was compiling to C/C++ from C/C++


Hmmm, the other grammar and spelling errors made me think that "to" was also just a mistake.


Yeah, like most other people on here...color me unimpressed.

libmingw if you want lightweight, msys if you want an env + mingw, cygwin if you want something with a nicer unix env.

No matter what env you have, if its on win it going to suck a bit.


The terminal is one of the most painful things about Windows. Every time I give Windows a try (I'm a Linux user) I end up getting sick because of the terminal. The tooling in Windows is in general good.


How's this different from MSYS(2)?


What are the advantages in relation to Cygwin?


The testimonials remind me of infomercials that exaggerate people's struggles to do everyday tasks like cracking eggs or retrieving items from shelves.

Who frets about 100MB on their hard drive in 2015, and why wouldn't these mythical users just install only the cygwin packages they need?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: