lab01 : Finish H04 if not done, verify CSIL Account, then zyBooks

num ready? description assigned due
lab01 true Finish H04 if not done, verify CSIL Account, then zyBooks Wed 10/06 01:00PM Tue 10/12 09:00PM

What we are working on today

CSIL/ECI Account

If you are using the desktop machines in Phelps 3525, you are already using your CSIL/ECI account; a terminal window there is a “CSIL/ECI account shell prompt”.

Otherwise:

At the command prompt, type the following, substituting your ECI/CSIL account in place of username

ssh username@csil.cs.ucsb.edu

The first time you connect, you may be presented with a one type prompt saying that the “credentials could not be verified”, and asking a Yes/No question. Say “Yes”.

Then, you are in. You can use pwd and ls commands as shown in lecture, plus other Unix commands such as vim and make.

The command logout or exit can be used to return to your own system.

Editing and compiling a Hello World program on ECI/CSIL

First, learn about vim, perhaps using one of these resources:

Then, to create a Hello World program in vim:

  1. Type vim hello.cpp
  2. Make sure you are in insert mode (you’ll learn about that when you learn about vim)
  3. Type in your program, e.g.
    #include <iostream>
    using namespace std;
       
    int main() {
      cout << "Hello, World!" << endl;
      return 0;
    }
    
  4. Press the escape key, then type :wq to save.
  5. To compile the program: make hello
  6. To run the program ./hello

There is nothing to turn in this week, but next week, you’ll be asked to show that you know how to do this with a live demo either during office hours, or during your discussion section. So, practicing this week is good preparation.

Will we always use vim? No!

We will pivot to using a better editor, VS Code, once we understand the basics of using vim. However, we want to start with vim, because it is an essential skill for computing professionals, especially if you will be involved in Cloud Computing systems, backend web servers, Docker containers, etc.

What if I’m completely stuck on this vim / ECI stuff?

No worries; you can ask the staff for help. In the meantime, if you prefer, you can just make progress in the zyBook, up through Chapter 7.

For TAs:

You can basically adapt the outline from the TA instructions from lab00, leaving out the detailed introductions of staff; please do, however, still briefly introduce each staff member for at least the first 2-3 weeks.