Welcome to CS 14

Welcome to CS 14 labs. In this course, all programming will be done under the Linux operating system, using standard programming tools for that environment. Linux is a free operating system, available for all to download (RH) (Mandrake) and use with no cost. Linux itself is about a decade old, but in conjunction with a set of free utilities from the GNU project, behaves like a member of the UNIX family of operating systems. UNIX has been the standard for research institutions and the computer industry in general for decades. As a matter of pride it is expected that you, as a Computer Science student, will learn to use it. To help you toward this end, there will be no usage of Windows during lab sections for CS12, nor will any assistance be given to students wanting information on moving/recompiling their assignments completed originally under Windows. It is very much in your best interest to get used to Linux as early as possible, since it will be your primary tool for Computer Science for the rest of your term here at UCR. Tutorials on Linux are available all over the Internet, Google for "Linux tutorial" and find one that suits you, or just try This one.

In this lab, we will be doing three things:

Class Accounts

Temporary accounts are available for the duration of this course. In order to receive one, you must provide photo ID to your TA. If you have come to class unprepared and do not have photo ID, check with your TA about how to proceed. Once you have your account, return to your seat. If you have already booted Windows, shut it down. When the Operating System choice screen pops up again, choose the Linux option. After a few seconds, the computer will ask you for your login information (user-name and password.) Enter your new login for CS 14, and the appropriate password. If you typed everything in correctly, you will be logged into the Linux system.

Introduction to Linux

Linux has a Graphical User Interface much like Windows, but also has an extremely powerful and all-encompassing command line interface that allows you to interact more quickly and efficiently with the system. To access this interface, click on the icon that looks like a black computer monitor. This will pop up a window known as a "Terminal." Inside your terminal window is where you enter your commands.

Basic Commands There are literally hundreds of additional commands commonly available, as well as a large number of options available for the commands presented here. It is highly recommended that you take some time to experiment with these commands, read some documentation, and get to know your environment. With more than 25 years of history, nearly everything you might want to do has been done and automated by some other developer and included in the plethora of UNIX commands. Learning as many as you can will make your life later on easier and easier. Start early.

Editing Files
There are many many options for editing text files under Linux. The two most common are emacs and vi. Emacs is somewhat easier for beginners, so we will focus on using emacs in this course. We recommend that you experiment with other editors to find the one that suits you best.

To invoke emacs, simply type emacs in a terminal window and press Enter. Examine the menus on your own. If you have any questions, ask your TA or search for help on Google.

Turn-in

7 points possible
We want to ensure that everyone understands how to use the turn-in system, and that everyone has at least experimented with the basic Linux commands presented here. Follow these directions to prove that you understand both systems: As you go, copy the contents of your terminal window into your original Emacs window "lab1.txt". When you are done, save that file and close Emacs.

Open a web-browser. Go to the CS department secure server Follow the directions there to turn in your file "lab1.txt".

Miscellaneous Tasks

1.4 points possible
When you are all finished, explore your Linux environment, the history of Linux / UNIX, or other related things online. Attendance for the full lab period is mandatory. Try working on some of the following short tasks. To receive credit, add these to the top of your "lab1.txt" file and turn it in again. Each task is worth 0.2 points, out of 10 possible. If you finish with all of this, you can either browse around for information on Linux / UNIX, more shell commands, or start work on your first programming assignment here.

Lab Grading

Attendance - 2 points
Terminal session turned in - 7 points
Misc. Tasks - 1 point
Extra credit - .4 points
Total: 10.4/10