WSL
Windows Subsystem for Linux (WSL) allows you to easily run a virtual Linux machine inside of Windows. The Linux machine has access to all of your windows files, but otherwise is otherwise a self contained environment.
You must be running an up to date copy of Windows 10 or 11 to make use of WSL.
Once you set up WSL on your computer, you can then install one or more Linux distributions to use. There are many distributions of Linux - variants of the basic Linux operating system that provide a different set of base packages and tools. Ubuntu is one of the more popular distributions.
Installing WSL and Ubuntu
Enable Linux Subsystem
First we need to enable the WSL feature in windows.
Open the start menu and find "Turn Windows Features On/Off"
Find Windows Subsystem for Linux and enable it.
You may need to restart your computer now.
Install WSL and Ubuntu
Now you need to actually install WSL and the Ubuntu distribution.
Open the Microsoft Store.
Search for Ubuntu and install the Ubuntu app.
First Run of Ubuntu
You should now be able to run Ubuntu from the Start menu. When you do so, a terminal window will open. This terminal is running on the Linux virtual machine - for all intents and purposes, it is a Linux computer that is running on top of Windows.
On your first run you will be asked to make a username and password.
Important Password Tips
When you make a password, pick something really easy. You will have to remember it and type it frequently while using Linux. The virtual machine will not be accessible by anyone not logged into your Windows machine, so security is not a big concern.
While typing your password you will not be able to see what you are typing. That is normal - it prevents someone near you from reading your password as you type it. Just be careful as you type.
Installing Build Tools and Valgrind
Once you have installed Ubuntu, enter the following command:
sudo apt-get update
You will need to enter the password you set up while installing Linux. This should check for updated versions of packages, including the ones you are about to install. You should see a long list of sites being checked for updates like this:
When that is done, run these two commands to install the build tools (g++, make, etc...) and valgrind:
sudo apt install build-essential
sudo apt install valgrind
Navigating in the Virtual Machine
This video demonstrates how to navigate in the virtual machine and access your windows files from it: