Lab: using JupyterHub & mantis
Nothing to hand in.
This term, we will study computer systems partly by using the C programming language and its relationship to the Intel x86_64 machine language and assembly language. To ensure that we all have a consistent computing environment, we will do our work on the Linux server mantis.mathcs.carleton.edu. This short lab will help you get started working on mantis.
The architecture of our setup
Here's the setup.
- You make sure your computer is connected to the campus network, either by being physically on campus or connected via Carleton's VPN.
- You open a web browser.
- You login to JupyterHub running on fern.mathcs.carleton.edu. This lets you edit files and open a Linux terminal on fern.
- In the fern terminal, you SSH to mantis.
- You are now set to edit files and execute code on mantis.
Let's practice
- Following the JupyterHub Workflow instructions, get yourself logged into mantis in a JupyterHub terminal.
- Create a directory in your mantis account where you'll do your CS208 work. Like this:
cd mkdir cs208 cd cs208
- Get a copy of jupyter-package.tar into
your cs208 folder on mantis in either of two ways. (I suggest that you try both of
these methods so you're comfortable doing either one.)
- At the command line:
wget https://cs.carleton.edu/faculty/jondich/courses/cs208_f25/assignments/packages/jupyter-package.tar
- Alternatively, click jupyter-package.tar to download the file onto your own computer, and then use JupyterHub's "Upload Files" feature to upload it to fern and mantis.
- At the command line:
- Expand the tar file.
tar xvf jupyter-package.tar
- Compile and run the hello-world program that was in the tar file.
cd jupyter-package gcc -Wall -Werror -g -O0 -o hello hello.c ./hello
- Done? Log out of mantis in the terminal.
exit
- Log out of fern in JupyterHub, using the File→Log Out menu.
One suggestion
You can perform most file operations on mantis either by using command-line commands or by using the JupyterHub graphical user interface. I strongly encourage you to practice moving, copying, renaming, and deleting files and directories in both ways.