CS 241e - Foundation of Sequential Programs (Enriched)

Piazza Info
Assignment Info
IntelliJ IDEA Setup
Marmoset Link
Exam Information

General Information


Getting Started in Unix

We will be using the Unix environment for working on assignments. Specifically, we will be writing C programs, which are compiled and linked using gcc, and submitted for automarking on the Marmoset testing server.

The first thing you need to do is log on to Unix and change your student password if you have not done so already. Please note that Mac and Nexus are different and changing your Nexus password will not affect your Mac password. You NEED to change your Mac password and you need to change it through Unix.

Logging in to Unix from a Mac

First, click the 'X11' icon as pictured. It should be found in your dock. If not, open the Finder and navigate to Applications/Utilities/X11. X11 allows you connect to a student.cs server and login to Unix.  
Next click on the Applications menu as shown below. Then choose "xterm on cpuXX" where XX is an even number. (Hint: Check out the host listing for more details).  

Once logged in to student.cs UNIX, your screen should look something like this.

Changing your Password

From the student.cs command line, type passwd. You will be prompted for your old password and then required to enter a new password. The password that you choose must follow the following conditions:

  1. the password must be 7 or 8 characters
  2. it must contain 3 of the following types of characters:
    1. Uppercase letters
    2. Lowercase letters
    3. Numbers
    4. Punctuation
  3. it may not contain more than 4 consecutive letters
  4. it may not contain more than 4 consecutive digits

The screenshot provided below shows an example of changing your password.

Working Environment

You have the following options for completing your work:

  • The Mac labs on the 3rd floor of MC. Check the room schedule for availability.
  • The "thin-client" Linux/Solaris terminals on the 3rd floor of MC.
  • Use SSH within a terminal window on your Mac or Linux machine, or PuTTY on your Windows machine, to connect over the Internet to the servers in the CS Undergraduate Environment and complete all your work there.
  • Install Cygwin on your Windows machine, or gcc on Mac/Linux, and work without having to use the Internet.

CS136 has a nice document ( c-logistics.pdf ) that describes these options in more detail and gives you information on how to obtain the required software. Please read through it early in the term, make some decisions, and get the necessary software in place and set up.

Storing your work

Always save your course work to the cs241E folder that should already be created on your student.cs UNIX account (your U: drive if you are working in the lab). Every time you work from home, transfer your work to the cs241e folder on your student.cs account as soon as possible (see instructions under Resources link - e.g. mywaterloo as ftp). student.cs is backed up regularly, so if something happens to your home computer, some version of your work may be recoverable, but only if you transferred your files there.

Where to Start

Your C programs will be created using a text editor. We recommend using Pico, Nano, Vim, or Emacs. In addition to an editor, you will be using the C compiler gcc. This is run from the command line interface (ie. gcc myprogram.c). Follow the links below for more information. You may get started on Assignment 1.

Useful Links



  • Efficient editing with Vim, a page that quickly runs through some very useful commands.
  • This site sells Vim-related software, but scroll down to the bottom to find links to Vim tips, good reasons to use Vim, and some very nice graphical "cheat sheets" and graphical tutorials.




  • If you have any questions about our computing environment, please consult the MFCF FAQ.