How to Enable Windows Subsystem for Linux on Windows 10
If you are running recent versions of Windows 10 (version 1607 or later) or Windows Server, installing and running Linux software on Windows is now incredibly easy thanks to the Windows Subsystem for Linux (WSL).
The Windows Subsystem for Linux gives you access to the bash shell and lets you install Ubuntu, Debian, openSUSE, Kali Linux, and Alpine on Windows. All of them are available via the Microsoft Store built into Windows 10.
There are two ways we can enable WSL, First one is the command line method using the PowerShell. For that, we need to open a PowerShell window as an Administrator.
Next, run the following command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Restart your computer when prompted. And that is all.
Installing WSL via Control Panel
Alternatively, we can enable the WSL feature from the Control panel. Enable WSL by opening the Control Panel and selecting Programs. Then click Turn Windows Features On Or Off.
Choose the checkbox in front of the "Windows Subsystem for Linux" option, and then click OK.
Restart your computer when prompted.
Install your favorite Linux distribution from the Microsoft Store
The whole purpose of the WSL is to enable the ability to run Linux distributions on top of Microsoft Windows 10/Server. This is great because now you can install your favorite Linux distribution on Windows without the overheads of a virtual machine.
It's also easy to install. For example, if you want to install Debian, open the Microsoft Store, search for Debian, and install it.
You will also have access to the bash shell which will give us the ability to run Bash commands that are very similar to what you get on Linux operating systems.
Open a command prompt and type bash to start a new shell.