Computer Setup Overview
In the early lectures and posted video on WSL, we discuss how to set up your computer for this course. This is just a summary of the process for quick reference. For details consult the lecture slides and videos.
Linux Environment
For this course, you will use any Linux environment you choose. I will use a Debian-based distribution like Ubuntu, so you may want to do the same to match the examples.
Recommendations:
For Windows, use Ubuntu 24.04 (or newer) or Debian on the Windows Subsystem for Linux (WSL). See this video on the setup.
For macOS on Apple Silicon, you have two options:
- Dual-boot with Asahi Linux. See this video on the setup.
- Run Ubuntu in a VM using UTM. See this guide for the setup process.
For macOS with an Intel CPU, you can use Ubuntu dual-boot or use a Virtual Box VM.
Install Software Tools
If you are using a Debian-based distribution, like Ubuntu, run the following commands.
sudo apt update
sudo apt -y install build-essential git valgrind gnuplot
While you are at it, you may want to update any other outdated packages with this command.
sudo apt upgrade
Recommended Text Editor
I recommend installing VSCodium as your text editor. It is Visual Studio Code, without all the propriety Microsoft stuff. If you are using WSL, you may either install VSCodium in WSL (in Linux) or install it in Windows and then use the Open Remote WSL extension to open any directory in Linux under WSL. I demonstrate this in the lecture on Basic Unix Commands.
Git
Most of all the assignments and resources will be accessed and submitted via the course repository.
Install git in your Linux environment (as shown in the previous section).
Set the global git configuration. Replace what is in the double quotes below.
bashgit config --global credential.helper store git config --global user.name "Your Name" git config --global user.email "you@student.csuniv.edu"
WARNING
Passwords will be saved as plain text on your computer.
Create a GitHub account (if needed) and log in. Submit your username to your instructor via Blackboard (Lab 0).
Create a GitHub Personal Access Token (Classic) to use as a password when pushing and pulling. (There are other authentication methods you may use instead, but public access tokens are the simplest to set up.)
- I suggest selecting "No expiration" for the token expiration.
- Select only
repo
as the scope of the token.
Set Up Personal Fork of the Repository
You are now ready to use the git repository for this course, which is hosted on GitHub.
Click the email link to become a collaborator with the course repository.
Fork the course repository.
Clone your fork of the class repository.
shellgit clone <your_repo>
Change directories to be within your repository.
shellcd <your_repo>
Set the merge method when pulling changes.
shellgit config pull.rebase false
Add the course repository as an upstream remote to your local repository.
A remote is a copy of the repository in a different location (usually a server) that you may pull updates from and push your committed changes to. You cannot push changes to the course repository, but, throughout the semester, you must pull updates from the course repository to your forked repository.
In the command line, use
cd
to set the current working directory to the root of your repository.bashcd <your_repo>
Check your current remotes. Before adding a new remote, you should see only two links that point to your fork on GitHub after typing this command.
bashgit remote -v
Add the course repository as a new remote named upstream.
bashgit remote add upstream https://github.com/csu-cs/CSCI-315-2025-Fall.git
Set the merging method for divergent branches.
bashgit config pull.rebase false # merge
Confirm it is working by pulling the latest changes.
bashgit pull upstream master
Save those updates (if any) to your fork on GitHub.
bashgit push
Add a Webhook to the Auto-Grader
See the instructions in Lab 5.
Golden 6 Commands of Git
Command | Purpose |
---|---|
init | create a new local repository |
clone <repo> | make a copy of a repository |
add <file(s)> | add one or more files to the staging area (index) |
commit -m "<message> | save the files permanently in the version history with a message |
push | sync the local repository to a remote repository |
pull | receive content from a remote repository |