- In this assignment, you will learn some handy Linux tools.
- While you may work on homework assignments on your personal computers, it’s worthwhile to learn how to use the lab computers and the tools on them. You’ll need to be able to log in to the computers in Olin 124. If you do not already have an instructional Linux account, you will receive one in class on the Friday before this assignment is due. If you are having trouble logging in, get help from Dustin Palmer (Olin 126).
- Each student should do this assignment independently. However, you may consult with other students as you work through the exercises. Since this assignment is pretty mechanical, you need not acknowledge any help you might receive.
- Submit a text file here on Canvas. See below for more information.
What is a “Command Line”?
We will be using a particular tool on these computers that you may not be familiar with, known as the command line.
In the 1960s and 1970s, there weren’t fancy displays. Most computer monitors were only capable of extremely simple graphics, and generally they were restricted to displaying only alphanumeric characters, 80 columns by 25 lines.
Therefore, the entire interaction was by typing the names of commands into this window, then pressing return to begin the command. Imagine that every time you wanted to run Firefox, you had to type “Firefox” and press return. That’s how it all worked. (Of course, there wouldn’t have been any program with graphics as fancy as Firefox, but that’s beside the point.)
It may sound terrible, but the command line was (and still is) an essential tool for a programmer. Although it may be hard to believe, there are certain interactions that are much easier with a command line interface than with the WIMP (Windows, Icons, Menus, Pointer) interface you are used to.
In fact, if you’re interested about the history of the early days of computer interaction, and the first 30 years of operating system evolution, you can download and read Neal Stephenson's essay, In the Beginning was the Command Line. (Reading this is in no way required for this assignment or the course, but it’s interesting and funny.)
To learn the command line, log in to one of the lab machines in Olin 124.
Once you have logged in, run the Application Terminal. (It should have a shortcut in the dock.) This will open up small window that displays text characters (specifically, it is 80 columns by 25 lines). In the window you’ll see something like this:
Voila! This is your command line. The line of text there is known as the prompt. There is actually a lot of information in that cryptic line: It is telling you your username (in my case,
davisj), your computer name (
hopper), and your current working directory (
~, which is a special name for the current user’s home directory.)
Now, go through Typograhical Conventions, Introduction to the UNIX Operating System, and Tutorials 1-4 of this tutorial. The tutorial was originally written for the Unix operating system and for students at the University of Surrey (note British spellings), but it is still accurate enough for us.
One difference is that on their system, the final character of the prompt is a
%, but on our systems it is a
$. So all their examples of what to type begin with a
% character. Don’t type this character in to the command line. It is simply an indicator of what the prompt looks like.
Upload the file named
slist, which you created in Tutorial 3.3 to this assignment. If you haven't created a file named
slist, then turn in the file