This course uses Linux and its C compiler all the time. The MathLab server runs Ubuntu version 22.04. MathLab is the only platform for resolving disputes over auto-testing; “my code passes test cases elsewhere” is not a sufficient condition to earn marks.
The MathLab server is remotely accessible by SSH.
MathLab blacklists an IP address whenever there are multiple failed logins; if this happens to you, you can seek help from me or the sysadmin, but you need to use this page to discover your IP address and report it to me or the sysadmin.
The standard command-line-in-terminal SSH software is known as OpenSSH Client and comes with Linux, macOS, and Windows (check Settings -> Apps -> Optional features; add if necessary).
In Windows Command Prompt, Windows Powershell, Windows Terminal, macOS Terminal, or Linux Terminal:
ssh utorid@mathlab.utsc.utoronto.ca
Replace utorid by your UTORid.
The first time you will be asked:
The authenticity of host 'mathlab.utsc.utoronto.ca (142.1.96.164)' can't be established. ED25519 key fingerprint is SHA256:aewpvx941TRmv71s78jRHmR853du8vif66aW3G+xw2M. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])?It is safe to answer yes.
For file transfer, look into the commands sftp
and scp
(whichever one you like most).
There are GUI alternatives for Windows and macOS, especially nicer for file transfer. On Windows, past TAs and students liked MobaXterm (the home edition suffices). I am not familiar with macOS alternatives.
For further convenience, ssh settings can be set on your computer, in home directory (on Windows usually C:\Users\<account>; not “Documents”), in folder .ssh, filename config (no extension). Use a text editor to create/edit.
# This is how to write a comment. # Start a group of settings applicable to mathlab. Host mathlab.utsc.utoronto.ca # Specify mathlab user name once and for all. You don't need to repeat "utorid@" again! User utorid # Reuse an existing connection whenever possible. # Mathlab has a limit on co-existing connections per user. # However, I can't get it to work on Windows. ControlMaster auto ControlPath %d/.ssh/socket-%C
With VirtualBox, a virtual machine program, you can install your own copy of Ubuntu (and later remove) in a sandboxed way without disturbing your existing OS. A virtual machine is a sandboxed simulated computer.
Although MathLab is the auto-testing standard, the latest Ubuntu version 23.04 is very likely to be compatible. Please still do one final test on MathLab just in case.
The Ubuntu website has a tutorial showing the whole process.
The installation process doesn't automatically install the C compiler and other packages used in this course. After you boot into the installed Ubuntu, you need to run this command by hand in a terminal to install them:
sudo apt install gcc libc6-dev make manpages-dev glibc-doc valgrind