How to Fire Up The New Windows Subsystem For Linux In Windows 11

How to Fire Up The New Windows Subsystem For Linux In Windows 11

This guide is about How to Fire Up The New Windows Subsystem For Linux In Windows 11. So read this free guide, How to Fire Up The New Windows Subsystem For Linux In Windows 11 step by step. If you have query related to same article you may contact us.

How to Fire Up The New Windows Subsystem For Linux In Windows 11 – Guide

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

However, a good feature Windows 11 is the enhanced Windows Subsystem for Linux (WSL), which can now handle graphics and audio natively. In this article, we take a look at what’s new in WSL in Windows 11 and how to start with that.

What is the Windows subsystem for Linux

Most of the time, developers switch between the familiar Windows interface and the ease of command-line-based development tool chains in Linux. Furthermore, those dealing with large volumes of data will find a good number of open source tools originally developed for Linux. The Windows Subsystem for Linux, or WSL for short, allows developers to continue using Windows as their primary operating system, while also giving access to native Linux binaries.

Users therefore do not have to worry about the overhead of emulating running virtual machines or going to the trouble of setting up a dual-boot installation. Although Cygwin provides a POSIX compatibility layer for executing Unix-like commands, it requires recompiling 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, which offers tighter integration with the Windows file system, fast boot times, faster disk reads, and a fully functional Linux kernel. Now with Windows 11, Microsoft is adding graphical user interface and real-time audio support.

Installing WSL on Windows 11

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

Boot into your PC’s BIOS / UEFI interface (usually this involves pressing the DEL or F2 key during boot; consult your computer user guide For more informations). Once inside the BIOS, look for Intel Virtualization Technology or AMD Secure Virtual Machine (also referred to as SVM) depending on your CPU and enable it. Save your changes and restart your PC.

Upgrading from WSL 1 to WSL 2

Unless you are upgrading from a previous version of Windows with WSL 1, WSL 2 is used by default on all recent versions of Windows 10 (1903 and higher) and Windows 11. Using the new GUI, audio and system enhancements file 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 two

2. Be sure to enter the exact name of the distro. If in doubt, just type:

wsl -l -v

3. This command lists the installed Linux distros, their current state and the WSL version they are using. Use the name listed here in the previous 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 automatically be offered a WSL 2 environment. All you need to do is ensure that CPU virtualization is enabled in BIOS and WSL features are installed in your environment.

  • To enable WSL, click on the Start button button.
  • Type “Turn Windows features on or off ”and in the dialog, enable Windows subsystem for Linux, Windows hypervisor platform and virtual machine platform.
  • Click Ok and restart your PC.
  • The best part about WSL 2 is that most at the kernel level features are provided directly by Windows Update. Your PC may automatically offer the WSL 2 kernel update. Otherwise, go to the Settings application, click Windows Update and click Check for updates to download the latest kernel that enables WSLg (short for WSL GUI) functionality.

    At this point, note that you need to have the latest graphics drivers from Intel, NVIDIA or AMD, depending on your primary GPU adapter to get full GPU acceleration. You can use 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 distro 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 just going to the Microsoft Store and looking for a distribution of your choice. Options currently available 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 you to easily download and install these distros, your options are currently limited. However, with WSL 2, you can create and sideload your own distribution by getting the corresponding .tar file. For this article, we’ll be using Ubuntu as it’s very popular and there are great resources available online if you get stuck on a particular command or operation.

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

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

    Add-AppxPackage. Distro_name.appx

    2. Once the distro of your choice is installed, it should appear up instantly from the Start menu.

    3. Just click on the icon to launch an instance of Ubuntu installation.

    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 login directly as root.

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

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

    sudo passwd root

    2. Then enter and confirm the new root password. Be sure to write it down safely. To create a regular user account, which can be used for root access as and when needed, enter:

    sudo adduser

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

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

    The Ubuntu WSL 2 instance is now ready to use.

    From the news fossbytes.com

    Final note

    I hope you like the guide How to Fire Up The New Windows Subsystem For Linux In Windows 11. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.

    We will be happy to hear your thoughts

        Leave a reply

        Compsmag
        Logo