TL;DR ?
- Run
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
in your powershell (as administrator) - Restart your PC
- Run
wsl --install
Enjoy🤝
What is WSL ?
WSL is an acronym for Windows Subsystem for Linux. Which allows you to run Linux commands on your system. To install WSL on your windows system, follow this guide:
Step 1: First Enable WSL in settings
Open control panel on your system and click on "Programs" Under "Programs and Features", click on "Turn Windows features on and off"
Select "Windows Subsystem for Linux" and click ok Click on restart now button
You can also do this by running this command in your powershell( run as administrator)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Step 2: Download and Ubuntu (or any other Linux OS) on your WSL
You can do this in two ways
Method 1: By running this command on your terminal as admin
wsl --install
NB: This will install Ubuntu for you by default
Method 2: Downloading from Microsoft store
- Follow this link to download Ubuntu
- Install and Launch
- After installing, create a new username and password
Also download Windows Terminal for better experience.
You can now run any Linux command on your system 😁
Ran into to error during installing ?
Make sure virtualization is enabled on your system
Reference list: Microsoft doc Windows central