How to install Linux Subsystem on Windows 10


Last Updated on 25 de Maio, 2019 by Vítor Fernandes

Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in Executable and Linkable Format) natively on Windows 10 and Windows Server 2019.wikipedia

1 – Install Windows Subsystem for Linux.

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

2 – Enabling Virtual Machine feature.

Enable the Virtual Machine option in your computer BIOS, or else the command will fail.

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

3 – Setting WSL 2 as your default version.

You must install WSL2 Linux kernel X64 update package (direct link from Windows server).

wsl --set-default-version 2

4 – Install your Linux distribution of choice

Open the Microsoft Store and select your favorite Linux distribution.

The following links will open the Microsoft store page for each distribution:

Comparing WSL 1 and WSL 2.

WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 is not a traditional VM experience.

FeatureWSL 1WSL 2
Integration between Windows and Linux
Fast boot times
Small resource foot print
Runs with current versions of VMware and VirtualBox
Managed VM
Full Linux Kernel
Full system call compatibility
Performance across OS file systems

Getting WslRegisterDistribution failed with error: 0x80070422

The Windows Subsystem for Linux optional component is not enabled

Get-Service LxssManager | Restart-Service

Updating your system packages repository.

Don’t forget to enter your password (if necessary), or the task will fail!

sudo apt update & sudo apt upgrade -y

Installing a advanced packaging tool (APT) and GCC/g++ compilers.

More information regarding aptitude package and list build-essential packages.

sudo apt install aptitude -y && sudo apt install build-essential -y

Change to Windows desktop directory within Linux Subsystem

Use your username eg: duploclique within your driver letter disk eg: c

cd /mnt/c/users/duploclique/desktop

Deixe uma resposta

O seu endereço de email não será publicado. Campos obrigatórios marcados com *