Skip to content
Home » Installing and Using WSL2 (Windows Subsystem for Linux) on Windows 11

Installing and Using WSL2 (Windows Subsystem for Linux) on Windows 11

Are you a Windows user looking to up your productivity and efficiency by using Linux tools and utilities without the hassle of dual-booting or using a virtual machine? Look no further, because Windows Subsystem for Linux (WSL) is here to save the day! And with the recent release of WSL2, it’s easier and more powerful than ever before.

Most people don’t know that WSL2 actually runs a lightweight virtual machine in the background, providing better performance and compatibility with Linux software compared to the original WSL. However, the most important thing to keep in mind when using WSL2 is that it is not a full-fledged Linux system, so certain features and applications may not work as expected.

Top 5 reasons to use WSL

  1. Access to a wide range of Linux tools and utilities: WSL allows you to use a wide range of Linux tools and utilities, such as text editors, package managers, and server applications, directly from your Windows environment. This can be especially useful for developers who need to use certain tools or libraries that are only available on Linux.
  2. Improved productivity and efficiency: By using WSL, you can easily switch between your Windows and Linux environments and run both systems concurrently, which can improve your overall productivity and efficiency.
  3. No need to dual-boot or use a virtual machine: WSL allows you to use Linux tools and utilities without the need to dual-boot your system or run a virtual machine, saving you time and resources.
  4. Better performance: WSL2, the latest version of WSL, runs a lightweight virtual machine in the background, providing improved performance and compatibility with Linux software compared to the original WSL.
  5. Easy to set up and use: Installing and using WSL is straightforward and can be done with just a few simple commands. This makes it easy for even non-technical users to get started with Linux on their Windows systems.

To get started with WSL2 on Windows 11, follow these steps:

Enable the “Windows Subsystem for Linux” optional feature:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Download and install a Linux distribution from the Microsoft Store, such as Ubuntu:

Invoke-WebRequest -Uri <https://aka.ms/wsl-ubuntu-2004> -OutFile Ubuntu.appx -UseBasicParsing
Add-AppxPackage .\\Ubuntu.appx

Set the default WSL version to 2:

wsl --set-default-version 2

Update the Linux distribution to use WSL2:

wsl --set-version <DistributionName> 2

That’s it! You can now open the Linux distribution from the Start menu and start using it like you would on a regular Linux system.

To test your knowledge, try installing and using a text editor like nano or vim in your new WSL2 environment.

Leave a Reply

Your email address will not be published. Required fields are marked *

19 − fourteen =