It is clear with Azure that Microsoft is adopting a tool chaining strategy based on Git and other useful terminal tools. Gone are the days of drawing pretty boxes in a CASE tool and expect the stuff you cooked up in thin air to be high performance, scalable and easily provisioned through cloud providers. The first step is get yourself tools that can actually help your everyday devops life. Hark! let us hipsterise Windows and bring on the terminals!
So if you take pride in your .dotfiles, git-foo and devops craftsmanship, but got stuck navigating the treacherous GUI waters of Redmond county, then this is for you. This blog post aims to be an opinionated and cynical evaluation of 4 major terminal options available in Windows for running Git and other common everyday *NIX tools. The scale are in unit of Onions, because you will be weeping when you start working on these abominations. Command Prompt did not make the list. It died with DOS 6.22.
Use Mac or Linux. Save yourself while you can. If you absolutely cannot avoid using Windows as the main platform, or unable to run it through Virtualbox, then install Babun; though the experience is no where near the level of “epic unicorns riding waves of candy rainbow”, it is still very solid. Be prepared to deal with stuff like BLODA (Big List of Dodgy Apps), you’ll question the existence of antivirus as a marketing and vendor lock-in strategy, and really get some hands-on practicing copious amounts of “let me reboot my laptop to see if it fixes the problems. Oh it did.” Start rubbing your ears and say “Wooooosa”, and remember the fault is not with Babun, but with Windows.
Git can be installed via chocolatey. This is a package manager that can be installed in Powershell with this monstrosity of a command.
PS:\> iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
Chocolately is billed as apt-get for windows, but you would need Powershell know how, and you best be a C# developer. Guessing if you do devops on *nux/*BSD platform, this is not for you. Naturally, you will bloat your xbox PC since none of the UNIX tools exists. Forget about curl because in the world of Powershell, curl equivalent looks like…
PS F:\> (New-Object System.Net.WebClient).DownloadString("http://google.com")
Ships with Windows and has a fancy blue background. Quite possibly awesome with stuff like Sharepoint. Network proxy works without additional configuration. But why Sharepoint… why…
You need to know your C#. Pipelining involves objects, not strings. My guess is that sed and awk would not work without a heap of ToString() method calls. Conceptually very powerful for having a debug console for everything Microsoft. This is extreme vendor lock-in.
4/5 Onions. Balling my eyes out reading MSDN documentation to just trying to add headers to the Webclient. In contrast, this would be the perfect platform if you do know your C#. I do not see very sharp, if you would pardon the pun.
This is old school. Both Git and package managers are available. Options here are apt-cyg and pact. Cygwin is POSIX compliant and can be the portable platform for most things *NIX.
Copy and pasting is made slightly easier with using the default clipboard. No need to fiddle with pbcopy or “*y and “*p. Yes, can’t think of any other pros besides the fact that most tools are available here.
Ready to start using dos2unix and unix2dos all over the shop. Cygwin looks dated but a little .dotfiles TLC will spruce it up real nice. But be prepared to download the internet for the tools you want. You will probably come across a bunch of quirks and work around to get stuff going. Note that node.js no longer supports Cygwin either. Need to explicitly setup HTTP_PROXY env variable for network proxies.
3/5 Onions. It feels like I am back in university trying learn things instead of producing results.
Best in class here. It is essential Cygwin minus the quirks and ugliness. Has plenty out-of-the-box tools and a nice package manager named
pact that seems to work alright.
pact is a bit like
brew for Mac.
Purrrty and super fast to get going. zsh is my new fav shell.
Copy pasting is a bit of a pain. Babun is installed in its own directory, sort of like a mini chroot environment. This makes accessing your windows stuff feels a little jail-breaky. But why would you want to do that anyways when you got a perfectly good shell? Need to explicitly setup HTTP_PROXY env variable for network proxies.
1/5 Onions. It is not all that bad and has most things you need for a flying start. It is however not an integrated terminal environment like the ones in Mac and Ubuntu. There are quirks. For example, getting gvim to pop up in windows, (instead of using
pact install gvim, which uses xterm and lord knows what would happen), the following script was added to make it work, provided that gvim.bat lives happily in the %SystemRoot% folder.
cmd /c gvim.bat "$@"
Not POSIX and not a derivative of Cygwin. This is MSYS, which is a collection of GNU utilities based on MinGW. Being non POSIX, it uses Windows C native runtime directly. It is as bare mental as Windows can go, if you would ignore the antivirus and el crapo boot time.
Great for git. That is about it. It also doesn’t care if files not UNIX format delimited. Pretty chillax this tool.
Ugly as hell. Need your TLC from .dotfiles to make it visually appealing. Need to explicitly setup HTTP_PROXY env variable for network proxies. If you want other tools then you are shit out of luck. No package manager as far as I know. I
2/5 Onions. Its not all that bad again, but it is really not ideal. Copy and pasting is a pain with this marking business.
I use my mac for real work. I am too afraid to install Node, Ruby, Perl or Python stuff on these xbox laptops. Virtualbox and Vagrant is a must have for sanity.