Skip to content

Instantly share code, notes, and snippets.

@lrivallain
Last active November 26, 2021 13:28
Show Gist options
  • Save lrivallain/2ec876b83efbb80efc5299b36e102084 to your computer and use it in GitHub Desktop.
Save lrivallain/2ec876b83efbb80efc5299b36e102084 to your computer and use it in GitHub Desktop.
Quickstart WSL2+Ubuntu
  1. Activate WSL and VM features:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  1. Reboot
  2. Download installer: Paquet d’installation pour les systèmes x64
  3. Define WSL default version
wsl --set-default-version 2
  1. From Windows Store: Install Ubuntu
  2. Check installation:
wsl --list --verbose
  1. Connect to the first instance:
wsl
  1. Fix permission issues (with git for example) on windows shared disks
### From the Ubuntu VM:

# For current session
sudo umount /mnt/c
sudo mount -t drvfs C: /mnt/c -o metadata

# For long term
sudo vi /etc/wsl.com # create it

# Add this:
[automount]
options = "metadata"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment