Getting Started in UNIX
 ************* BACK AND FORTH PAGING SUBROUTINE ************

PAGEFLOP

If they want to quit, do so
 If They want to quit subsession, Do SO!
  Decrement LOCAL and GLOBAL Page Counters

FORWARD

  Increment LOCAL and GLOBAL Page Counters
   *************** END PAGEFLOP *********************
  ****** CHAPTER INTERNAL SELECTOR ALGORITHM ******

SELECTOR

   Reset Local Page Counter

SELAGAIN

 CHECK IF ONLY A <CR>

WRONGSEL

YOUR SELECTION IS NOT IN THE 0 - #SELIMIT  RANGE  Please Try Again

AANVANG

Copyright, CourseWare Technologies, Inc., 1985-88

Release: 2.0

CTI - Course 845



 GETTING STARTED IN UNIX 
 GETTING STARTED IN UNIX 
 GETTING STARTED IN UNIX 
 SKIP INTRODUCTION IF THE USER DOES NOT WANT TO SEE IT
Do You Wish to see  Instructions for Use? (y/n)?    

USAGE

 TS: 8 , 1
 TC:Do you wish to see the instructions:
 :
 TC:"How to Use the CTI On-line Tutorials"?
 :
 :
 :
 :
 TC:Type y <CR> for yes or n <CR> for no.
 AH:
 M:y!Y 
 JN: BEGIN

P1

Getting Started|Topics to Learn|0-1| 14 , 39
Available Topics

  #                Topic
---              -------
  1   -   Introduction to Getting Started
  2   -   UNIX Typing Conventions
  3   -   Logging On and Logging Off
  4   -   UNIX Command Syntax
  5   -   Some Basic UNIX Commands
  6   -   Creating and Editing Files
  7   -   Printing Files
  8   -   UNIX Directory Structure
  9   -   UNIX Programmer's Manual
 10   -   Other CTI Training Courseware
  0   -   Exit the Training Session

TOPIC1

Introduction to Getting Started - 1.0.1

P2

Getting Started|Introduction|1-1| 16 , 47
    Congratulations on your interest in a

 UNIX Based Computer System 

a quality State of the Art Product designed
to serve effectively your Computing Needs.

    Welcome to CTI's - On-line Tutorial:

 GETTING STARTED IN UNIX 

     This Tutorial will provide you with
on-line descriptions and explanations plus
exercises to illustrate various UNIX concepts.
You will experience how your UNIX Operating
System responds to various commands.

P3

Getting Started|Introduction|1-2| 6 , 52
    The Tutorial will provide you with step
by step instructions.  If you make any mistakes
while typing, you will be corrected.

     Do not be afraid.  Your typing will not
cause your tutorial or your UNIX Computer any harm.

P4

Getting Started|Tutorial Objectives|1-3| 10 , 68

When you have finished this tutorial, you should be able to:

   * recognize certain UNIX typing conventions,
   * log on to your system by entering your login name and password,
   * log off of your system,
   * identify your shell prompt,
   * locate important keys on your keyboard,
   * recognize the parts of a command line, and
   * correct mistakes on a command line.

P5

Getting Started|Tutorial Objectives|1-4| 11 , 71
More Tutorial Objectives

When you have finished this tutorial, you should be also able to:

   * determine the pathname of your current working directory,
   * list the contents of your current working directory,
   * describe how files and directories fit in the directory hierarchy,
   * view the contents of a file,
   * determine who is logged on to your system,
   * print the date and time on your screen, and
   * look up a command name in the manual.

P6

Getting Started|Tutorial Audience|1-5| 5 , 67
Tutorial Audience

This tutorial was designed for:

     * those unfamiliar with the UNIX Operating System,
     * those with little or no experience with a computer, and
     * those who want an introduction to the CTI on-line tutorials.

P7

Getting Started|Tutorial Prerequisites|1-6| 6 , 47
Tutorial Prerequisites

There are no prerequisites for this tutorial.
An interest in the UNIX Operating System and
in using a computer in general, would of course
facilitate learning.

TOPIC2

UNIX Typing Conventions - 1.0.2

P8

Getting Started|UNIX Typing Conventions|2-1| 9 , 54
     Your computer terminal has a keyboard much like
a familiar typewriter.  Some characters mean special
things to the UNIX Operating System.  For instance, a
UNIX system differentiates between uppercase and
lowercase letters.  So an A is not the same as an a.

     Commands in the UNIX Operating System must be
typed in lowercase.   Lowercase is also typically used
for login names and file names.

P9

Getting Started|UNIX Typing Conventions|2-2| 13 , 42
    A UNIX system also thinks that a
lowercase "l" (el) is entirely different
from the digit "1", and that an uppercase
"O" (oh) is entirely different from a
zero "0".

------------------------------------------

Terminal "arrow" keys are not used!

                       
 ->     <-     ^     | 
               |     V 

TOPIC3

Logging On and Logging Off - 1.0.3

P10

Getting Started|Logging On|3-1| 12 , 54
     In order to use your new UNIX computer, you
must identify yourself to the system.  The process
of identification is called logging on and usually 
involves two steps.

     First, you give the computer your login name,
which is the name the computer knows you by.

     Then, on most systems, you must give the
computer a password that only you know.  Using
a password enables you to keep your work private
and lets the system know that you are a valid
user, and not some intruder.

LABEL53

Getting Started|Logging On|3-2| 12 , 59
       When you encounter a computer running the UNIX
Operating System, you should see a login prompt similar to
the following one on the screen:

                 xenix386!login:

If you do not see this prompt, you could try pressing the
BREAK key a few times, or <CONTROL-q>, but the best
solution is to find someone like your system administrator
to help you to get a login prompt.  Your equipment may be
improperly connected, or your terminal could have been left
in a funny state.
Getting Started|Logging On|3-2| 13 , 59
       When you encounter a computer running the UNIX
Operating System, you should see a login prompt similar to
the following one on the screen:

                 Sun UNIX 4.3 Release 3.2
                 login:

If you do not see this prompt, you could try pressing the
BREAK key a few times, or <CONTROL-q>, but the best
solution is to find someone like your system administrator
to help you to get a login prompt.  Your equipment may be
improperly connected, or your terminal could have been left
in a funny state.
Getting Started|Logging On|3-2| 13 , 59
       When you encounter a computer running the UNIX
operating system, you should see a login prompt similar to
the following one on the screen:

                 My Company UNIX 
                 login:

If you do not see this prompt, you could try pressing the
BREAK key a few times, or <CONTROL-q>, but the best
solution is to find someone like your system administrator
to help you to get a login prompt.  Your equipment may be
improperly connected, or your terminal could have been left
in a funny state.

P12

Getting Started|Logging On|3-3| 11 , 48
       You respond to the login prompt by typing
your login name followed by a <CR>.

       The UNIX Operating System then prints:

password:

       Type in your unique password.  Because
your password is private, it is not echoed
on the screen for others to read.  Of course,
you must follow your password with a <CR>.

P13

Getting Started|Logging Off|3-4| 12 , 66
When you have finished working with your UNIX system, you
must "sign off."  This process is called logging off.  Logging
off involves holding down the CONTROL key while pressing the d 
key.  This combination of keys will be referred to as 
<CONTROL-d> from now on.  This combination of characters is 
sometimes referred to as EOF which stands for End Of File.  
(Remember that some documentation uses the carat symbol:  ^ 
as a substitute for the word CONTROL, so the combination 
could be represented as:  <^d>.)

On the simulated terminal screen that follows, you will
be shown how to log off.

TOPIC4

UNIX Command Syntax - 1.0.4

P14

Getting Started|UNIX Command Syntax|4-1| 8 , 44
Your UNIX System understands a very
specific language, the UNIX language.

The UNIX Operating System has a grammar and a
structure which is much like the language we
humans use, but is simpler and more rigid.

Let us examine the UNIX syntax.

P15

Getting Started|UNIX Command Syntax|4-2| 15 , 58
A command line is a request for some action.  Command
lines are typed on your keyboard and appear on your
screen.  The syntax of a UNIX command line is:

command  option(s)  filename(s)

      * The command is what you are asking to be done.

      * An option modifies the actions of a command.

      * A filename indicates the file you want the command
        to work on.

The spaces between the words on a command line are required.
Of course, each command line must be ended with <CR>.

P16

Getting Started|UNIX Command Syntax|4-3| 13 , 52
For example, in the command:

pr  -2  addresses

      * The command pr prints a file on your screen.

      * The option  -2 modifies the usual pr output
        so it is printed in two columns.

      * The filename addresses is the file the pr
        command is to print in two columns.

Some commands do not require options or filenames.

TOPIC5

Some Basic UNIX Commands - 1.0.5

P17

Getting Started|Some Basic UNIX Commands|5-1| 12 , 54
Once you have logged in to a UNIX Operating
System, you will be interacting with a utility
program called the Shell.  The Shell accepts the
commands you enter, interprets them and calls the
appropriate program for you.

Some simple commands are:

     date - displays the current date and time

     who  - prints the login names of those
            who are currently logged on to the system.

TOPIC6

Creating and Editing Files - 1.0.6

P18

Getting Started|Creating and Editing Files|6-1| 12 , 51
Editors are programs that allow you to create and
modify files.  These files can contain any kind of 
information--numbers, words, symbols.  You can do 
many things with files once they are created.  For 
instance, you can:

          *  display their contents,
          *  manipulate their contents,
          *  copy them,
          *  move them,
          *  remove them, or
          *  format and print them.

P19

Getting Started|Creating and Editing Files|6-2| 4 , 50
On your terminal screen you will be introduced
to the procedure to open a file using the UNIX
screen-oriented editor called vi and how to close 
a file or exit an editing session.

TOPIC7

Printing Files - 1.0.7

P20

Getting Started|Printing Files|7-1| 11 , 60
Once you have created a file, you will probably want
to print it.  With the UNIX Operating System, document 
processing is a two step process:

   1.  Using an editor to create a text file--the file
       may or may not contain formatting instructions.

   2.  Selecting a printing program to print the file you
       created with the editor--you may select a printing
       program which interprets formatting instructions
       embedded in your text file.

P21

Getting Started|Printing Files|7-2| 6 , 53
The UNIX Operating System has several different 
printing programs.  Some print your file without 
doing any formatting.  Others can perform very 
elaborate rearrangements of your text like numbering 
pages, centering titles, or making all of the lines 
of equal length.

P22

Getting Started|Printing Files|7-3| 6 , 64
All printing programs take their input from a file (created with
an editor) and send their output to one of 3 places:

                 *  your terminal screen,
                 *  a printer, or
                 *  another file.

P23

Getting Started|Printing Files|7-4| 4 , 56
Sometimes you may want to look at a copy of your file
exactly as it would appear in the editor--perhaps to 
check your formatting instructions.  Other times you
may want a formal, formatted copy.

P24

Getting Started|Printing Files|7-5| 5 , 57
Since it is faster to print on a screen than on paper, 
you may want to preview the output of a printing program 
on your screen before printing a paper copy.  Printing on 
your screen is known as making a soft copy.  Printing 
on paper is known as making a hard copy.

P25

Getting Started|Printing Files|7-6| 7 , 62
The cat program is the fastest printing program.  It:

     *  prints your file exactly as it looks in the editor,
     *  does no rearranging of your text,
     *  does not break the text into pages,
     *  prints from the beginning to the end without stopping,
     *  and, is good for scanning text rather than reading.

P26

Getting Started|Printing Files|7-7| 3 , 60
The more program was designed for viewing files on a screen.
It stops when the screen is full and waits for you to 
ask to see more by pressing <SPACE>.

P27

Getting Started|Printing Files|7-8| 6 , 52
The pr program prints your file exactly as it appears
in the editor except that it separates the text into 
pages with top and bottom margins and a header.  It 
allows you to specify things like the page length, 
margin width, or multiple column format.  You'll
learn more about these options in a later course.

P28

Getting Started|Printing Files|7-9| 5 , 51
The nroff program is very sophisticated.  It can
interpret elaborate formatting instructions that
you embed in your text file while using the editor.  
You will learn all about these instructions in a 
later course.

P29

Getting Started|Printing Files|7-10| 7 , 46
The file you create with the editor is called 
the input file.  What the printing programs 
produce is called the output.  

On the following screens you will see what an 
input and output file for nroff looks like, 
and some examples of formatting instructions.

P30

Getting Started|Printing Files|7-11| 7 , 54
The UNIX Operating System also contains programs 
that allow you to do complicated tables and scientific 
equations.  UNIX even has programs to check your 
writing style and spelling!


Next, we'll look at the UNIX directory structure.

TOPIC8

UNIX Directory Structure - 1.0.8

P31

Getting Started|UNIX Directory Structure|8-1| 6 , 48
In order to fully use your UNIX System, you must
understand the UNIX file system structure.

On your terminal screen, you will be introduced
to files and directories.

P32

Getting Started|UNIX Directory Structure|8-2| 6 , 53
You have seen the file we called practice.  A
file is merely a collection of information that
is referred to by a filename.  As with a filing
cabinet, you will probably create and maintain many
files.  UNIX provides a way for you to organize your 
files.  It is called a hierarchical file system.

P33

Getting Started|UNIX Directory Structure|8-3| 5 , 53
A directory is a special kind of file that contains
a list of filenames.  Directories can contain 
subdirectories which can be additional lists of filenames 
or more subdirectories.  These are organized like the
roots of a tree.

P34

Getting Started|UNIX Directory Structure|8-4| 3 , 46
When you log on, you are automatically placed
in a directory called your login directory or
your home directory.

P35

Getting Started|UNIX Directory Structure|8-5| 3 , 52
You can change to a different directory at any time.
Any directory that you change to is called your current
working directory.  If you do not change directories
after you log on, then your home directory is your 
current working directory.

P36

Getting Started|UNIX Directory Structure|8-6| 3 , 40
The ls command (for list files) allows
you to see what files are in your 
current working directory.

P37

Getting Started|UNIX Directory Structure|8-7| 4 , 52
Each file on the computer has a unique name known as
a full pathname which enables each file to be traced
through the file structure.  The pathname is really
a list of directory names separated by slashes (/).

P38

Getting Started|UNIX Directory Structure|8-8| 2 , 55
Let's take a look at a typical file system hierarchy
or file system tree to see how pathnames work.

P39

Getting Started|UNIX Directory Structure|8-9| 3 , 46
The pwd command (for print working directory)
will tell you the full pathname of your current 
working directory.

P40

Getting Started|UNIX Directory Structure|8-10| 1 , 24
Let's review a bit . . .

TOPIC9

UNIX Programmer's Manual - 1.0.9

P41

Getting Started|UNIX Distribution Format|9-1| 18 , 52
The UNIX Operating System is distributed in 3 sets:

          1 - the UNIX Operating System set,

          2 - the UNIX Development System set, and

          3 - the Text Processing System set.


                  
          UNIX   
        Operating                 
          System         UNIX    
                       Development                
                         System           Text    
                                       Processing 
                                         System   
                                                  

Getting Started|UNIX Programmer's Manual|9-1| 15 , 60
The programmer's manual provides information on most of the 
commands, files, and functions that have been delivered with 
your system.

      The manual is divided into 8 sections:

        1 - commands available to users,
        2 - system calls,
        3 - C library routines, including the standard I/O
            package, stdio and the math function library,
        4 - special files,
        5 - file formats and conventions,
        6 - games,
        7 - word processing packages, and
        8 - system maintenance commands and procedures.

P42

Getting Started|UNIX Programmer's Manual|9-2| 17 , 64
A standard format is used for all UNIX manual entries.

Each manual entry is made up of at least three sections:

1.  NAME - gives the name of the command and a short
    description of its effect.

2.  SYNOPSIS - provides the syntax for the command
    usage.  You enter the words in bold as they appear,
    other words in italics or underlined  denote the
    arguments to the command as described in the description
    section.  Square brackets are used for organization only; do
    not type the brackets.  An argument beginning  with a -
    usually denotes an option applicable to the command, for
    example,

pr  -o10  -m  file1  file2

P43

Getting Started|UNIX Programmer's Manual|9-3| 16 , 62
3.  The DESCRIPTION section describes the effect
    of the command and how its arguments are interpreted.

Other optional sections include:

      FILES - indicates files used by the commands

      SEE ALSO - provides references to the related commands

      DIAGNOSTICS - discusses diagnostics that may be produced

      BUGS - provides information on known bugs and design
         errors of the command

      EXAMPLE - provides an example of command usage and
         results produced

P44

Getting Started|UNIX Programmer's Manual|9-4| 7 , 61
Some systems have an on-line manual which can be displayed
on your screen with the man command.  To use this command,
you supply the name of the command you would like information
about as an argument.  For example, to see the manual
information on the who command, you would type:

man  who

TOPIC10

Other CTI Training Courseware - 1.0.10

P45

Getting Started|CTI's Training Courseware|10-1| 15 , 48
Congratulations!!!  You have just completed

CTI's Getting Started in UNIX Tutorial.

------------------------------------------------

This tutorial is only one from a series of
on-line CTI UNIX Courseware.

Other packages are available from:

CourseWare Technologies Inc.
11230 Sorrento Valley Road, Suite 115
San Diego, CA  92121
(619) - 452 - UNIX (8649)

P46

Getting Started|CTI's Training Courseware|10-2| 7 , 50
All courses contain:

      * extensive examples and illustrations,

      * practice on all important points, and

      * review sessions to solidify the exercises.

P47

Getting Started|CTI's Training Courseware|10-3| 9 , 41
      The CTI UNIX Tutorials
allow your students to learn at their
own pace, any time, and are always
available for review.

      Increase productivity and reduce
your training budget by using the CTI
UNIX Tutorials to teach users how to
be effective and efficient with UNIX.

P48

Getting Started|CTI's Training Courseware|10-4| 12 , 51
This ends your session.

Thank you for using CTI's

GETTING STARTED in UNIX Courseware.

For other Tutorials and information please contact:

CourseWare Technologies Inc. (CTI)
11230 Sorrento Valley Road, Suite 115
San Diego, CA  92121
(619) - 452 - UNIX (8649)