Linux is a complete and interesting system that has all kinds of tools and you may not know that you can use it even if your computer has Windows. We can do it with the Linux Subsystem on Windows and we will explain how it works.
One of the best options to have Linux from a Windows computer without having to uninstall your main operating system and to run native tools directly is to use a virtual machine. But also Windows itself allows us to do it automatically and without installing anything, from the system itself. It is through WSL 2.
A Linux subsystem in Windows 10 or Windows 11 allows us, as we say, to run the native Linux tools directly on our computer with Microsoft‘s operating system without the need to change one for another, to uninstall one to use another. For example, it can be useful if you are a developer and want to test how a program works on another operating system.
What is WSL or Windows Subsystem for Linux?
From the Microsoft website they describe it as the following: “The Windows Subsystem for Linux allows developers to run a GNU / Linux environment , including most command-line tools, utilities, and applications, directly in Windows, without Modify and without the overhead of a traditional virtual machine or dual-boot setup2
What it allows us to do is run common command line tools, choose the GNU / Linux distros from the Microsoft Store, install additional software, invoke Linux applications on Windows or invoke Windows applications using the usual command line on another operating system.
There are two versions, as we will see below. WSL 2 is the latest version . From Microsoft they explain it like this: “WSL 2 is a new version of the Windows Subsystem for Linux architecture that allows the Windows Subsystem for Linux to execute Linux ELF64 binary files on Windows. Its main goals are to increase file system performance and add full system call support ”
Obviously, it is not a perfect system and it has some drawbacks compared to having a native kernel: the performance will not be similar even if it has improved, for example, or it will limit the connection of peripherals.
WSL 2 and WSL 1 differences
WSL is the Linux subsystem on Windows but its latest version is WSL 2 with enhancements , with greater efficiency and performance increase as well as improved system compatibility. It has been available since 2020 and has a number of improvements and features over the previous one. The main difference is the performance increase and the compatibility improvement, but there are others.
As we can see on Microsoft’s help page, both have integration into both systems, both have fast boot times or run with current versions of VMWare and Virtual Box. But only WSL 2 bets on managed VMs or allows us access to the full Linux kernel . Also only WSL has full support for system calls.
How to know if my computer supports WSL2
WSL 2 is not available for all versions. Only available on Windows 10, version 1903, build 18362 or higher. But we can check if ours is if we go to the settings or the Windows configuration …
Just tap on Win + R to open the Run window on your computer. Here a box will open in the lower left part of the screen where we must write “winver” and touch “OK”. You will thus see the information about your operating system so that we can know whether or not we have a recent version of Windows that is compatible or not with this Linux subsystem.
Installing WSL or Windows Subsystem for Linux is easy and only takes a few seconds. You do not need to be an expert and we will avoid the process involved in a virtual machine. First we must install it from the features and then we must choose the distros that interest us to test on the computer.
The first thing, as we say, is to activate it. There are several ways to do it on the computer and we explain all of them so that you can choose the one that convinces you the most or the one that you consider to be the simplest. They will all allow us to use it later
From Windows Features
Just go to the taskbar search bar and type Windows Features . The window that takes us to the control panel will open and we will see a list that allows us to activate or deactivate features, such as the one you can see in the image below. Here, we use the bar to go down until we find Hyper-V . Mark the corresponding option and confirm with “accept”. You may need to restart your computer for the changes to take effect. Once the reboot is complete, you can start downloading distros to your computer.
From a command
Another option is to do it through a CMD command. To do this, the first thing you must activate or open is the console. We go to the search bar of the computer and type “cmd”. We tap on the result to open the Command Prompt.
Once open, we simply have to write a command :
Once we have activated it, we have the option to download the distros. It is useless to activate it and Linux will automatically start working, but we have to download from Microsoft Store the different Linux distributions that are available according to which we want to test and use. We can search directly in the search engine but we can also go to the categories and filters …
Search for Linux in the Microsoft Store and different options will appear. Once you’ve chosen the one you want, simply tap on “get” to start downloading. When you have it, follow the steps and use each of the distros.
Below you have direct access to some of the options that we can download from the Microsoft Store to test the Linux Subsystem on Windows and put into practice all the advantages it has.