Homework 0: Getting Started

Due September 11, 1997

The purpose of this assignment is for you to get started using the CS Department Undergraduate Laboratory Unix systems, and to begin familiarizing yourself with the environment we will be using this semester. Work through the steps indicated below. Some of the steps ask you questions. You should put the answers in a file called HW0_WRITEUP and you should submit it electronically as described here.

NOTE: This assignment doesn't require all that much in terms of written work to be handed in by you. However, this doesn't mean that there isn't very much for you to do. If you only do exactly what each of the steps below says, and you don't take some time to explore a bit beyond, you will not learn very much, and you will be putting yourself at a disadvantage for the rest of the semester.

If you have never before used a Unix system, you should read Chapters 1-3 of Unix for the Impatient, and take the book along with you to the Laboratory. You will need to very quickly get familiar with the basic commands in Chapter 3 for listing directories, locating files, and generally navigating around the filesystem.

Get an Account
For this course, you will need an account on the Computer Science Department Undergraduate Computing Laboratory systems. Request an account using the appropriate form here. This might take a day or two, so request the account now.

Visit the Laboratory
Go to the laboratory (Computer Science Room 2128). For the first three weeks of class, you should be able to use your magnetic SUSB ID card to get into the room. After that, if you wish to use the facilities in the room, you will need to purchase an access card as described here.

After entering the Lab, log at one of the workstations. The login procedure is described here.

Once you are logged in, start up X Windows as described here. Once X is started, start netscape using the command

% netscape& Full documentation on netscape is available over the Web using netscape itself. Play around with netscape until you are comfortable with its use.

QUESTION: What do you have to do to reduce the size of netscape's document cache from the default 5MB to 2MB, so that it doesn't eat up half the disk space in your directory with copies of all the documents you have recently viewed (and might view again soon)?

Run ``msgs''
Type the command: msgs to the shell. This will start a program for reading system messages posted by other users (faculty and students). It is a good idea to run this program every time you log in. This can be done by adding the msgs command to your .login file. Your .login file is a script for the C shell. This is discussed in Unix for the Impatient, and we will treat these in more detail soon.

Read about the Laboratory
There is quite a bit of online information that gives solutions to common problems users encounter when they first begin using the UG Lab. Start at the URL: http://www.ug.cs.sunysb.edu to view this information. Note especially the Hints for Newcomers item.

If you are logged into the Lab remotely from somewhere where you are unable get an X Windows connection, you can still read online information by using the lynx command as follows:

lynx http://www.ug.cs.sunysb.edu There is a man page for lynx, to help you get started, and full documentation is available over the Web.

QUESTION: What does the online documentation tell you to do if when you try to start X Windows it stops immediately with a funny message about ``termcap'' files?

Find the CSE 230 Home Page
The CSE 230 Home Page can be accessed via the main UG Lab home page. Find the CSE 230 Home Page and make a bookmark to it so you can go back there easily later.

QUESTION: What is the URL (world wide web address) for the the CSE 230 Home Page?

Read Unix ``man'' pages
Type the command: man msgs to find out about the Unix msgs program. Run man man to find out about the man program itself. Use man -k password to get a listing of all program documentation that has the word ``password'' in its title. Use the whatis command to get a brief description of a program, given its name. For example, run whatis whatis to find out what the whatis program is. Play around with these commands and see what you can find out.

Send and Read Mail
Send yourself mail using the mail command as follows. Type: mail yourloginname (replace yourloginname with your personal login name). The system will wait for you to enter your message. After entering the message, type CTRL-D (hold the control key down while typing D). You should get back to the shell prompt. Then type mail to read the mail you sent yourself.

You can mail to me by using mail stark, or else you can mail me from Netscape by clicking on my E-mail address at the bottom of any of the course pages. Feel free to try it, if you want. Ask me to reply, if you want to see if you can get mail back again.

NOTE: There are much better mail systems available than mail. I use the Emacs rmail command to read all my mail. Many people use elm or pine. There are manual pages available online for these programs, if you want to try them.

Explore the Filesystem
Use the df command to display information about mounted filesystem volumes. Use pwd to find out the name of your home directory (the one you are placed in when you log in). Using cd and ls, look around at the various filesystem volumes and try to get an idea of the type of information that is stored in each.

QUESTION: On what filesystem volume is your home directory located? On what server machine does it reside? For each of the mounted filesystem volumes reported by df, give a brief description of what is stored there, as best as you can determine.

Run GNU Emacs
Run the GNU Emacs editor, as described here. Work through the Emacs tutorial until you are able to read in a file, enter text, make corrections, and save the file again. Find out how to view the full online Emacs documentation, and practice navigating through it.

QUESTION: How does one access the full online Emacs documentation? Name five of the top-level menu items in the full documentation.

Submit Your Writeup
After placing the answers to the questions posed above in a file HW0_WRITEUP, submit this file electronically using the command: ~cse230/bin/handin HW0 HW0_WRITEUP More information on the handin program is available here.

Eugene W. Stark