Friday, January 22, 2016

Babun gives Windows users bash without Cygwin's fuss

Grab it here: http://babun.github.io/

Babun is a terminal app for windows that gives users a zsh (and bash, or others if you install it) interface to their windows system.


Babun is a repackaging of cygwin, with a lot of checks and scripts in place to make life easier. 

NB: current X-windows implementation is broken




On startup, it even checks for performance issues, and updates - quite nice right?


Installing packages in cygwin involves running the same setup.exe that was used to install it in the first place. not only is cygwin's install heavy, and time consuming, but the package management feels clumsy.


By keeping babun as a single zip you decompress and run a startup .bat file, it's far more simple, elegant. Things simply work, and there's a "pact" application installer app. So to install an old favorite like gnuplot - "pact install gnuplot"...




That's it, that's all that was required - all prerequisite packages are installed automatically. Want to remove or update? Use


The folder structure in babun is just like cygwin. Standard linux-mimic folders for bin, sbin, dev, etc, usr, var etc plus the usual "cygdrive" folder with a breakdown of all drives on the machine.


{ /cygdrive }  » ls -l

total 72
drwxr-xr-x 1 U0094748 Domain Users 0 Jan 20 11:22 c
drwxr-xr-x 1 U0094748 Domain Users 0 Jan 20 11:21 e
drwxr-xr-x 1 U0094748 Domain Users 0 Jan 20 11:21 f
drwxr-xr-x 1 U0094748 Domain Users 0 Jan 20 14:29 h
drwxr-xr-x 1 U0094748 Domain Users 0 Jan 20 11:21 r

While you normally access your local drives in cygwin through the /cygdrive/ folder, babun adds a little convenience by also presenting them as symlinks off "/"

{ / }  » pwd                                                       

/
{ / }  » ls -l | grep "^l"
lrwxrwxrwx   1 U0094748 Domain Users 11 Jan 22 08:52 c -> /cygdrive/c
lrwxrwxrwx   1 U0094748 Domain Users 11 Jan 22 08:52 e -> /cygdrive/e
lrwxrwxrwx   1 U0094748 Domain Users 11 Jan 22 08:52 f -> /cygdrive/f
lrwxrwxrwx   1 U0094748 Domain Users 11 Jan 22 08:52 h -> /cygdrive/h
lrwxrwxrwx   1 U0094748 Domain Users 11 Jan 22 08:52 r -> /cygdrive/r

This isn't anything really incredible, but it is one of the ways babun tries to make itself more convenient for windows users.

Other little tweaks like using windows version of ping that supports IPV6, over cygwin's implementation (that needs admin access) add the the usability.


The terminal makes a huge difference to usability of windows from the command line.
In comparison to bat files, zsh/bash scripting is far, far superior.

Powershell is a different animal altogether. With the ability to access .Net objects, powershell shares power closer to a full on language. The ability to pass objects in the output as well as text is significant and something linux shells can learn from. That said, anyone familiar with bash will surely enjoy the consistency Babun can provide.