Step 6.5 of 7 - Windows Setup
This guide will walk you through the process of setting up your Windows laptop for coursework at LearningFuze. The steps need to be completed in the order provided. There are some video clips, pictures, and commands in this guide, but be sure to read all instructions thoroughly so you don't accidentally skip a step.
Check System Requirements
First check to make sure that your Windows laptop meets these system requirements:
- Computer* less than 4 years old (depending on how fast it is)
- 64-bit Intel or AMD processor
- 8GB RAM minimum, 16GB recommended
- 16GB of free disk space minimum
- Windows 10 version number 2004, build 19041 (or later) or windows 11
A laptop* is required for in-person LearningFuze courses.
If your Windows 10 version is older than version number 2004, please update it now before continuing.
You can verify your version of Windows 10 by following these steps. You can update your version of Windows using the built-in Check for Updates app.
Install 7zip
The LearningFuze curriculum is delivered to you as .tar.gz
files. To open these files, you'll need a program named 7zip. You can get the 64-bit .exe
installer from the official 7zip website.
Run the 7zip installer you downloaded. It's pretty quick, just click through the prompts.
Install Git Bash
At LearningFuze, you will use Git and GitHub to turn in your coursework, just like a professional developer.
To download your code from GitHub, you will need Git Bash installed. You can get the 64-bit Git for Windows Setup from the official Git website.
Once downloaded, run the installer. There are a lot of screens, but just click through the prompts. At the end, ignore launching Git Bash and viewing the release notes by unchecking the boxes.
Install Docker Desktop for Windows
At LearningFuze, we use Docker to create a professional-grade development sandbox on your computer. Docker must be running in the background to make this possible. This section of the guide walks you through the process of installing Docker on your PC.
⚠️ NOTE ⚠️
Docker requires something called "hardware assisted virtualization". If you receive an error message about this, you can learn how to enable it at the following link.
If you are unable to get virtualization working on your PC, contact your class's instructor.
You can get Docker Desktop for Windows from the official Docker website. Note: you do not need to sign up for anything to use Docker, so if you are asked to sign into DockerHub or create a Docker account, you can ignore it.
Once downloaded, run the installer. When prompted, CHECK "Install required Windows components for WSL 2" and UNCHECK "Add shortcut to desktop". After the installation completes, restart your PC.
Install WSL2 Kernel and Accept Docker Agreement
If you have not restarted your laptop, do so now.
Note: Docker will eventually pop up a Service Agreement screen after you restart, but leave it alone for now.
After rebooting your laptop, check your system tray in the right side of the task bar. A small whale icon should appear to indicate that Docker is starting.
Before doing anything else, download Microsoft's WSL2 kernel here. Docker will need this in order to work. Once the kernel installer is downloaded, run it. After that, agree to Docker's service agreement. When docker finishes starting, the Docker Dashboard may offer a tutorial. Skip the tutorial. You can close the Docker Dashboard now.
Run our Setup Script
At LearningFuze, you'll be using a customized configuration of Microsoft's Visual Studio Code. If you already have Visual Studio Code installed, it shouldn't cause any conflicts, but you will be using our custom version for class.
The following command requires that Docker is running. You can confirm the status of Docker by looking in the system tray on the right of your taskbar. There will be a little whale icon, but it should have blocks on top now, and the icon should not be animating.
Open your PC's built-in PowerShell application as an Administrator, then paste in the following command and press Enter.
iwr -UseBasicParsing 'https://lfz-static.s3.us-west-1.amazonaws.com/lfz-code/windows.ps1' | iex
The setup script will do the following:
- verify that you have the required packages installed
- verify that you have Docker installed
- pull the Docker image used by our development sandbox
- download a standalone, customized Visual Studio Code editor
- generate a dedicated SSH key for your computer to authenticate with GitHub
- add a shortcut for
lfz-code
to your desktop
After the installation completes successfully, an icon for lfz-code
should appear on your desktop.
Restart your laptop again.
⚠️ If the setup script fails
If the setup script fails, PowerShell will show you an error message. Find the lfz-code.log
file on your Desktop and send it to an instructor via Slack right away so we can figure out what went wrong and advise you on the next steps to take.
Add SSH Key to GitHub
Once the setup script has completed successfully and you have restarted your Computer, proceed with the following instructions.
Open the Git Bash app and paste in the following command, then press Enter. When you ran the setup script, a unique key was generated specifically for your PC.
cat ~/.ssh/github_rsa.pub
Your SSH public key for GitHub should print, like in the video below. This key was created during the setup script and will be used to authenticate your laptop with GitHub so that you can freely download and upload your code.
Sign into your GitHub account and go to https://github.com/settings/keys. Click New SSH key on GitHub. Give the new key a name that will remind you which computer you pasted the key from. Copy-paste your key from Git Bash into GitHub and click Add SSH key. If given the option, choose Authentication Key as the Key type.
To confirm that your SSH key was properly added to GitHub, go back to the Git Bash and paste in the following command, then press Enter. Because this is the first time that you are connecting your laptop to GitHub, you will likely receive a confirmation message asking you if you want to continue connecting. Type yes
and press Enter. After that, you should receive a message confirming that you've successfully authenticated.
ssh git@github.com
Add your name and email address to Git
After your SSH key has been successfully uploaded to GitHub and you have verified that your PC authenticates successfully, update Git to remember your name and email address. This should be your full name and the email address you used to sign up with GitHub.
Enter the following commands into Git Bash to set your name and email address, but use your own name and email instead of the example.
git config --global user.name "Joe King"
git config --global user.email "joe@email.org"
You can check for typos with the following command. You may see some other values print, but the most important things to check are your name and email address. You can fix typos by running the above commands again.
git config --global --list
You can now exit Git Bash.
Clone your solutions repository from GitHub
When you signed into the Learning Management System, a new repository was create for you on your GitHub account. If you visit your profile on GitHub and then go to the Repositories tab, you should see it.
The repository will be named xxxx-code-solutions
where the xxxx
is your cohort number. For example, if student was enrolled in our Web Dev Prep Class for October, 2020, their repository was named prep-1020-code-solutions. Your repository's name will be similar, but slightly different depending on which class you are enrolled in.
Note: If you cannot find your repository on GitHub, stop and notify an instructor via Slack.
To clone
In this step you are going to download a copy of this repository onto your computer.
- Be signed into your personal GitHub account at https://github.com
- Go to your Repositories page
- Find your code solutions repository and click on it
- Open the
lfz-code
app - Click the blue icon in the bottom-left of the Visual Studio Code window and choose Clone Repository in Container Volume...
- When Visual Studio Code warns you about arbitrary code execution, click Got it.
- Back on your repository page, click the Code button and copy the SSH URL from your repository. Note: we've recently received messages that students were unable to use their SSH URL to clone their repository. If you get a permissions error while trying to clone, please try the HTTPS URL.
- Paste the URL back into the box in Visual Studio Code and press Enter.
- Wait. The initial download might take a minute or two.
- When you see the message saying "Done. Press any key to close the terminal." press any key :)
Note: we've recently received messages that students were unable to use their SSH URL to clone their repository. If you get a permissions error while trying to clone, please try the HTTPS URL.
Great! If you ran into problems, please contact an instructor via Slack. Otherwise, you have successfully cloned your repository!
Closing and reopening your solutions repository
This section of the guide shows you how to open your solutions back up after you have closed them. Visual Studio Code keeps a history of which repositories, files, and projects you have opened. You can see by following these steps.
- Close Visual Studio Code.
- Reopen
lfz-code
. - Go to the File menu.
- Go to Open Recent...
- Choose your recently-closed code solutions repository.
- Wait a moment.
Nice! Your repository should open back up again. This time it should open much faster. Any time you want to return to your solutions repository, you can get to it via File > Open Recent....