DEV Community

Cover image for WSL+UBUNTU
Anderson Gama
Anderson Gama

Posted on • Edited on

5 2

WSL+UBUNTU

#WSL+UBUNTU

Enable Virtual Machine Platform

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enter fullscreen mode Exit fullscreen mode

Enable Windows Subsystem Linux

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

Update Windows Subsystem Linux

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

Set Default Version

wsl --set-default-version 2
Enter fullscreen mode Exit fullscreen mode

Download And Import Ubuntu 20.04

Create Folder For ROOTFS

mkdir -p $env:userprofile/Ubuntu/Focal/Ubuntu-20.04
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

List Distributions

wsl --list --all
Enter fullscreen mode Exit fullscreen mode

Set Default Distribution

wsl --setdefault Ubuntu-20.04
Enter fullscreen mode Exit fullscreen mode

List All Distributions And Version

wsl --list --all
Enter fullscreen mode Exit fullscreen mode

Run Distribution

wsl --distribution Ubuntu-20.04
Enter fullscreen mode Exit fullscreen mode

OR

wsl
Enter fullscreen mode Exit fullscreen mode

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

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay