Windows

How to install Windows Subsystem for Linux on Windows 11 via the Command line, and Microsoft Store

wsl5678uh

Windows Subsystem for Linux (WSL) allows you to execute Linux applications on a Windows 11 computer. Windows can run a Linux distribution alongside Windows when WSL is enabled. WSL can be enabled on all major versions of Windows 11, thus you don’t have to upgrade from Windows 11 Home to Pro to take advantage of it. Here are some related guides: What is Windows Subsystem for Linux (WSL), how to install WSL on Windows 10, how to install WSL on Windows Server via Server Manager and PowerShell, how to install and uninstall Docker Desktop on Windows 10 and Windows Server, how to install and upgrade Docker Engine from binaries on Windows Server, and how to Pull your first Nginx Container Image from Docker Hub and deploy it to your local machine.

Once WSL is installed, you can use the new Windows terminal to access the Linux shell. You may then use commands to install and run Linux applications alongside Windows applications. Windows 11 now supports Linux programs that require GPU access, making it a useful tool for a variety of users. 

WSL 2.0, a newer version of WSL designed to run a full Linux kernel in a Hyper-V environment, is used in Windows 11. Here’s how to install the Windows Subsystem for Linux on your Windows 11 computer. Please also see how to install WSL on Windows Server via Server Manager and PowerShell.

Install Windows Subsystem for Linux via the Command Prompt

The Command Prompt or PowerShell are the easiest ways to install WSL on Windows 11. You can perform this with either tool, depending on which environment you want. To do so, go to the Start menu (or press the Windows + r key) and input cmd or Powershell, then launch as administrator.

Screenshot-2022-05-01-at-00.13.41

With a single command, you can install and enable WSL from your admin-level PowerShell or Command Prompt window. To do so, press Enter after typing the following command:

wsl –install
Screenshot-2022-05-01-at-00.16.37-1

You’ll have to wait while Windows 11 activates WSL, activates GUI program support, and installs Ubuntu, the default Linux distribution. In the window, you can see how far the installation has progressed.

  • When it’s finished, you’ll see a notification telling you that you need to restart your Windows 11 computer to finish the installation.
Screenshot-2022-05-01-at-00.18.00

Sign in to Windows when your PC has rebooted, and you should be able to utilize your Linux system. To get started with WSL, go to the Start menu and look for Ubuntu in the “Recently Installed” area. You may also look for it in the app list by its name.

Screenshot-2022-05-01-at-00.19.31

How to Install Linux Distributions from the Microsoft Store

If you don’t want to use a command-line program, you may use the Microsoft Store to install Linux. Before installation, make sure the following requirements are met:

  • You are running Windows 11 (build 22000 or higher)
  • Virtual Machine Platform is optional and Windows Subsystem for Linux feature is enabled

To check the build number, open the ‘About Windows’ by pressing the windows key + r, then type winver in the search field, as shown in the following screenshot:

The OS build number must be higher than 22000. If it is not, then WSL cannot be installed by following this guide. The second prerequisite to verify is the Virtual Platform feature and Windows Subsystem for Linux. Open the Window run command (press windows key + r) and enter optionalfeatures.exe.

Screenshot-2022-05-01-at-00.42.22

In the “Windows Features” box, select the Windows Subsystem for Linux and Virtual Machine Platform and click OK.

Screenshot-2022-05-01-at-00.43.33

Allow some time for the changes to complete, then restart your PC. WSL components may now be downloaded as a preview version from the Microsoft Store, much like other Windows apps. To install the WSL application from the Microsoft Store, open it and search for the Windows subsystem. 

Open the Microsoft Store and search for the Windows subsystem to install the WSL program. 

Screenshot-2022-05-01-at-00.44.29

Click on the item Windows Subsystem for Linux Preview to open the corresponding application page.

Screenshot-2022-05-01-at-00.45.25

Click on Get to download and install the application. Upon installation, you can click on Open, but it will not do much since there is no Linux distribution installed. You can now proceed with the installation of any Linux distribution.

You should see several distributions available to you, including Kali Linux, Debian, Ubuntu, etc. Choose the Linux distribution you want to use, then click Get to begin installing it.

Screenshot-2022-05-01-at-00.46.36

The Microsoft Store will download and install your Linux distribution at this point—allow some time for this to complete. As with the command prompt method above, you’ll find it in the Start menu after installation is complete.

Finally, running the Windows Subsystem for Linux on Windows 11 allows you to use Linux programs and services without having to reinstall or dual-boot your computer. WSL is the ideal method to run Linux software on a Windows PC, and you can always switch to a different distribution via the Microsoft Store or the new Windows Terminal app if you don’t like the one you’re using.

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x