LAB #1

CSC 101

Introduction To UNIX and pine

R Mohammadi

 

 

Objectives:

Learn ...

to start applications in Win95.

to login/logout of the UNIX operating system.

about directory structures in UNIX and to read/copy/print files that exist on the system.

to use electronic mail.

About this lab ...

In this, your very first lab in CSC101, you are going to learn some very basic skills. During this lab, you will learn to start up a program called Telnet that allows you to login to your UNIX account. knowing how to do electronic mail and learning some key UNIX commands will also be important to your success in this course, so we will concentrate on that in this lab. RELAX; you can't break the computer!!!

 

1. Login procedure for IBM PC compatibles:

 

a. You should see a message window that tells you that you must have a valid ICC account. Using your mouse point to the OK button on the screen and Click the left mouse button.

b. A dialog window should appear with a slot for User Name, and another for Password. Type in your user name and password provided for you by ICC. Remember that password is usually the last eight digits of your Social Security code.

c. Assuming that you put the information in correctly, you will get another dialog window. The system wants to know, if you want your profile saved, just click on No.

d. Position mouse on the Start Icon and click your left mouse button.

e. A menu will appear as shown below, Make sure that Run... option is highlighted and just click your left mouse button:

 

f. The following window will appear. Type Telnet rocky in the space provided and click on OK:

 

g. You should now have a login prompt for rocky in a Telnet Window. Type in your user name and when prompted for password type that in also. You are now logged in!

 

2. Changing password (read carefully).

The system may put you into the passwd program the first time that you login. Use a Ctrl-C to kill that program, hold down the Ctrl key and hit the key for the letter C. This program allows you to change your password, but it has never worked correctly when more than one person is using it. Use the passwd command to change your password at a later time.

 

3. Logout

type x. x is the alias for logout. You should have an empty Telnet Window. Click the X button on the upper right hand side of the window to close it.

 

4. Login again. Go back to step 1d for steps to reconnect.

 

5. Files and directories in UNIX.

UNIX allows users to store and manage numerous types of files. In this course, we will deal with text file for the most part. Think of the UNIX file system as a large family tree where your account is just a leaf in that tree when you start. When you login, UNIX starts you in your main directory. This directory is in the directory tree structure with your user-name as its name. This is where most of the files that you will create are kept. You may also have subdirectories off of your home directory, but we will leave the details of creating those for another day.

 

I also have a home directory in our system. The name of my account is mohammad. I have provided you with the privileges needed to read some of my files.

 

a. Type ls ~mohammad--The tilde(~) character is used so that you won't have to know the exact location of my home directory in our tree structure. You will find a list of files and subdirectories in my main directory. ls, is the letter l followed by the letter s. There is a space between ls and ~.

b. Type ls ~mohammad/101 -- the subdirectory 101 in my main directory contains some files that I wanted to make available to you.

c. To see the content of a file in the 101 subdirectory, you may use the more command. To read through the file passwordhints, type more ~mohammad/101/passwordhints -- space between

more and ~

The space-bar may be used to page through the document.

d. To place a copy of that file in your account you may use the cp command.

Type cp ~mohammad/101/passwordhints pw

This will place a copy of that file in your account under the name pw, just type more pw to read this file again.

e. Type print-- to get a print out of the file. type pw -- when prompted for a file name. You will then be given a choice of 5 printers, 1 for Snygg line printer and 2 for Snygg laser, …. Operators will place your printouts in the bins in room 6a of Snygg or in the terminal room in Mahar. The first letter of your account name is used to store your printout. Remember that each page printed counts against your quota, print wisely. You can type pquota at the UNIX prompt to check your print quota.

 

6. Electronic mail

pine is a useful tool. It allows you to send and receive messages.

 

a. Type pine (at the UNIX prompt)-- to initiate pine.

b. Your choices are on the bottom of the screen. To compose a letter, you must choose C.

c. In response to To:, type the Email address of the person next to you. For example, my Email address is mohammad@oswego.edu, since my account name is mohammad. Please don't send your lab message to me.

d. Hit Ctrl-x to send message, hold down Ctrl key and hit the key for the letter X. Just hit the return key when prompted with Send message?. Assume the message is mailed to the person next to you, unless it is identified as undeliverable.

e. To read your messages, choose i. You will see a list of the messages that you have received. Pressing return on a highlighted message will allow you to read it. The down-arrow and the up-arrow let move through messages.

f. Find a way to exit pine, pay attention to your menu choices listed at the bottom of the screen. You are done.

 

7. Logout

    1. be sure to type logout at your UNIX prompt when you are done.
    2. Click the Start button on the bottom left corner of the screen, and choose Shut Down.
    3. Choose the Close all Programs and log on as a different use? Option, and Click the Yes button.

 

Summary of UNIX Commands, plus an extra one:

 

UNIX is case sensitive. Most commands are in lower case unless otherwise stated.

 

logout will log you out of the system.

cp will create a copy of a file. Two copies will exist after this command is completed.

(i.e.. cp lab1 lab1a)

ls displays all files in a directory.

print will allow you to print a file. A menu will allow you to choose the printer that should be

used.

man is used to gain more information about a command

passwd lets you change your password. You will be prompted for your old password, your new one, and a verification of the new one.

rm followed by a filename removes a file. You will be prompted for (y/n) before the file

is removed. If you hit a capital Y, the computer assumes you mean no.

pquota displays your print quota.

 

How to login to the UNIX system when using a VT220:

• turn on the terminal (switch is on the backside)

• type d to enter directory

• type 3321 in response to enter destination

• Hit the enter key a couple of times until a User Name prompt appears.

• type M in response.

• a menu will appear listing the machines available, enter the number associated with rocky. Enter your login name in response to login: and your password in response to password:.

• It may take you a few trys before you get this right. F5 will allow you to restart the login procedure.