== Setup ==
1.# In an Admin PowerShell session, run `dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart`
2. If you want to use hardware virtualization stuff then also run `dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart` but honestly I've never yet once done this, especially since I'm often using Windows in a VM already and nesting gets . . . tricky. Conversely, to expressly use WSL 1 instead and not have to worry about this, `wsl --set-default-version 1`.# Consider virtualization levels:
## If you want to use hardware virtualization stuff then also run `dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart` but honestly I've never yet once done this, especially since I'm often using Windows in a VM already and nesting gets . 3. Now (maybe after a restart) you should have the `wsl` command available to you. Get a list of distros with `wsl --list --online`tricky.
## Conversely, to expressly use WSL1 instead and not have to worry about this, `wsl --set-default-version 1` (newer versions of Windows will default to WSL2).
# Now (maybe after a restart; 4verified not necessary using WSL1 on Windows 11) you should have the `wsl` command available to you. Get a list of distros with `wsl --list --online`
# Install your distro of choice with `wsl --install -d distroname`
== Official docs (not always up to date) ==
* https://docs.microsoft.com/en-us/windows/wsl/install
* https://docs.microsoft.com/en-us/windows/wsl/install-manual
* https://docs.microsoft.com/en-us/windows/wsl/install-on-server
== Issues ==
Using something like `rsync` on the filesystem outside of WSL (ex. something on `/mnt/c`, where the `C:\` drive is automounted by default) will throw errors because the user doesn't have permissions to change some file properties. See https://github.com/microsoft/WSL/issues/3187#issuecomment-388904048, the lazy solution however is to just use `sudo` in those instances.