Enable the Virtual Machine feature in Windows (see screenshot below)
4.
Download the WSL2 update package
5.
Set WSL2 as your default Linux system
6.
Open Microsoft store, search for Ubuntu 20.04, and install it
7.
Launch the terminal and follow the prompt to create a new username/password (see screenshot below).
Screenshot: Enabling Virtual Machine feature in Windows:
Screenshot: Running Ubuntu 20.04 in Windows for the first time:
Step 2. Install NVM
Note: Copy these commands and then paste into WSL2 by right-clicking on the terminal.
Enter the following commands into your Ubuntu terminal:
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash # Download and install
source ~/.profile # Reload system environment
nvm install lts/erbium
Step 3. Editing Files in WSL2
In order to access your WSL2 file directory, run the following command in WSL2:
explorer.exe .
This will allow you to browse WSL2 as if it were another computer on a local network.
If you are using the WSL, you files for your experiment must be in the WSL, you can't use the WSL to run an experiment stored on the rest of your computer.
Using code editors
Different code editors (such as VSCode) will have commands that you can run to open them in the current directory (e.g., code .). This helps make for a better coding experience in the WSL.