0. Check your Windows version
First, check your version of Windows by typing "winver" into your Windows 10 search bar. You must be on (at least) version 1909. If you are at version 20H2, you are fine.
If your Windows version is less than 1909, then you need to first update to version 1909 or directly to version 20H2 through Windows update:
- Click on Start button, then the "Settings" (the little gear option in the botton left)
- Choose "Update & Security"
- Choose "Windows Update"
- There should be ahyperlink that says "Check online for updates from Microsoft Update". Choose this.
- It should be looking for updates to install, including Windows 10 1909 and Windows 10 20H2
1. Enable WSL using PowerShell
- Open the Windows Powershell as an administrator
- Type "powershell" into your Windows 10 search bar at the bottom of the screen.
- Click "Run as Administrator", or right-click the PowerShell icon and go to "Run as Administrator".
- You probably have to click "yes" again when you are asked if you want to allow PowerShell
to make changes to your computer.
- When you get a command prompt in PowerShell, copy/paste this entire command and hit Enter:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
(Note, you can right-click in the Windows terminal to copy and paste.)
- Restart your computer.
2. Install Ubuntu and Windows Terminal from Microsoft
- Open the "Microsoft Store" from your Windows 10 search bar.
(Don't worry - the software we are asking you to install is all free!) If "Microsoft Store" does not work on your computer, see the the note below.
- Install Ubuntu 20.04 from the Microsoft Store
- Search for the app named "Ubuntu 20.04 LTS"
- Click the "Get" button (don't sign in if it asks)
- Install the app but do not launch it yet.
- Install "Windows Terminal" from the Microsoft Store in the same way.
Note: If "Microsoft Store" doesn't work in your laptop, please follow the
instructions below:
- Download Ubuntu_2004.2020.424.0_x64.appx
from Ubuntu. Double click the downloaded file, uncheck the "Launch when ready" checkbox and click "Install" in order to install Ubuntu
20.04 LTS. Do not launch the app yet.
- Go to Microsoft GitHub
page for Windows Terminal. From the page, find the link to
"Microsoft.WindowsTerminal_1.9.1942.0_8wekyb3d8bbwe.msixbundle" and download it.
Double click the downloaded file in order to install the Windows Terminal
3. Open Windows Terminal
- Start Ubuntu for the first time
- First, launch the Ubuntu application that you installed earlier
(it should be in your start menu now).
- This is the first time your Linux installation is running, so it will take a few
moments to get going.
- When prompted to choose a username, use your USNA username
such as
m241234 (change for your actual alpha)
- You can choose any short password you like. It doesn't need to be the same as your USNA password,
but you do need to remember what it is. This is just to protect your WSL installation inside of
Windows, so the password you choose doesn't need to be very strong.
- Once it's finished, type
exit to close the Ubuntu app.
- Open the Windows Terminal
- After you've launched the Ubuntu app once and chosen your username and password,
you'll never need to run that app directly again. Instead, we will access Ubuntu from the
Windows Terminal application, which is a little bit nicer, supports tabs, nice colors, etc.
- Go to your start menu and launch the Windows Terminal program
you installed earlier.
- This starts up (for now) in a Windows PowerShell. We don't want that!
Instead, click the little drop-down arrow near the top of the window. You should see
an option for Ubuntu - click it!
- Once you have an Ubuntu terminal running (with a little penguin at the top), you're
in your WSL installation.
4. Install and Launch VcXsrv
Install VcXsrv in Windows. This is a tool that will let you run graphical
programs from your WSL installation.
- Go to the VcXsrv homepage
- Click the green Download button and select a place to save the file (if it prompts you).
- After it's downloaded, run the .exe installer file and click through the button prompts.
Note: The app isn't "Microsoft-verified" so you may have to adjust your computer's settings to let you finish the install.
Launch VcXsrv
- Locate the XLaunch shortcut in the Start Menu and click it
- The setup wizard will start. Accept all the default options and click
Next, until you get to the last page of the wizard (the one with the
Finish button - do not click it yet)
- Click the "Save configuration" button and navigate to
C:\Users\mXXXXXX\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs\Startup folder to save the config.xlaunch file in
that location (so VcXsrv will launch at startup without asking for all the
options). mXXXXXX should be replaced with your alpha. See note below if you have problems finding that location
- Click on the Finish button
- Important: Whenever XLaunch starts, you will probably get
a warning window from Windows Firewall. When you see that, be sure to click to allow
the "XLaunch" program to use networking on local and public
networks (be sure to check both boxes).
- Note: When you want to save your config.xlaunch
file, you might need to type the path in the window that opens up (click
on the field that shows the curent directory), since
the AppData folder is hidden and might not be listed.
5. (Optional) Install Atom from the web
Install the Atom text editor in Windows. Atom is one of the text editors you
may use to write programs in this class, along with gvim and emacs.
- Go to the atom homepage
- Click the big Download button
- Run the downloaded file: AtomSetup-x64.exe