Msys2
msys2 is a fork of cygwin, created by the mingw team. The difference between msys and cygwin is that msys does not use compatibility layers to run pure linux programs. Instead, it's programs are native windows executables, they can be run without an Xserver, and they tend to be much faster.
Msys2 is fantastic. It is faster than cygwin, runs without the Xserver, and it manages it's packages with pacman. vim, Zsh, python2, and tmux are all available which makes this the tool of my dreams.
WARNING:
msys2 is a fantastic tool that provides a unixlike compile environment for windows, and unixlike shell with some (very basic) dependencies.
msys2 can use tmux, python, zsh, etc.
The problem for me, when considering it as a development platform, is that any python library requiring a compiled component must be built specifically for msys2. Saltstack, for example, cannot be used within msys2 because it requires pycrypto which does not compile under msys2.
So basically, treat msys as a barebones unix shell. you'll be able to install builtin scripting languages, like zsh, sh, bash, python, perl, ruby, ... but you will be severely restricted when it comes to libraries. Think of it as a shell, and a shell only.
..HOWEVER..
It is a wonderful shell-environment that you can use to run THE WINDOWS PYTHON
from, and still have access to tmux/vim-splits/ack/find.
Install
The easiest install route is to install using chocolatey. Run an msys shell from
C:\tools\msys64\mingw64_shell.bat
.sudo pacman -S zsh tmux vim python2
Configuration
%USERPROFILE% as $HOME
/etc/nsswitch.conf
db_home: windows # use C:\Users\willjp as $HOME. # (This also corrects SSH behaviour)vim with python
mkdir -p /home/src git clone https://github.com/vim/vim cd vim ./configure --prefix=/usr --with-tlib=ncursesw --enable-luainterp \ --with-lua-prefix=/usr/local --disable-gui --disable-tclinterp \ --enable-cscope --without-x CPPFLAGS="${CPPFLAGS} -I/usr/include/ncursesw" \ --enable-python3interp=dynamic --enable-pythoninterp=dynamic \ --enable-multibyte make make install
Compiler Environment
Occasionally, you'll run into a package that is too new, too old, or not available in the package repository. Or maybe you want to compile something yourself. To install the mingw version of gcc and the rest of the compile environment:
pacman -S mingw-w64-x86_64-toolchain
Troubleshooting
ssh not reading ~/.ssh/config
NOTE:
This isn't necessary. Simply update /etc/nsswitch.conf (see above).
ssh expands ~ to
/home/<username>
. in mysys, our home is really/c/Users/<username>
. SSH config must be updated.~/.ssh/config
Host gitbox User git Port 8610 HostName 192.168.1.202 IdentityFile /c/Users/willjp/.ssh/gitboxYou should also create an alias so that your ssh config is actually used:
alias ssh="ssh -F $HOME/.ssh/config $*"NOTE:
This still does not fix behaviour of ssh.
downloading old versions packages
http://repo.msys2.org/ # find/download desired package pacman -U <yourpackage>