Step 1: Install WSL (Windows Subsystem for Linux)

  1. Open your "Powershell" program as an administrator.
    • Type "powershell" into your Windows 10 search bar.
    • Click on "Run as Administrator"
    • If you don't see the same thing as the image, you might need to right-click on the App and then select "Run as Administrator"
  2. When Powershell opens, paste and run this command:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Step 2: Install the Ubuntu app

  1. Open the "Microsoft Store" and search for "Ubuntu" within the store.
  2. Select the app just named "Ubuntu", you can ignore the ones with version numbers.
  3. Click the "Get" button
  4. When finished downloading, click "Launch"
  5. Once everything starts up, use m2XXXXX as your username and any password. You can pick an easy short password for ease of use. There isn't much reason to password protect this since it's already password protected by your Windows 10 OS.

Step 3: Install Xming

Xming is a program that lets you display graphical interfaces.

  1. Visit Xming
  2. Click the green Download button and select a place to save the file (if it prompts you).
  3. After it's downloaded, run the .exe installer file and click through the button promtps. Note: The app isn't "Microsoft-verified" so you may have to adjust your computer's settings to let you finish the install.

Step 4: Directory and file setup

  1. Let's setup your Ubuntu terminal so it's easy to access the files in your Windows directory. Open Ubuntu on your laptop if it is not already open. Copy/paste the entire following text into your terminal and hit enter.
    sed -i.bak s/"@.h...033.00m.."// .bashrc;
    ln -s "/mnt/c/Users/`whoami`/Desktop" Desktop;
    ln -s "/mnt/c/Users/`whoami`/Documents" Documents;
    ln -s "/mnt/c/Users/`whoami`/Downloads" Downloads
  2. Close and restart the application. When it starts up, you should see this (but with your username not 'bhawkins'):

    Now, if you ls in the terminal you will see folders as in the image above. These folders are the same as your Windows Desktop, Documents, and Downloads folders.
  3. If you mkdir Documents/ic211 and then open your Windows file explorer, you will see a ic211 folder inside your Documents folder.
  4. Build your file structure for the course like you were using a lab machine, except this time you can use any Windows based editor you want for to write your code (Notepad++, Atom, Emacs, etc...). Then use the Ubuntu terminal to compile and run your programs the same way that you have been all semester.

Step 5: Set up your ~/bin folder and environment variables

Copy/paste the following text into your terminal and hit enter.

mkdir ~/bin; printf '\nexport PATH="~/bin:$PATH"\nexport DISPLAY=:0\n' >> ~/.bashrc

Step 6: Install enscript and ghostscript

Copy/paste the following text into your terminal and hit enter.

sudo apt install enscript ghostscript -y

Step 7: Install the JDK and download codeprint

Follow the instructions on the Resources page for these items.

Step 8: Download your submit script

  1. Go to submit.cs.usna.edu (If you are off the yard, do so via the USNA SSL VPN Page)
  2. Once you login, click on your username to open the menu:
  3. Click the "Retrieve Personalized Scripts" and follow the installation guide.
Note: You will have to be on the USNA network or connected to the USNA VPN with the AnyConnect app to use the submit script.

Step 9: Update software packages Ubuntu

Run the below command to update all the software packages in your Ubuntu app.

sudo apt update; sudo apt upgrade -y

Note that you should periodically run this command to keep your software up to date.