Skip to content

Windows Linux Subsystem

In this section, we will briefly demonstrate how to install a Linux subsystem on Windows using WSL (Windows Subsystem for Linux).

Official Documents

Prerequisites

You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.

Installation Steps

Step 1: Open Terminal as Administrator

Open your terminal as administrator (right-click the icon and you will see the option).

Step 2: Install WSL

Run the following command:

wsl.exe --install

install_wsl

Step 3: Reboot Your Computer

Restart your computer to complete the installation.

Step 4: Run the Subsystem

After rebooting, run the subsystem from the Start menu or by typing wsl in the command prompt.

username

Step 5: Setup Username and Password

When prompted, create a username and password for your Linux distribution.

username_password

Step 6: Ready to Go!

Your WSL installation is complete! You can now use Linux commands in your Windows environment.

successful_installation

Additional Notes

  • By default, wsl.exe --install installs WSL2, which is the latest version and recommended for most users.
  • You can access your Windows files from WSL at /mnt/c/ (for C: drive).
  • To update WSL, run: wsl --update
  • To check your WSL version, run: wsl --version