Skip to content

MSYS2

Software Distribution and Building Platform for Windows

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

It consists of a command line terminal called mintty, bash, version control systems like git and subversion, tools like tar and awk and even build systems like autotools, all based on a modified version of Cygwin. Despite some of these central parts being based on Cygwin, the main focus of MSYS2 is to provide a build environment for native Windows software and the Cygwin-using parts are kept at a minimum. MSYS2 provides up-to-date native builds for GCC, mingw-w64, CPython, CMake, Meson, OpenSSL, FFmpeg, Rust, Ruby, just to name a few.

To provide easy installation of packages and a way to keep them updated it features a package management system called Pacman, which should be familiar to Arch Linux users. It brings many powerful features such as dependency resolution and simple complete system upgrades, as well as straight-forward and reproducible package building. Our package repository contains more than 2600 pre-built packages ready to install.

For more details see 'What is MSYS2?' which also compares MSYS2 to other software distributions and development environments like Cygwin, WSL, Chocolatey, Scoop, ... and 'Who Is Using MSYS2?' to see which projects are using MSYS2 and what for.

Installation

  1. Download the installer: msys2-x86_64-20220603.exe

    Verify with SHA256 checksum 6e5a76e36a651542e6b907a39776effb7670a139d6a017c3808fdcfaca84ee83 or GPG signature by 0xf7a49b0ec.

  2. Run the installer. MSYS2 requires 64 bit Windows 7 or newer.

  3. Enter your desired Installation Folder (short ASCII-only path on a NTFS volume, no accents, no spaces, no symlinks, no subst or network drives, no FAT).

    Second screen of MSYS2 installation

  4. When done, click Finish.

    Third screen of MSYS2 installation

  5. Now MSYS2 is ready for you. Run "MSYS2 MinGW x64" from the Start menu.

    Empty MSYS2 terminal window

  6. You will probably want to install some tools and the mingw-w64 GCC to start compiling:

    $ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
    warning: file-5.39-2 is up to date -- skipping
    [... more warnings ...]
    :: There are 48 members in group base-devel:
    :: Repository msys
       1) asciidoc  2) autoconf  3) autoconf2.13  4) autogen
       [... more packages listed ...]
    
    Enter a selection (default=all):
    :: There are 19 members in group mingw-w64-x86_64-toolchain:
    :: Repository mingw64
       1) mingw-w64-x86_64-binutils  2) mingw-w64-x86_64-crt-git
       [... more packages listed ...]
    
    Enter a selection (default=all):
    resolving dependencies...
    looking for conflicting packages...
    
    Packages (123) docbook-xml-4.5-2  docbook-xsl-1.79.2-1
                   [... more packages listed ...]
                   m4-1.4.18-2  make-4.3-1  man-db-2.9.3-1
                   mingw-w64-x86_64-binutils-2.35.1-3
                   mingw-w64-x86_64-crt-git-9.0.0.6090.ad98746a-1
                   mingw-w64-x86_64-gcc-10.2.0-6
                   mingw-w64-x86_64-gcc-ada-10.2.0-6
                   mingw-w64-x86_64-gcc-fortran-10.2.0-6
                   mingw-w64-x86_64-gcc-libgfortran-10.2.0-6
                   mingw-w64-x86_64-gcc-libs-10.2.0-6
                   mingw-w64-x86_64-gcc-objc-10.2.0-6
                   mingw-w64-x86_64-gdb-10.1-2
                   mingw-w64-x86_64-gdb-multiarch-10.1-2
                  [... more packages listed ...]
    
    Total Download Size:    196.15 MiB
    Total Installed Size:  1254.96 MiB
    
    :: Proceed with installation? [Y/n]
    [... downloading and installation continues ...]
    
  7. Now you can call make or gcc to build software for Windows.

    $ gcc --version
    gcc.exe (Rev3, Built by MSYS2 project) 12.1.0
    
  8. After installing MSYS2 it will update itself via pacman, see the update guide for more information.

Sponsors

Our main server is sponsored by jsDelivr

jsdelivr.com

ExtremeIX sponsors our mirror in India

extreme-ix.org

Microsoft Open Source Programs Office sponsors us financially via their FOSS Fund

opensource.microsoft.com

Various organizations provide us with mirrors all around the world, see our mirror list for details.

Authors and Contributors

Donations

You can donate to the project via GitHub Sponsors:

or via Open Collective: