WSL¶
Windows-Subsystem-Linux
Active Requirement Services¶
UI mode¶
- win + r
- optionalfeatures
- check Windows Subsystem for Linux
- check Virtual Machine Platform
CLI mode¶
Check the requirement service first
"Microsoft-Windows-Subsystem-Linux", "VirtualMachinePlatform" | ForEach-Object { Get-WindowsOptionalFeature -Online -FeatureName $_ | Select-Object FeatureName, State }
Enable them
Enable-WindowsOptionalFeature -Online -FeatureName @("Microsoft-Windows-Subsystem-Linux", "VirtualMachinePlatform") -All -NoRestart
Pre-Configuration (if need)¶
Windows Hyper-V must be enabled except this one
off hypervisiorlaunchtype
Download¶
- Open the "Microsoft Store Ubuntu" page and get the Ubuntu product ID
- Open the https://store.rg-adguard.net and follow this instructions
- You also use another dist like Alpine, Arch, Fedora and ...
Install Manually¶
Here's how to manually install the Ubuntu WSL distribution you've downloaded:
-
Unblock the File (if downloaded from web):
-
Install via PowerShell:
-
Launch Ubuntu:
- From Start Menu: Search for "Ubuntu 24.04"
-
Or via PowerShell:
Post-Installation Setup¶
-
Initialize User Account:
-
Switch to WSL2 (if needed):
-
Update Packages:
Recommended Folder Structure¶
C:\Users\YourName\
├── WSL/
│ ├── Ubuntu-24.04/ ← WSL virtual disk here
│ └── Downloads/ ← Store .appx/.tar.gz files here
Install and Update from CLI¶
Get the list of available linux distributions
Install your favorite distro
Update new version of WSL
Delete the Installed Dist¶
Set Default Distro¶
Restart Network¶
Important Note¶
Unfortunately when you set your region to Iran WSL can't to connect to microsoft store server and download the distro that you selected, as well as it doesn't give you an appropriate error message.