Pre-Term Setup for COMP 230

Most students who take this course have their own laptop, but you will need to install some free software. (If you do not have access to a laptop, let me know before the term begins so that we can chat about alternatives.)

In this class, in addition to learning about the hardware and organization of a computer, you will be writing and compiling several C programs, and submitting them using git, all from a Unix/Linux/bash command line. You will also be using Markdown for homework assignments, presentation reflections, and other written work that does not need fancy formatting. Thus, you will need:

The first class will include an introduction to Unix/Linux/bash, and the process we will be using for downloading, editing, compiling, running, and submitting programs. You should be sure to have the requisite software before the first class. As part of installation, you should test that it works, so make sure to read and follow the Simple Test section below.

Unix/Linux and C Programming Tools (gcc, make, git)

Mac Users: You already have Unix (a Mac runs on Unix under the covers), but you should download XCode if you don't have it already to get the command-line development tools. XCode is a free Apple application on the App Store, but it is big and slow to download so do it when your machine is going to be in one place for awhile. If you have access to a wired Ethernet connection, use that to speed things up. I also recommend that you open up the Terminal app (which is already on your machine) and add it to your dock so that you can bring it up quickly throughout the term.

Windows Users: You will probably need to download and install the Windows System for Linux (WSL), although some versions of Windows may come with it already installed in which case you just need to enable it. You can check your Windows Features first for the Windows System for Linux, and check it to enable it if it is there. If not, here is a link with installation instructions: https://learn.microsoft.com/en-us/windows/wsl/install. This has gotten much easier than it was a few years ago, but students still occasionally run into an issue somewhere, in which case the TAs in the Collaboration Center can be a big help. Waiting until Week 1 to set this up, though, is not a good idea. (If you are running an old version of Windows, upgrading to the current version is strongly recommended.) The Linux subsystem should come with gcc, make, and git, three tools that you will be using extensively in this course.

Linux Users: If you currently run Linux on your laptop, you are probably all set! Your system should have gcc, make, and git already there.

Editor

Many students have chosen to use Visual Studio Code (https://code.visualstudio.com/download) to edit both C and Markdown files, although you can use any editor that produces plain text. Examples include vi/vim, emacs, VS Code, Brackets + Brackets Markdown Preview, Atom, etc. VS Code also provides Markdown previewing. You may also want to install a Markdown extension in Chrome and tell it to interpret Markdown files from www.cs.kzoo.edu and kit.cs.kzoo.edu.

If you want to learn vi, aka vim, you may find the "vi 101" link on this Basic Vi page useful. (Vim stands for "vi improved", and when most people refer to "vi" they actually mean the improved version. On many systems, in fact, the "vi" command is now just an alias for "vim". At the level of the Basic Vi page, both versions are the same.)

Simple Test — "Hello, World"

Basic Unix/Linux Commands Used in This Test:
    mkdir subdir          ("make directory" with name subdir)
    cd subdir             ("change directory", i.e., move to subdir)
    cd                    (if no subdir provided, change to "home" directory)
    pwd                   ("print working directory", i.e., show where I am)
    ls                    (list files in this directory)
    code fileOrDirectory  (bring up VSCode for file or all files in directory)
    vi file               (bring up vi for file, i.e., edit file)
    gcc sourceFile.c      (Gnu C Compiler -- compile sourceFile.c)
    whereis cmd           (show where cmd is in the filesystem) 

The easiest way to test that you have the right software and that it works is to create a tiny "Hello, World!" program. This will also serve as your first chance to practice editing, compiling, and running a program from the command line.

More Info

If you're interested in reading a little more about Unix/Linux before the term begins, you may find some of the slides on this page interesting or useful, especially the basic commands on this Intro to Unix page.