What is Windows Subsystem for Linux?
Windows Subsystem for Linux (WSL) is a feature in Windows that allows you to run a Linux environment, including most command-line tools, utilities, and applications, directly on a Windows machine without the need for a separate virtual machine or dual-boot setup.
Windows Subsystem for Linux (WSL) Installation Guide
Prerequisites
Before you begin, ensure your system meets the following requirements:
- Windows 10: Version 2004 or higher.
- Windows 11: Any version.
- Your system must be running 64-bit architecture.
You can check your Windows version by pressing Win + R
, typing winver
, and pressing Enter.
Windows
Steps:
- Download a Linus distribution ISO (e.g, Ubuntu) from the official site.
- Install your choice of VM tool on you Mac
- Create a new virtual machine and mount the ISO to install Linux.
Installing WSL via Commands
First you'll need to nagivate to your computer's PowerShell (Terminal) and run it as administrator.
Type the following command to begin the Linux installation
wsl --install
This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux. Warning the above command only works if WSL is not installed at all.
Install a Specific Linux Distribution
- Open Microsoft Store
- Search for your preferrred Linux distribution
How to use WSL in Windows (VSCode)
- install the WSL extension in VSCode's extension tab
- Navigate to the folder you would like to open in VSCode
- Type the following in the terminal
code .
- After a moment, a new VSCode will appear, and you will see this notification \
Congratulation! You have successfully opened a WSL folder in VSCode.