WSL2

Windows Subsystem for Linux

Windows Subsystem for Linux, or simply WSL is a layer on top of your Windows 10 machine that helps in running Linux Executable binaries natively on your machine OS.

Let’s say, you have a Windows 10 machine and you would like to get a flavor of Linux distributions on your machine, without dual-booting the system or without using a virtualization software (VirtualBox, VMWare, Hyper-V, etc.), then WSL is the best option for you.

In WSL, you are logged in to your Windows 10 Machine and what you have to do is simply fire up your Windows terminal and type:

wsl -d distribution-name

So, how can you download your WSL distro today ?

Head towards your Microsoft Store, search for a distribution say, Ubuntu. Then hit install.

Wait for the installation to complete.

Open the installed distribution as if you are opening an application on your machine and then enter your username and password to initialize the distro.

And you are greeted with the prompt of your Linux distro there inside your Windows Terminal inside Windows 10.

Want to Check all the available distributions on your machine using PowerShell?

wsl -l -v

What does that version number mean?

WSL comes in 2 versions as of now. You can go through the difference between the two: WSL1 and WSL2 by going through the following link:

Comparing WSL 2 and WSL 1 | Microsoft Docs

How to powerup your Linux prompt after closing it?

Hit ‘wsl’ on your PowerShell prompt to start the default distribution. What is your default distro? The distro with an asterisk (*) beside its name in the list of available distros is your dafault distro.

That’s it for now. Enjoy exploring WSL on your Windows 10/11 machine. And I’ll be coming up with more tech articles in the coming days.