OPTION 1: Windows Subsystem for Linux (WSL)
Open a Command Prompt as Administrator
Enable WSL
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable Virtual Machine Platform
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Reboot machine
Open a Command Prompt as Administrator
Set WSL 2 as the default version
wsl.exe --set-default-version 2
Install WSL with Ubuntu 24.04.2 LTS as the Linux distribution
wsl.exe --install --distribution Ubuntu-24.04
Create a user account and password for the newly installed Linux distribution
List installed Linux distributions
Launch Ubuntu-24.04 application
Update and upgrade packages
sudo apt update && sudo apt upgrade
Install Mingw-w64
sudo apt install mingw-w64
Install GNU Make
Install Java
sudo apt install openjdk-21-jdk
Install Clang
Install Netwide Assembler (NASM)
Invoke build tools
x86_64-w64-mingw32-gcc --version && clang --version
Launch Windows PowerShell application
Download the archive
(New-Object System.Net.WebClient).DownloadFile(' https://github.com/msys2/msys2-installer/releases/download/2025-06-22/msys2-base-x86_64-20250622.sfx.exe' , ' msys2.exe' )
Compute checksum of the archive
Get-FileHash ./ msys2.exe - Algorithm SHA256 | Format-List
Extract the archive to C:\msys64
Delete the archive
Add exclusion(s) for Mandatory ASLR (Run as Administrator)
Get-ChildItem - Recurse - File - Path ' C:\msys64\*.exe' | ForEach-Object - Process { Set-ProcessMitigation - Name $_.Name - Disable ForceRelocateImages }
Initialize MSYS2
C:\msys64\usr\bin\bash - lc ' '
Update MSYS2 (core)
C:\msys64\usr\bin\bash - lc ' pacman --noconfirm -Syuu'
Update MSYS2 (normal)
C:\msys64\usr\bin\bash - lc ' pacman --noconfirm -Syuu'
Install the MinGW-w64 toolchain along with the Clang/LLVM toolchain
C:\msys64\usr\bin\bash - lc ' pacman --noconfirm -Syu --needed base-devel vim nasm mingw-w64-ucrt-x86_64-toolchain mingw-w64-x86_64-toolchain mingw-w64-i686-toolchain mingw-w64-ucrt-x86_64-clang mingw-w64-x86_64-clang mingw-w64-clang-x86_64-toolchain'
Preserve the current working directory
$env: CHERE_INVOKING = ' yes'
Set environment to use UCRT
Invoke build tools
C:\msys64\usr\bin\bash - lc ' gcc --version && clang --version'
Windows 11 Enterprise
How to install Linux on Windows with WSL
Manual installation steps for older versions of WSL
Set up a WSL development environment
Mingw-w64
Windows Environment Setup for Tradecraft Garden and Crystal Palace
MSYS2
Using MSYS2 in CI
Using GCC with MinGW
Cygwin64 & MinGW-w64 (for Windows)
Installation using MSYS2 and the MinGW Compilers
MSYS2-Introduction
MSYS2 development environment for Windows
How to install gcc and clang on Windows using MSYS
Install gcc compiler on Windows with MSYS2 for C/C++
Ubuntu on WSL
Windows Terminal
Getting Started with Clang and Visual Studio Code on Windows with MSYS2 and MinGW-w64
Understanding the different flavors of Clang C and C++ compilers in Windows