Skip to content

Instantly share code, notes, and snippets.

@xgvargas
Created April 25, 2019 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xgvargas/5bc1f695c5c0bf78c2145bc4dceeb55f to your computer and use it in GitHub Desktop.
Save xgvargas/5bc1f695c5c0bf78c2145bc4dceeb55f to your computer and use it in GitHub Desktop.
WSL installation process

WSL

Enable WSL from PowerShell with Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux.

There are multiple way to download/install your distro. I'm lazy, so just go to Windows Store:

Use the GET button to download it. The actual installation will happen on first launch (so it will take some time). During the installation a user name will be requested, it can be anything (ie. do not need to be the same used on Windows).

Is a good idea to upgrade the system with sudo apt update && sudo apt upgrade -y before starting doing something important there.

You'll notice the system is really slow when doing file system access. That's because Windows Defender is intercepting our disk access (remember, the linux file system is actually a folder somewhere on your windows file system :( ).

You can navigate to %USERPROFILE%\AppData\Local\Packages on Windows side and search for a folder like CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc (in case you've installed Ubuntu). Copy the full path to this folder and add it to Windows Defender exclude list.

Open Windows Defender from the task bar. Then virus & threat protection, choose manage settings, finally select add or remove exclusions. Note that new versions of the linux distro will have a different path so you have to repeat this process after upgrades.

And the MOST important thing now: Never change any content on above folder from Windows side, this will break your linux filesystem.

From Linux side all your windows files are mounted at /mnt/c/. You can deal with then safely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment