Install and set up Windows subsystem for Linux (WSL)

Before starting, confirm that your Windows system on which you are installing WSL 2 meets all prerequisites, as outlined in the Microsoft documentation.

  1. Download and install WSL 2.

    • See Microsoft's documentation for installing WSL 2 here.

    The Ubuntu version to be installed is 22.04.

  2. After the WSL 2 installation is complete, open you can access the Windows file system using the following:

    /mnt/c

  3. To open the Windows File Explorer from WSL 2, in the terminal, type the following:

    cd/home

    explorer.exe

  4. The Windows path will have the following format:

    C:\Users\itron\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04onWindows_79rhkp1fndgsc\LocalState\rootfs

  5. It is possible to download Visual Studio Code here, and link it to WSL 2.

    After installing Visual Studio Code, you can access source code from WSL 2 by installing Visual Studio Code's WSL 2 plugin, available here.

    You can also install the C/C++ Plugin, available here.

  6. To open Code Directory in Visual Studio Code, type the following:

    $ cd <source_code_dir>

    $ code .

  7. Alternatively, a folder can be added from the Studio IDE.