Windows has released a feature available to all PCs running on Windows 10 called Windows Subsystem for Linux, otherwise known as WSL. WSL gives you the ability to add a Linux distribution (aka “distro”), like Ubuntu Linux, and connect it directly to the Windows File System.
This guide will show you how to set up Ubuntu on your PC, and use it for software development.
Please read through these steps before getting started
Follow the instructions line for line, pay attention to detail!!
For setting up a modern development environment, we will require that you’re running the latest version of Windows 10 and have WSL Version 2 installed.
NOTE: WSL 2 is only available in Windows 10, Version 2004, Build 19041 or higher. You may need to update your Windows version.
Check your windows version in settings before moving on. Click in the Windows Search box, and type “version”, and hit enter. You’ll see a System Information window telling you about your computer and OS. Confirm you are running 2004 or higher.
If your version is not a build higher than 19041, you’ll need to do an update of Windows. Open this page, and click the button that says “Download tool now”. Run it, and allow it to update your current system’s OS. This may take awhile.
NOTE: The following instructions are summarized from the Microsoft WSL2 Upgrade Documentation
Turn Windows Features On Or Offand hit enter.
Virtual Machine Platform
Windows Hypervisor Platform
Windows Subsystem for Linux
Hyper-V (and as many sub-items as you can activate)
After you reboot, install the “Windows Terminal” app from the Microsoft Store. If you have any trouble locating it, view it on the web.
This will allow you have multiple command-line interface “tabs” open at once, which makes development a lot easier.
Once it’s installed, open Windows Terminal. It should identify as Powershell.
Enter the following command to set your system default to WSL 2:
wsl --set-default-version 2
CAREFULLY read the output you get from running that command. Click the output that you get on your system:
WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
pwdto see where you currently are in the FS, you should be at
/home/<your username>. This is the root level of your Ubuntu user.
Run the following command:
wsl -l -v
You should see a report such as this, which should confirm your WSL Version
PS C:\Users\yourname> wsl -l -v NAME STATE VERSION Ubuntu-20.04 Running 2
wsl --set-version Ubuntu-20.04 2
TIP: When we refer to “Terminal” throughout this guide, you should open the Windows Terminal application, and select Ubuntu in a new tab.
Once you have your system configured as above, you are ready to complete the required software installation process.