banner



How To Install Windows Subsystem For Linux On Windows 10

Either you beloved or hate it, but you won't' be able to ignore information technology. Yeah, that's the power of Open source and Linux. In this tutorial, I will show you "How to install Linux on Windows 10 using WSL1". and explain "How to update WSL1 to WSL2 kernel in Windows ten", in case yous already have WSL1 installed.

  • Checkout new Windows 11 features
  • Install WSL on Windows 10 in unmarried control

Accept you ever imagined, Microsoft "The market place dominator" will handshake with Open up source and will support its development?

Whatever you never idea is at present possible on Windows, In before days, if I need to run Rsync or any other Linux utility, Cygwin was the respond to most of the problems.

Nowadays in that location are options like VMware Workstation Player, Virtual box and many other Virtualization Software to install Linux every bit invitee Bone but Microsoft is thinking differently.

Microsoft has introduced WSL2 (Windows Subsystem for Linux) recently to make programmer's life easy. At present administrators and developers can run Linux commands or can do programming from windows ten itself.

let'due south sympathise a fleck on WSL1 and WSL2

What are WSL1 and WSL2

WSL (Windows subsystem for Linux) was aimed to enable bash shell and core Linux commands/utilities for Developer and users. WSL2 (Windows subsystem for Linux version2) is an upgraded version of WSL1.

The main motto of introducing WSL2 was to increment the operation and to support full organisation telephone call compatibility with a lighter VM. Installation of Docker, Editors, Core Linux utilities and Developer tools is now possible in WSL2.

A consummate Linux kernel has been introduced past Microsoft and future upgrades volition be in pipeline, the only major limitation of WSL is no GUI (although debatable), you take to deal with the control line.

Prerequisite to install WSL1 or WSL2

  • WSL1/WSL2 both are supported on Windows 10 and Windows server 2019 64 flake version just. WSL1 requires Windows 10 Build 16215 or after and WSL2 is merely available for Windows10 Builds 19041 or higher.
  • Computer with Hyper-V or Virtualization back up and enabled from Bios.
  • 64-bit Processor with Second Level Address Translation (SLAT) for WSL2. For WSL1, SLAT is non mandatory and information technology works fine without it.

Steps to Install Linux on Windows x using wsl1

  1. Bank check your windows version
  2. Enable Linux subsystem for Windows ten feature and restart.
  3. Download, Extract and install Linux distribution
  4. Provide username and password for user
  5. Launch your Distribution.

I will show you all steps on Windows 10 latest update 2004 with Ubuntu xx.04 on the Command line and Ubuntu 18.04 on GUI

Step1 - Check your windows version

Check your windows version using "Windows key + R" and type "Winver" in the run dialogue box.

check-build-to-install-linux-windows10

and so open up "system information" past typing "msinfo" in the search bar for hardware information (32 or 64bit). Look for the data "Organisation type", it must be 64 flake.

check-hardware-architecture-x64

Step2 - Enable Linux subsystem to deploy Linux on Windows x

--> Enable windows subsystem for Linux (WSL) using PowerShell

Open up Powershell window "Run as administrator" from the search bar and blazon this command to enable Linux subsystem for Windows 10 feature.

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

once the command is successful, restart your car .

--> Enable windows subsystem for Linux using Graphical user interface (GUI)

  • Search for "Plow Windows Features on or off" in the windows search bar.
  • Open and scroll down - Select the "Windows subsystem for Linux" box and click OK. Restart your system.

enable-wsl-gui-to-install-linux-on-windows10

Step3 - Download your favourite Linux Distro

Download your favourite Linux distro from the control line or Microsoft store, I will download Ubuntu twenty.04 from the Power Shell command line. Supersede "wslubuntu2004" with your "distro name" in the control.

Cheque out the Microsoft site to download manually.

  • Ubuntu sixteen.04 LTS
  • Ubuntu eighteen.04 LTS
  • openSUSE Leap 42
  • Ubuntu xx.04 LTS
  • SUSE Linux Enterprise Server 12 SP5
  • SUSE Linux Enterprise Server 15 SP1
  • Kali Linux
  • Debian GNU/Linux
  • Fedora Remix for WSL
  • Pengwin
  • Pengwin Enterprise
  • Tall WSL
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing

Become to your Downloads directory using the cd command, Renameyour distro file in Powershell panel.

For example

Ubuntu_2004.2020.424.0_x64.appx renamed to ubuntu.zippo

Rename-Item            .\Ubuntu_2004.2020.424.0_x64.appx            .\Ubuntu.zip          

Extract zip file from Powershell (PS) window.

                          Aggrandize-Archive              .\Ubuntu.zip .\Ubuntu          

At present change to the Ubuntu or distro directory using "cd" command and launch your "distro-proper name.exe", "Ubuntu2004.exe" in my example.

Linux-on-windows10-launch

Step4 - Provide your credentials

Once the installation will end successfully, it will ask for a username and countersign for your Linux distro, so provide as per your preference.

enter-Username-password-wsl-windows10

Step5 - Validate your favourite Linux on windows ten

Search your "Distro name" in the Windows search bar and click "open up". and yous will exist in your favourite Linux prompt.

ubuntu-20-04-launch-linux-windows10


Steps to update WSL1 to WSL2 kernel in Windows ten

  1. Check your windows version
  2. Check for Second Level Accost Translation (SLAT) using systeminfo command.
  3. Enable Linux subsystem for Windows 10 characteristic and restart your machine
  4. Enable the "VM (Virtual motorcar) platform" component and restart your machine
  5. Install wsl2 Kernel
  6. Gear up WSL2 equally your default version
  7. Install your favourite distro from the Microsoft Store app and Launch

Step6 - Check your windows version and compages

Follow the instructions of "Step1" to check the windows version and 64bit architecture.

Step7 -Check for Second Level Address Translation (SLAT) for WSL2

The 64-bit processor with SLAT is the key requirement for WSL2. Run the systeminfo control and verify. If yous don't have SLAT back up, and so WSL2 will not work in your system.

Step8 - Enable Linux subsystem to install Linux on Windows 10

Enable Linux subsystem for Windows 10 feature and restart your machine every bit per Step2.

Step9 - Enable virtualization

--> Enable virtual machine platform  feature using PowerShell

Enable the " VM (Virtual motorcar) platform " component in the PowerShell panel and restart your machine.

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Output

Deployment Paradigm Servicing and Management tool
Version: 10.0.19041.329

Image Version: x.0.19041.388

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.

--> Enable virtual machine platform (Virtualization) feature using GUI

  • Search for "Turn Windows Features on or off" in the windows search bar.
  • Open and scroll downward - Select the "Virtual machine platform" box and click OK. Now restart your machine.

enable-virtual-machine-platform-windows10

Step10 - Run Kernel installer

Install WSL2 Kernel every bit WSL2 requires an update to its kernel component. Download kernel by visiting "https://aka.ms/wsl2kernel" or click here.

Once the download completes, run the ".msi" installer and complete the wizard.

wsl-kernel-setup-to-install-linux-windows10

Step11 - Change WSL version

Set WSL2 every bit your default version and bank check your version. Update from WSL1 to WSL2 may take some fourth dimension to complete.

wsl --set-default-version two

Note

If wsl --fix-default-version ends upwards as an invalid control, just enter wsl --assist and provide control every bit listed in help. If the --set up-default-version is non listed, ways it'southward not supported past your windows10 build and endeavor updating it to version 2004, Build 19041 or higher.

Step12 - Install Linux on Windows x using GUI

If you are working on the GUI (Graphical user interface), expect for your favourite Linux distro from Microsoft Store, open "Microsoft store" from the search console

Microsoft-store-ubuntu

Click on Get to download and install your distro, mine is Ubuntu 18.04 in case of GUI

install-linux-windows10
Download your Ubuntu

Click on Launch after download completes, it will ask for username and password for your Linux distro, so provide equally per your preference.

Username-password

Search your "Distro name" in the windows search bar and click "open up". I can see both Ubuntu xviii.04 and Ubuntu 20.04 equally installed using GUI and Control-line respectively.

launch-linux-windows10

Enjoy Linux on Windows 10.

install-linux-windows10-wsl

let's check the WSL version for Ubuntu 20.04 and Ubuntu xviii.04. It must be WSL1 for ubuntu 20.04 and WSL2 for ubuntu xviii.04 afterwards the upgrade.

wsl --list --verbose

chek-wsl-version

How to Uninstall Linux Distro (WSL) from windows 10

Step13 - Open up PowerShell and remove Distro package

Open up PowerShell "Run equally administrator" and run the below-mentioned command with your distro to list package name.

Get-AppxPackage *distro-name*

For Example Ubuntu in my case

Get-AppxPackage *ubuntu*

search ubuntu package wsl

Make a note of "your distro package proper noun" equally highlighted in screenshot and Remove parcel with "Remove-AppxPackage" command.

Example

Get-AppxPackage "CanonicalGroupLimited.Ubuntu18.04onWindows" | Remove-AppxPackage

How to Disable WSL (Windows Subsystem for Linux) feature

Step14 - Disable Windows subsystem from PowerShell

Open Powershell, "Run every bit ambassador" and execute the beneath-mentioned control, once you have completed distro parcel removal in step12.

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Press "Y" to disable information technology.

Disable wsl feature windows10

Information technology will restart your reckoner and you are done.

Step15 - Disable Windows subsystem for Linux from GUI.

  • Search for "Turn Windows Features on or off" in the windows search bar.
  • Open up and scroll down - Remove the checkmark from the "Windows subsystem for Linux" box and click OK. Restart your system.

disable-wsl-windows10

Note*

All the above-mentioned steps are applicable to "Install Linux on Windows 2019 using WSL" as well.

Common errors and solution regarding WSL

ane# Fix for Error: 0x80040306

This error may occur during installation because Microsoft doesn't back up legacy panel. Then, to resolve this issue, you have to disable the legacy console.

Open Control prompt by typing "cmd.exe" -> Open properties past correct-clicking title bar -> Uncheck use legacy console in cmd backdrop - and then click ok.

ii# Fix for Error: 0x80040154

This fault may occur after a windows update, which sometimes results in disabling the windows subsystem for the Linux feature. So, to fix this issue, you just need to follow step ii of this tutorial.

three# Ready for "The referenced associates could not be constitute"

You may face this mistake while enabling WSL optional features. This may occur due to the bad installation. So to resolve this, you may try updating Windows to fix information technology or yous may need to reinstall windows 10.

iv# Fix for "Error: 0x1bc while setting WSL default version ii"

This error may occur while executing footstep 10 of this tutorial.  Follow step nine of this tutorial (install kernel) to go this fix. If your CPU doesn't support SLAT (second-level address translation). Then besides, you won't be able to upgrade to WSL2.

Video

Install Linux on Windows ten using (wsl1 or wsl2) update 2020

Summary Annotation

I have shown yous, "How to install Linux on Windows 10 with WSL1", and How to upgrade your WSL1 to WSL2 with the kernel upgrade and set up WSL2 every bit your default version.

If you liked this article, please share information technology on your social media and annotate, if you are facing any issue during installation.

Enjoy your favourite Linux on Windows, who knows in future, Windows volition be provided as a subsystem to Linux.

Signing off with this thought 💡

Source: https://cloudlinuxtech.com/install-linux-on-windows-10-wsl/

Posted by: caricoevelf1974.blogspot.com

0 Response to "How To Install Windows Subsystem For Linux On Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel