Welcome to CS 210!
It is important that you take the time to set yourself up with a working environment for writing and compiling C programs. Working directly on one of BU's Linux machines is by no means the only place you can write your C code, however, it is in your best interest to write code that will compile and run in an environment similar to where it will be assessed and graded (homework will be compiled and run graded on csa2.bu.edu). Homework submissions that do not compile on csa2.bu.edu will be graded as a 0, even if the code is compiling on your laptop or home computer.
This post will provide the following options for accessing the resources here at BU, allowing you to complete your assignments in-or-out of the BU undergraduate lab:
Code written on any one of the Linux machines in the BU undergraduate lab should perform identically on the machine where it will be graded. BU provides two Linux servers that are accessible outside of the BU network: csa2.bu.edu and csa3.
The following is a list of popular editors available on Linux, try to find one that works for you. I would recommend emacs as it provides a rich programming interface and debugging features that will be important for later assignments:
The simplest way to connect to csa2/csa3 is through the terminal using SSH (secure shell):
Connecting from Mac OSX
OSX comes with a UNIX-like terminal emulator, Terminal.app. Open Terminal and type in the ssh command (you will be prompted for your password):
ssh you_kerberos_username@csa2 .bu.edu
Connecting from Linux
Similar to MAC OSX steps above using Linux terminal.
Connecting from Windows
As will be shown in class, the PuTTY application is used to connect to a server via SSH (Download and install PuTTy.) Enter csa2.bu.edu or c
Ultimately, you're free to use whatever coding environment and x86_64 machine that your wish. However, for graded assignments we only accept source code (i.e., no Xcode or Visual Studio environment packages, no compiled binaries) and it is your responsibility to make sure that your code compiles and executes on csa2.bu.edu, where it will be graded. In my opinion, it is easier to work on one of the BU Linux machines (either directly or remotely), rather than working on your local computer and verifying the program works on csa2 after.
Working on Windows
You can use Microsoft Visual Studio Express 2012 to write and compile C code. There is also the MinGW, a minimal GCC compiler for windows. Notepad++ is a nice programming text editor.
Alternatively, you can install Cygwin, which provides common shell and GCC tools that you'd find on the BU Linux systems. Make sure the following packages are checked and installed: gcc4, make, man, curl, openssh, rsync.
Working on OSX
Since OSX is based on Unix, the OSX terminal should recognize most of the same commands as the Linux servers. However, some additional programs we'll use (like GCC and Make) will need to be installed onto your machine via Command Line Tools for Xcode (AppleID required). The command line tools are just as good as Xcode for programming C and take up far less disk-space, so get those unless you already have Xcode installed. If you installed Xcode from the App Store, the Command Line Tools are an
optional installation. You’ll need to enable them under Preferences > Downloads.
Working on Linux
You probably already know what you're doing.
Transferring your files
Similar to SSH, there are command-line tools for directly uploading files and directories via the terminal: Secure Copy (scp), rsync
Alternatively, you can upload your files via FTP using Kerberos username and password.
host: csa2.bu.edu port: 22
Wow, thanks for reading the whole thing! See you guys in discussion next week.
Thanks to Zhuoqun (Tom) Cheng, Jim Cadden and Dan Schatzburg for the contents above.