Virtual Machine (VM) Setup Instructions

This semester we are fortuate to have remote VM’s provided for us, so minimal software installation is required on your personal computer.

Connecting to your VM:

You can connect and work with your virtual machine in a variety of ways. While you can do all of the work for the class with only one of these methods, each method has its own trade offs. Review or try out each one to see what works best for you (I will most likely us SSH and the VS Code methods primarily in class). All of the methods will require you to perform terminal operations, so regardless of which you choose, it is best to get comfortable with the command line interface (CLI) sooner rather than later. It is important to note that you must either be on campus, or off campus using the College of Wooster VPN to access your VM.

SSH

Provides a CLI to your virtual machine allowing you to run OS commands as well as edit, compile, and run code. While it may seem a bit daunting at first, the CLI is very powerful and it is worth developing a comfortable familiarity with this method of operating system interaction.

macOS

Windows

Remote Desktop:

Provides a graphical remote desktop session. This will have a visual file explorer much link macOS/Windows and you can also install and use a graphical text editor on the VM (I recommend installing Visual Studio Code from the built-in Snap Store application). You will still need to run OS commands and compile/run your applications using the terminal. This can be a nice way to work, but note that the remote desktop session may lag (especially over the VPN) which can cause some frustration.

The easiest application to connect to a graphical desktop on your VM is Microsoft Remote Desktop. For macOS, you can download the Microsoft Remote Desktop app from the AppStore. Windows users already have it installed and can run the program by pressing the Windows key on your keyboard and typing in Remote Desktop. You can make a start menu/desktop shortcut to the program if you would like. Once you have the remote desktop application installed on your computer, open the application and create an connection to your VM. The host will be csci-21200-<wooster-username>.local.wooster.edu>.

VSCode:

This is a compromise between SSH and the Remote Desktop. Using an install of VSCode on your development computer of choice (and some supporting applications/extensions) you can access your VM’s file system through VSCode to edit and create source code files graphically using VSCode, while using the integrated terminal to run OS commands and compile/run your applications.

NOTE: For Windows users ONLY you need to install OpenSSH for Windows first!


Changing your Password:

You must change the default password for your VM after your first login. You can simply run the following command and follow the instructions

$ passwd

For security purposes, you will not see any text appear on the command line when you are typing passwords. You will need to use the force and trust that you are typing correctly

Do not forget this password or your will be unable to access your VM.


Installing the Required Software to the VM:

The apt tool on Ubuntu (and other Debian based Linux distributions) is how we can install software via the command line.


Git Setup:

If you do not already have a GitHub account, you MUST create one first.

  1. Download the GitHub CLI (command line client) Debian installer from: https://github.com/cli/cli/releases/download/v2.14.6/gh_2.14.6_linux_amd64.deb
    • If you are using the SSH connection method to interact with your server you will need to use a command line downloading program called wget
        $ wget https://github.com/cli/cli/releases/download/v2.14.6/gh_2.14.6_linux_amd64.deb
      
  2. Open a terminal and run the following command to install the GitHub command line client program (remember <path-to-package> is where you saved the downloaded file in the previous step)

    • sudo dpkg -i <path-to-deb-package>
  3. Run the command: gh auth login

    • When asked what account do you want to log into, use the arrow keys to select GitHub.com and press the Enter key

    • When prompted for your preferred protocol for Git operations, select HTTPS

    • When asked if you would like to authenticate to GitHub CLI

      • If you are using Remote Desktop, select Login with a browser and follow the instructions

      • If you are using SSH via Putty, macOS Terminal, or VS Code, select Paste an authentication token

        • Follow these instructions to create a personal access token on GitHub and paste that token into the command prompt

        • You do not need to set your personal access token to expire in 7 days, you can make it “permanent” and you can give your access token full GitHub permissions if you wish, but you will need at least repo, read:og, and workflow

  4. Configure Git
    $ git config --global user.name "<YOUR NAME>"
    $ git config --global user.email "<YOUR COLLEGE OF WOOSTER EMAIL>"
    

    Depending on which command line editor you installed:

    $ git config --global core.editor "emacs -nw"
    

    or

    $ git config --global core.editor vim