CSCI 237
Computer Organization
Home |
Lectures |
Labs |
CS@Williams
Getting Started
- Login to a lab machine and open a terminal.
- If you aren't on a Linux machine in lab, SSH to your favorite CS Linux machine. See list of machines
here.
If you are in lab and already on an Ubuntu machine, skip this step.
$ ssh 27abc@lohani.cs.williams.edu
- Update your path to include the submit237 script. To do this, create a file called .local_bashrc in your home directory. (If you already have this file, that's ok. You can update it.) You can use VS Code or your favorite text editor to open the file. Add a line that says:
export PATH=$PATH:/usr/cs-local/237/bin
Close your editor and load the file by typing
$ source .local_bashrc
Once your path is set correctly, you should not need to repeat
this step again.
- Make a new directory for cs237, and change into that directory.
$ mkdir cs237
$ cd cs237
- Get started on Lab 1.
- To logout of the ssh session, type exit. Close the Terminal, then logout of the lab machine. Never turn a lab machine off!
Notes and Advice
- Though not required, I encourage you to gain familiarity with a non-graphical text editor this semester. I use emacs, but there are other options. To open a file using emacs, just type emacs followed by the file you wish to open.
$ emacs bits.c &
WARNING: You will not be able to use your mouse in emacs. Type Ctrl+x, followed by s to save a file, and
Ctrl+x followed by c to save and close.
- Compiling in C:
$ gcc -o output -g input.c
The -g is used for debugging. You will just use a Makefile most of the time, however, you should
know how to compile a C program without a Makefile. We will go over some of this in lab, but you are always
encouraged to ask questions.
- New to emacs/Unix/C? Check out the links on
this page
for some cheat sheets and tutorials.
- These tutorials are also great. I
recommend completing the first five of these tutorials on your own time. The tutorials were
designed for use on the computing facilities at CMU, so
there will be a few points where what they say does not reflect our configuration. Overall,
however, these tutorial appear to provide an excellent introduction to Unix commands.