This guide is for new users who need to set up their environment.
- Windows Users
- Mac & Linux Users
- Use terminal already installed on your system
- Let me (the instructor) or your ta's know if this needs updating
- Chromebook Users
- Text Editors
-
Open Powershell as Administrator
-
Enter the following command:
wsl --install
-
Reboot your machine
-
This should have also downloaded and installed a program called "Ubuntu", which you can find in your apps.
- If this is not true, perform the following steps:
- Go to Microsoft Store
- Search for "Ubuntu"
- Select "Get"
- Done
- Untested alternative to Windows Store:
- Open Powershell as Administrator
- Enter the following command:
wsl --install -d Ubuntu
-
When you first open WSL2, you will be greeted with something similar to the following:
- Create a username - do not use spaces or special characters
- Create a password - yes, it is taking your input. Press backspace a lot if you think you made a typo
- Resources:
- Common pitfalls:
- Windows is not fully up to date.
- Need to enable CPU virtualization in the BIOS. See the user manual for your computer
- Your username cannot have special characters or spaces or you will get a rules error
In later labs, you will need two terminals open. It is absolutely alright to open multiple instances of WSL2 Ubuntu, but it can be convenient to have a "tab" based setup. I recommend Windows Terminal
(can be found in the Windows Store) or MobaXTerm
(installation instructions below)
Download MobaXterm Home Edition: Installer Edition
- Extract the contents to your Desktop.
- Double-click to run the installer
- Once installed, run the program one time - this finishes the installation
- You can now delete the installation files
- Open Moba. You can now choose to run WSL Ubuntu
- To change terminals, go to Settings -> Configuration. Select the Terminal tab. In the dropdown at the bottom, change from
bash
toWSL Ubuntu
- To change terminals, go to Settings -> Configuration. Select the Terminal tab. In the dropdown at the bottom, change from
- Keep your SSH session "alive" - prevent timeouts from not interacting
Settings
->Configuration
. InSSH
tab, checkmark the box corresponding toSSH keepalive
If you do not have administrative privileges on your Windows system (or have a much older system), you will need to install MobaXTerm (step 3) and install Cygutils (instructions below) in order to perform the labs.
- In Moba, select the Packages icon at the top.
- Wait for the package menu to appear.
- In the search bar, type "cygutils". Select the package from the result listings
- Select Install / Update.
- Restart Moba. Start Local Terminal should work
- In the toolbar for Moba, go to Settings -> Configuration
- In the General tab, check the following two fields are populated with the following values:
- Persistent home directory:
_MyDocuments_\MobaXterm\home
- Persistent root directory:
_MyDocuments_\MobaXterm\slash
- Persistent home directory:
I recommend Visual Studio Code as a cross platform solution (plus dark mode looks cool). You can also use any default text editor on your system (Notepad, Notepad++, or whatever Mac's have).
- You should have a terminal already installed. Hunt it down ;)
This guide here refers to a Chrome Extension for SSH connections
- To use your AWS Educate Private Key, you'll need to select "Import..." and browse to your
key file - you can then select your key from the dropdown. - You may need to make a "failed" connection in order to get the permission to access files
questions to pop up.
- Error message:
The requested operation could not be completed due to a virtual disk system limitation.
Virtual hard disk files must be uncompressed and unencrypted and must not be sparse.
- Follow WSL2 VHD Issue Guide