# Installation (Windows WSL2)

## Windows & WSL2 (Ubuntu) Installation Instructions

#### [Google Chrome](https://www.google.com/intl/en_au/chrome/)

#### [Visual Studio Code](https://code.visualstudio.com/Download)

#### [Windows Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-au\&gl=au)

Install the Terminal app above and pin it to your taskbar.

#### WSL2 Ubuntu (Windows)

For more info: [RTFM](https://docs.microsoft.com/en-us/windows/wsl/install)

1. In the Terminal app (PowerShell), run:

   ```
   wsl --install -d Ubuntu
   ```

   *The set up process will ask you for a username and a password. Make sure you add both, even a short password will do (this user is separate from your Windows user). You might run into issues later without a user with a password.*
2. Check that you're running WSL2 not WSL1, run:

   ```
   wsl -l -v
   ```

   You should see something like:

   ```
   PS C:\Users\dido> wsl -l -v
   NAME      STATE           VERSION
   * Ubuntu    Running         2
   ```

   If your VERSION says `1`, run:

   ```
   wsl --set-version Ubuntu 2
   ```
3. Set Ubuntu as default profile for Windows Terminal 3a. Navigate to **Windows Terminal**'s settings.\
   3b. Change **Default profile** to Ubuntu\
   3c. Click on **Ubuntu** profile on the left sidebar menu, then click **Command line** and change to `wsl.exe ~ -d Ubuntu` if it doesn't already show something similar.\
   3d. Click **Advanced** at the bottom, click **Bell notification style**, and untick Audible (removes the annoying bell sound).

#### ZSH

1. Install the latest version of the Z shell:

   ```
   sudo apt install zsh
   ```
2. Use zsh as your default shell:

   ```
   chsh -s $(which zsh)
   ```
3. Restart the terminal. Press "q" for "Quit and do nothing" if asked.
4. Install [oh-my-zsh](https://ohmyz.sh/):

   ```
   sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
   ```

#### `git` and `tree`

Install the `git` and `tree` packages.

```
sudo apt install git tree
```

#### VSCode `code` shortcut

1. In your terminal, run:

   ```
   which code
   ```

   if it shows you a path to the `code` program, you're good to go otherwise proceed to step 2.
2. Launch Visual Studio Code.

* Press `^ (Control) + Shift + p`.
* In the input box type `install code` and press Enter.
* Try step 1 again.

#### Update Ubuntu Packages

**RUN THIS AFTER CLASS IS OVER. DO NOT DO THIS DURING CLASS TIME.**

```
sudo apt update && sudo apt upgrade
```
