How you can Fire Up The New Windows Subsystem For Linux In Windows 11

How you can Fire Up The New Windows Subsystem For Linux In Windows 11

This tutorial is about the How you can Fire Up The New Windows Subsystem For Linux In Windows 11. We will try our best so that you understand this guide. I hope you like this blog How you can Fire Up The New Windows Subsystem For Linux In Windows 11. If your answer is yes then please do share after reading this.

Check How you can Fire Up The New Windows Subsystem For Linux In Windows 11

Microsoft announced Windows 11 on June 24. The software giant subsequently released the operating system to members of the Windows Insider program, and it can currently be tested by those enrolled on the Dev and Beta channels. While many welcomed the new UI changes, some were still skeptical of the various inconsistencies that continue to plague Windows in general.

However, a nice feature of Windows 11 is the improved Windows Subsystem for Linux (WSL), which can now natively handle graphics and audio. In this article, we take a look at what’s new in WSL in Windows 11 and how to get started.

What is the Windows Subsystem for Linux?

Most of the time, developers find themselves switching between the familiar Windows interface and the ease of command-line-based development toolchains on Linux. In addition, those who handle large amounts of data find a good number of open source tools developed natively for Linux. The Windows Subsystem for Linux, or WSL for short, allows developers to continue using Windows as their primary operating system while giving access to native Linux binaries.

Therefore, users do not have to worry about the emulation overhead of running virtual machines or the hassle of setting up a dual-boot installation. While Cygwin provides a POSIX compatibility layer for running Unix-like commands, it requires the collection of those commands and as such has limited applicability. With WSL, Windows users can directly invoke the Linux shell like any other program and run native Linux binaries.

Starting with Windows 10 1903, Microsoft introduced a new version of WSL called WSL 2 that offers tighter integration with the Windows file system, faster boot times, faster disk reads, and a fully functioning Linux kernel. . . Now with Windows 11, Microsoft is even adding GUI and real-time audio support.

WSL installation on Windows 11

Installing the Windows subsystem for Linux requires some prerequisites. Since WSL 2 uses a real virtual machine, your CPU must support virtualization. While this shouldn’t be an issue with most modern Intel and AMD CPUs that power desktops and laptops, this feature is generally disabled in the computer’s BIOS / UEFI.

Boot into your PC’s BIOS / UEFI interface (usually this involves pressing the DELETE or F2 key during power-up – see your computer’s user guide for more information). Once inside the BIOS, look for Intel Virtualization Technology or AMD Secure Virtual Machine (also indicated as SVM) depending on your CPU and enable it. Save the changes and restart the PC.

Upgrade from WSL 1 to WSL 2

Unless you are upgrading from an older version of Windows with WSL 1, WSL 2 is used by default in all recent versions of Windows 10 (1903 and above) and Windows 11. Using the new GUI, audio, and system files requires a mandatory upgrade to WSL 2.

Follow the steps mentioned below to perform an in-place upgrade from WSL 1 to WSL 2:

1. Type the following at an elevated command prompt, Windows Terminal, or PowerShell.

wsl –set-version 2

2. Make sure to enter the exact name of the distribution. When in doubt, write:

wsl -l -v

3. This command lists the installed Linux distributions, their current status, and the version of WSL they are using. Use the name that appears here in the above command to convert a WSL 1 instance to WSL 2.

Enabling WSL on Windows 11

If this is your first time using WSL on Windows 11, you will be automatically offered a WSL 2 environment. All you need to do is make sure that CPU virtualization is enabled in BIOS and that WSL features are installed in your environment. .

To enable WSL, click the Start button.

Enter “Enable or disable Windows features” and in the dialog box, enable Windows Subsystem for Linux, Windows Hypervisor Platform, and Virtual Machine Platform.

Click OK and restart the PC.

The best part of WSL 2 is that Windows Update provides most of the kernel-level functions directly. Your PC may automatically offer the WSL 2 kernel update. Otherwise, go to the Settings app, click Windows Update, and click Check for updates to download the latest kernel that enables WSLg functionality (short for WSL GUI). . .

At this point, keep in mind that you must have the latest graphics drivers from Intel, NVIDIA, or AMD, depending on your primary GPU adapter, for full GPU acceleration. You can use the beta drivers for your corresponding GPU or just install the latest public versions. Now that the prerequisites have been met, you are ready to install a Linux distribution on your Windows 11 machine.

Installing a Linux distribution on WSL 2 on Windows 11

The easiest way to get Linux up and running on Windows 11 is to simply go to the Microsoft Store and search for a distribution of your choice. Currently available options include Ubuntu (16.04, 18.04, and 20.04), Kali Linux, SUSE Linux Enterprise Server, openSUSE leap, Fedora Remix for WSL, and Debian.

While the Microsoft Store allows easy download and installation of these distributions, the options are currently limited. However, with WSL 2, it is possible to create and download your own distribution by obtaining the corresponding .tar file. For this article, we will be using Ubuntu as it is very popular and there are excellent resources available online if you ever get stuck on a particular command or operation.

Some organizations or domain-joined teams may have limited access to the Microsoft Store. In such cases, you can directly download the installation packages from Microsoft. Follow the steps below to install the distribution:

1. You can either double click the installer or use the following PowerShell command from the installer folder.

Add-AppxPackage. Distro_name.appx

2. Once the distribution of your choice has been installed, it should instantly appear in the Start menu.

3. Simply click on the icon to start an Ubuntu install instance.

4. After a few seconds, you will be asked to create a user account and password. If for some reason the installer does not ask for a user account or password, it will start it directly as root.

Remember that operating with root privileges is a bad security practice. There is no root password assigned by default, which makes it even more vulnerable. It is always useful to first assign a root password and then create a normal user account. This is how you can do it:

1. To assign a new root password, use the command:

sudo passwd root

2. Next, enter and confirm the new root password. Make sure to write it down safely. To create a normal user account, which can then be used for root access when required, type:

sudo adduser

3. Ubuntu will ask you to enter and confirm your password along with other information such as your full name and phone number (this is optional).

4. This creates your dedicated / home directory and displays your username with a $ sign at the bash shell prompt.

The WSL 2 Ubuntu instance is now ready for use.

From the news

Final words: How you can Fire Up The New Windows Subsystem For Linux In Windows 11

I hope you understand this article How you can Fire Up The New Windows Subsystem For Linux In Windows 11, if your answer is no then you can ask anything via contact forum section related to this article. And if your answer is yes then please share this article with your family and friends.

Bollyinside - Get Daily Blogs From Experts