Windows Subsystem Linux (WSL)β
Setupβ
To setup your optimal development environment on Linux its always a good idea to bootstrap your configurations.
I will install the following:
- Bash
- Node
- Git
- VSCode
- etc
Prerequisitesβ
By far the best resources for getting started with Windows Subsystem for Linux (WSL) is the Microsoft Docs.
-
You need to be on Windows version 1903 or higher, Build 18362 or higher.
-
If you donβt have Windows Pro you should be able to enable WSL 2 on Windows 10 home.
-
To check use the Windows run command Windows key + r (Win+r) and enter winver, youβll get a dialogue with your machine details on it, Iβm on version 2004 build 19041.
Install Ubuntuβ
Use Powershell as Adminβ
- Press Win + X and Select Powershell as Admin
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Restart Machine
Check Optional Features are Enabledβ
-
Control Panel > Programs and Features > Optional Features
-
[ ] Enable Developer Mode (Settings > Updates & Security)
- [ ] Turn on Windows SubSystem for Linux
- [ ] Turn on Virtual Machine Platform
- [ ]
Random Tipsβ
Shutdown WSLβ
Localhost not working?
wsl --shutdown
Change WSL Versionβ
Change between WSL versions
# wsl --set-version <distro> 2
# example
wsl --set-version Debian 2
List installed WSL Distrosβ
# wsl --list --verbose
wsl -l -v