LAB #1
CSC 101
Introduction To UNIX and pine
R Mohammadi
September 1998
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
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.
f. The following window will appear, just 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. 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 upperright hand side of the window to close it.
4. Login again.
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
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/passwordhintsThe
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 pwThis 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
lpr -- to get a print out of the file. type pw -- when prompted for a file name. You will then be given a choice of two printers, 1 for Snygg and 2 for Mahar. 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 you quota, print wisely.
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. 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.
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
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.
lpr 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.
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.