Skip to content

Set up WSL development environment

Luke Vincent edited this page Jan 13, 2023 · 9 revisions

Microsoft guide to setting up WSL

  1. Install Windows Terminal from the Microsoft store

  2. Either

    • Install Ubuntu 20.04.5 LTS from the Microsoft store

      Or

    • In powershell run the command wsl --install -d Ubuntu-20.04. Run wsl --list –online to list possible distributions that can be used with WSL

  3. Set a username and password etc (click open if installed via Microsoft Store first)

  4. Check that 20.04 WSL Version 2 is your default environment by running in Powershell wsl -l –v

    • If not set correctly, run in Powershell wsl --set-version Ubuntu-20.04 2
  5. To enable copy/pasting in Ubuntu: right-click on the top bar -> properties -> tick 'Use Ctrl+Shift+C/V as Copy/Paste'.

  6. Install your basic development tools by running in Ubuntu (in order)

    • sudo apt update

    • sudo apt install nodejs git npm curl

    • sudo npm install -g yarn

    • curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

    • source ~/.bashrc

    • nvm install node

  7. Install google-chrome on WSL

    • In Ubuntu run google-chrome. A GUI window with linux chrome will open
    • if it doesn't open, run wsl --update and then wsl --shutdown in powershell. Get GUI working in WSL
  8. In windows Visual Studio Code install the extension Remote Development

    • if you want to use any other extension in WSL Ubuntu Land you will need to install the WSL version
  9. Clone repos in Ubuntu

  10. In Ubuntu navigate to repo and run code .

Clone this wiki locally