Intro to Unix

Introduction:

Before we get into programming proper, we need a few fundamental survival skills which we will use to control our environment. You will need to be able find your way around the UNIX Operating System.

Now let's begin!

Description:

We will begin class today with a discussion of the terminal and file systems. We will talk about what a file system is and look briefly at the Unix file system. After that, we will hava a web activity exploring basic unix commands we will need to manage our computing environment in Computer Science.

Activities

  1. Open a new terminal by going to Applications->Accessories->Terminal OR by hitting Ctrl-Alt-F1

  2. Using the web resources listed at the bottom of this page (and any other resources you would like to use), write out a description and an example for each of the Unix commands in the list that follows:

  3. In your home directory (/home/username), create a directory named computer_science, then change to this directory (pwd should return /home/your_username/computer_science when you are finished). Create the following subdirectories in the computer_science directory: programs, notes, and projects. Running pwd now you should see this:
         /home/username/computer_science
      
    and running ls should give you this:
        notes  programs  projects
      
    In the programs directory, create four more subdirectories named gvr, python, java, and c.

  4. One common task on a Unix system is compiling and installing software. Since most software on a GNU/Linux system is free software, it is often the case that source code is downloaded directly, compiled, and installed. In this activity we will do just that.



  5. The last thing to do is to make the tree available at all times and from within any directory. To do this we need to set the PATH environment variable. This is a rather involved process, so follow these instructions step-by-step with care:

Congratulations! You have just completed our introduction to Unix.

Evaluation

The evaluation for this lesson will consist of a performance exercise. You will select at random (I'll tell you in class about how the selection process will work) a task to be performed. Tasks will look something like this:

  1. Create a directory named sports in your home directory.

  2. Create subdirectories in the sports directory named baseball, football, basketball, and soccer.

  3. Create a file named stars.txt in the baseball directory. Add the names of three baseball stars, one per line, to this file. If you don't know the names of any baseball stars, just make up three names.

  4. Repeat the previous step in each of the other subdirectories of the sports directory.

The complete list of tasks can be found here.

Web Resources:



Valid XHTML 1.1!
  Valid CSS!