loading...
Cover image for WSL+UBUNTU

WSL+UBUNTU

smashse profile image Anderson Gama Updated on ・1 min read

#WSL+UBUNTU

Enable Virtual Machine Platform

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

Enable Windows Subsystem Linux

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

Update Windows Subsystem Linux

Invoke-WebRequest -Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile WSLUpdate.msi -UseBasicParsing
msiexec.exe /package WSLUpdate.msi /quiet

Set Default Version

wsl --set-default-version 2

Download And Import Ubuntu 20.04

Create Folder For ROOTFS

mkdir -p $env:userprofile/Ubuntu/Focal/Ubuntu-20.04

Download ROOTFS Image For WSL

Invoke-WebRequest -Uri https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-wsl.rootfs.tar.gz -OutFile $env:userprofile/Ubuntu/Focal/Ubuntu-20.04.tar.gz -UseBasicParsing

Import ROOTFS Image For WSL

wsl --import Ubuntu-20.04 $env:userprofile/Ubuntu/Focal/Ubuntu-20.04 $env:userprofile/Ubuntu/Focal/Ubuntu-20.04.tar.gz

List Distributions

wsl --list --all

Set Default Distribution

wsl --setdefault Ubuntu-20.04

List All Distributions And Version

wsl --list --all

Run Distribution

wsl --distribution Ubuntu-20.04

OR

wsl

Sources:
https://docs.microsoft.com/pt-br/windows/wsl/install-win10
https://docs.microsoft.com/en-us/windows/wsl/install-manual
https://wiki.ubuntu.com/WSL

Posted on by:

smashse profile

Anderson Gama

@smashse

Pai, Nerd, Progressista e Nordestino em Santa Catarina, Brasil. Gosto de livros, hq's/mangás, filmes e séries SyFy.

Discussion

markdown guide