Back to Setup

Windows Ubuntu

_partials/windows_ubuntu.md

latest3.1 KB
Original Source

Ubuntu

Installation

After restarting you computer, you should see a terminal window saying WSL is resuming the Ubuntu installation process. When it's done, Ubuntu will be launched.

<details> <summary>Troubleshooting for Windows 10 (only if needed, check with a TA) </summary>

If the Ubuntu installation did not resume, first try it again: launch Powershell or the Command Prompt again and run wsl --install again.

If you are running Windows 10, let's install Ubuntu throught the Microsoft Store:

  • Click on Start
  • Type Microsoft Store
  • Click on Microsoft Store in the list
  • Search for Ubuntu in the search bar
  • Select version without any number, just plain "Ubuntu"
  • Click on Get

:warning: Don't install Ubuntu 18.04 LTS nor Ubuntu 20.04!

<details> <summary>Uninstall wrong versions of Ubuntu</summary>

To uninstall a wrong version of Ubuntu, you just have to go to the Installed Program List of Windows 10:

  • Press Windows + R
  • Type ms-settings:appsfeatures
  • Press Enter

Find the software to uninstall and click on the uninstall button.

</details>

Once the installation is finished, the Get button becomes a Open button: click on it.

</details>

First launch

At first launch, you will be asked some information:

  • Choose a username:
    • one word
    • lowercase
    • no special characters
    • for example: lewagon or your firstname
  • Choose a password
  • Confirm your password

:warning: When you type your password, nothing will show up on the screen, that's normal. This is a security feature to mask not only your password as a whole but also its length. Just type your password and when you're done, press Enter.

Check the WSL version of Ubuntu

  • Press Windows + R
  • Type cmd
  • Press Enter

Type the following command:

bash
wsl -l -v

:heavy_check_mark: If the version of Ubuntu WSL is 2, you are good to go :+1:

:x: If the version of Ubuntu WSL is 1, we will need to convert it to version 2.

<details> <summary>Convert Ubuntu WSL V1 to V2</summary>

In the Command Prompt window, type:

bash
wsl --set-version Ubuntu 2

:heavy_check_mark: After a few seconds, you should get the following message: The conversion is complete.

:x: If it does not work, we need to be sure that Ubuntu files are not compressed.

<details> <summary>Check for Uncompressed Files</summary>
  • Press Windows + R
  • Type %localappdata%\Packages
  • Press Enter
  • Open the folder named CanonicalGroupLimited.UbuntuonWindows...
  • Right Click on the LocalState folder
  • Click on Properties
  • Click on Advanced
  • Make sure that the option Compress content is not ticked, then click on Ok.

Apply changes to this folder only and try to convert the Ubuntu WSL version again.

:x: If the conversion still does not work, please contact a teacher.

</details>

You can close this terminal now.

</details>

Check your username

Type this in the Ubuntu terminal:

bash
whoami

It should return the username you chose before.

:x: It if says root, contact a TA before continuing!