How To Linux On Windows 11

While Windows 11 offers a plethora of features and tools, some tasks are better suited for a Linux environment. If you’re a developer or a power user who wants to use both operating systems without dual-booting, this guide is for you!

Windows Subsystem for Linux (WSL)

Windows 11 comes with an improved version of the Windows Subsystem for Linux (WSL). This feature allows you to run a GNU/Linux environment directly on Windows, without the overhead of a traditional virtual machine.

Installation of WSL

Before you can run Linux on Windows 11, you need to install WSL. The process is quite simple:

Step 1: Enable the Windows Subsystem for Linux

Open Windows PowerShell as an administrator. You can do this by right-clicking the Start button and choosing “Windows PowerShell (Admin)”.

Enter the following command in PowerShell:

wsl --install

This command will enable the necessary virtual machine platform and install a Linux distribution for you (by default, it’s Ubuntu).

Step 2: Update to WSL 2

Once you’ve installed WSL, you’ll want to update to WSL 2. It offers significant improvements over its predecessor, including better system performance and full system call compatibility.

Update to WSL 2 by entering the following command in PowerShell:

wsl --set-version Ubuntu-20.04 2

The command above sets your Ubuntu distribution to use WSL 2. If you’ve installed a different Linux distribution, replace “Ubuntu-20.04” with the name of your distribution.

Running Linux on Windows 11

Now that you have WSL installed and updated to WSL 2, you can start using Linux on Windows 11. You can open your installed Linux distribution by clicking the Start button and navigating to your Linux distribution’s name in the list of installed apps.

You now have a full-fledged Linux terminal at your disposal. You can install packages, write and run scripts, and even use Docker and Kubernetes directly from this terminal. For example, to update your package lists in Ubuntu, you would run:

sudo apt update

That’s it! You’ve successfully set up Linux on Windows 11. Enjoy the power of Linux and Windows combined in one system.