How to Install MSys2
Download it, get the 64 bit build:
Download and install the Hack font, you want the
If you just need unix tools, you want the
MSYS shell, if you are going to build native software for windows you also want the
MINGW64 shell (and possibly the
MINGW32 shell for 32 bit builds) you can switch between these in a shell session as well, this is controlled by the
MSYSTEM environment variable.
To make a quicklaunch shortcut on your taskbar, set the properties to something like this:
Object: C:\msys64\usr\bin\mintty.exe -e /bin/sh -c "MSYSTEM=MINGW64 /bin/bash -l" Working Directory: %USERPROFILE% Icon: C:\msys64\msys2.ico
Add a shortcut key if you like.
Control Panel ->
Advanced system settings ->
HOME to C:\users<your-id> or whatever your windows user profile directory is.
MSYS variable to:
winsymlinks:nativestrict export wincmdln
Make sure to click
OK and then
Open up an MSYS shell and update everything:
if it tells you to kill the terminal and restart the command, do that, until there are no more updates.
Install an editor such as vim:
pacman -S vim tmux git tree
to search for packages:
pacman -Ss <keyword>
/etc/nsswitch.conf and make sure it has this line:
Kill the terminal and restart, you should be in your windows user profile directory which is now your home.
Set up your
.bashrc or whatever you use. You will want this line in it most likely:
alias ls="ls -h --color=auto --hide='ntuser.*' --hide='NTUSER.*'"
this will make your new home directory look more pleasant.
To configure the terminal to something more reasonable, put this
.minttyrc in your home:
this uses the Tango Dark color scheme which is usually now the standard on Linux desktops.
That's pretty much it, I'll have some tips below.
I have a prompt for bash for msys2 you may like:
If you want install an sshd, use this:
To copy a file to the clipboard for pasting, you can do e.g.:
cat ~/.bashrc > /dev/clipboard
mintty has no tiling options, but just use the windows tiling shortcuts.
To get the same effect as terminal tabs, use Groupy from Stardock and configure it to automatically group the same windows.
to switch between environments, e.g. from
MINGW64, just do this:
export MSYSTEM=MINGW64 exec bash -l
cmake in a
MINGW shell pass in
-G 'MSYS Makefiles'.