[BACK]Return to u1 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / doc / usd / 01.begin

File: [cvs.NetBSD.org] / src / share / doc / usd / 01.begin / u1 (download)

Revision 1.1, Thu Nov 29 12:35:06 2007 UTC (12 years, 11 months ago) by mjf
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, mjf-devfs2, matt-premerge-20091211, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, matt-armv6-nbase, matt-armv6-base, localcount-20160914, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, is-mlppp-base, is-mlppp, hpcarm-cleanup-nbase, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, cherry-xenmp-base, cherry-xenmp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver, HEAD
Branch point for: matt-armv6

Commit Caldera licensed documentation from 4.4BSD. This was taken from the
OpenBSD tree.

No objections on netbsd-docs.

.\"	$NetBSD: u1,v 1.1 2007/11/29 12:35:06 mjf Exp $
.\"
.\" Copyright (C) Caldera International Inc.  2001-2002.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code and documentation must retain the above
.\"    copyright notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed or owned by Caldera
.\"	International, Inc.
.\" 4. Neither the name of Caldera International, Inc. nor the names of other
.\"    contributors may be used to endorse or promote products derived from
.\"    this software without specific prior written permission.
.\"
.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT,
.\" INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.\"	@(#)u1	8.1 (Berkeley) 6/8/93
.\"
.nr PS 9
.if t .nr VS 11
.if n .ls 2
.nr PI .25i
.SH
INTRODUCTION
.PP
From the user's point of view,
the
.UC UNIX
operating system
is easy
to learn and use,
and presents few of the usual impediments
to getting the job done.
It is hard, however, for the beginner
to know where to start,
and how to make the best use 
of the facilities available.
The purpose of this introduction
is to help new users
get used to the main ideas of 
the
.UC UNIX
system
and start making effective use of it quickly.
.PP
You should have a couple of other documents with you
for easy reference as you read this one.
The most important is
.ul
The
.ul
.UC UNIX
.IT Programmer's
.IT Manual \|;
it's often easier to tell you to read about something
in the manual
than to repeat its contents here.
The other useful document is
.ul
A Tutorial Introduction to the
.ul
.UC UNIX
.ul
Text Editor,
which will tell you how to use the editor
to get text \(em
programs, data, documents \(em
into the computer.
.PP
A word of warning:
the
.UC UNIX
system
has become quite popular,
and there are several major variants
in widespread use.
Of course details also change with time.
So although the basic structure of 
.UC UNIX
and how to use it is common to all versions,
there will certainly be a few things
which are different on your system from
what is described here.
We have tried to minimize the problem,
but be aware of it.
In cases of doubt,
this paper describes Version 7 
.UC UNIX .
.PP
This paper has five sections:
.IP "\ \ 1."
Getting Started:
How to log in,
how to type,
what to do about mistakes in typing,
how to log out.
Some of this is dependent on which
system
you log into
(phone numbers, for example)
and what terminal you use,
so this section must necessarily be supplemented
by local information.
.IP "\ \ 2."
Day-to-day Use:
Things you need every day to use
the system
effectively:
generally useful commands;
the file system.
.IP "\ \ 3."
Document Preparation:
Preparing manu\%scripts is one of the most common uses
for
.UC UNIX
systems.
This section contains advice,
but not
extensive instructions on any
of the formatting tools.
.IP "\ \ 4."
Writing Programs:
.UC UNIX
is an excellent system for developing programs.
This section talks about some of the tools,
but again is not a tutorial in any of the programming languages
provided by the system.
.IP "\ \ 5."
A
.UC UNIX
Reading List.
An annotated bibliography of 
documents that new users should be aware of.
.SH
I.  GETTING STARTED
.SH
Logging In
.PP
You must have a 
.UC UNIX
login name, which you can get from
whoever administers your system.
You also need to know the phone number,
unless your system uses permanently connected terminals.
The
.UC UNIX
system
is capable of dealing with a wide variety of terminals:
Terminet 300's; Execuport, TI and similar
portables;
video (CRT) terminals like the HP2640, etc.;
high-priced graphics terminals like the Tektronix 4014;
plotting terminals like those from GSI and DASI;
and even the venerable
Teletype in its various forms.
But note:
.UC UNIX
is strongly oriented towards devices with 
.ul
lower case.
If your terminal produces only upper case (e.g., model 33 Teletype, some video and portable terminals),
life will be so difficult that you should look for another
terminal.
.PP
Be sure to set the switches appropriately on your device.
Switches that might need to be adjusted include the speed,
upper/lower case mode,
full duplex, even parity, and any others
that local wisdom advises.
Establish a connection using whatever
magic is needed for your terminal;
this may involve dialing a telephone call or merely flipping a switch.
In either case,
.UC UNIX
should type
.UL login: '' ``
at you.
If it types garbage, you may be at the wrong speed;
check the switches.
If that fails,
push the ``break'' or ``interrupt'' key a few times, slowly.
If that fails to produce a login message, consult a guru.
.PP
When you get a
.UL login:
message,
type your
login name
.ul
in lower case.
Follow it by a 
.UC RETURN ;
the system will not do anything until you type a
.UC RETURN .
If a password is required,
you will be asked for it,
and (if possible)
printing will be turned off while you type it.
Don't forget
.UC RETURN .
.PP
The culmination of your login efforts is a
``prompt character,''
a single character that indicates that
the system
is ready to accept commands from you.
The prompt character is usually a 
dollar sign
.UL $
or a
percent sign
.UL % .
(You may also get a message of the day just before the
prompt character, or a notification that you have mail.)
.SH
Typing Commands
.PP
Once you've seen the prompt character, you can type commands,
which are
requests that
the system
do something.
Try typing
.P1
date
.P2
followed by 
.UC RETURN.
You should get back something like
.P1
Mon Jan 16 14:17:10 EST 1978
.P2
Don't forget the
.UC RETURN
after the command,
or nothing will happen.
If you think you're being ignored,
type a
.UC RETURN ;
something should happen.
.UC RETURN
won't be mentioned
again,
but don't forget it \(em
it has to be there
at the end of each line.
.PP
Another command you might try is
.UL who ,
which tells you everyone who is currently logged in:
.P1
who
.P2
gives something like
.P1
.ta .5i 1i
mb	tty01	Jan 16    09:11
ski	tty05	Jan 16    09:33
gam	tty11	Jan 16    13:07
.P2
The time is when the user logged in;
``ttyxx'' is the system's idea of what terminal
the user is on.
.PP
If you make a mistake typing the command name,
and refer to a non-existent command,
you will be told.
For example, if you type
.P1
whom
.P2
you will be told 
.P1
whom: not found
.P2
Of course, if you inadvertently type the name of some other command,
it will run,
with more or less mysterious results.
.SH
Strange Terminal Behavior
.PP
Sometimes you can get into a state
where your terminal acts strangely.
For example,
each letter may be typed twice,
or the
.UC RETURN
may not cause a line feed
or a return to the left margin.
You can often fix this by logging out and logging back in.\(dg
.FS
\(dg In Berkeley Unix, the command "reset<control-j>"
will often reset a terminal apparently in a strange state because a fullscreen
editor crashed.
.FE
Or you can read the description of the command
.UL stty
in section 1 of the manual.
To get intelligent treatment of
tab characters
(which are much used in
.UC UNIX )
if your terminal doesn't have tabs,
type the command
.P1
stty \-tabs
.P2
and the system will convert each tab into the right number
of blanks for you.
.SH
Mistakes in Typing
.PP
If you make a typing mistake, and see it before
.UC RETURN
has been typed,
there are two ways to recover.
The sharp-character
.UL #
erases the last character typed;
in fact successive uses of
.UL #
erase characters back to
the beginning of the line (but not beyond).
So if you type badly, you can correct as you go:
.P1
dd#atte##e
.P2
is the same as
.UL date .\(dd
.FS
\(dd Many installations set the erase character for display terminals to
the delete or backspace key. "stty all" tells you what it actually is.
.FE
.PP
The at-sign
.UL @
erases all of the characters
typed so far
on the current input line,
so if the line is irretrievably fouled up, type an
.UL @
and start the line over.
.PP
What if you must enter a sharp or at-sign
as part of the text?
If you precede either
.UL #
or
.UL @
by a backslash
.UL \e ,
it loses its erase meaning.
So to enter a sharp or at-sign in something, type
.UL \e# 
or
.UL \e@ .
The system will always echo a newline at you after your at-sign,
even if preceded by a backslash.
Don't worry \(em
the at-sign has been recorded.
.PP
To erase a backslash,
you have to type two sharps or two at-signs, as in
.UL \e## .
The backslash is used extensively in
.UC UNIX
to indicate that the following character is in some way special.
.SH
Read-ahead
.PP
.UC UNIX
has full read-ahead,
which means that you can type as fast as you want,
whenever you want,
even when some command is typing at you.
If you type during output,
your input characters will appear intermixed with the output characters,
but they will be stored away
and interpreted in the correct order.
So you can type several commands one after another without
waiting for the first to finish or even begin.
.SH
Stopping a Program
.PP
You can stop most programs by
typing the character
.UC DEL '' ``
(perhaps called ``delete'' or ``rubout'' on your terminal).
The ``interrupt'' or ``break'' key found on most terminals
can also be used.\(dg
.FS
\(dg In Berkeley Unix, "control-c" is the usual way to stop programs. "stty all"
tells you the value of your "intr" key.
.FE
In a few programs, like the text editor,
.UC DEL
stops whatever the program is doing but leaves you in that program.
Hanging up the phone will stop most programs.\(dd
.FS
\(dd In most modern shells, programs running in the background continue 
running even if you hang up.
.FE
.SH
Logging Out
.PP
The easiest way to log out is to hang up the phone.
You can also type
.P1
login
.P2
and let someone else use the terminal you were on.*
.FS
* "control-d" and "logout" are other alternatives.
.FE
It is usually not sufficient just to turn off the terminal.
Most
.UC UNIX
systems
do not use a time-out mechanism, so you'll be
there forever unless you hang up.
.SH
Mail
.PP
When you log in, you may sometimes get the message
.P1
You have mail.
.P2
.UC UNIX
provides a postal system so you can
communicate with
other users of the system.
To read your mail,
type the command
.P1
mail
.P2
The headers of your mail will be printed, in the order of their receipt.
A message can be read with the
.UL print
command,
or specified directly by number.
Other commands are described in the manual.
(Earlier versions of
.UL mail
do not process one message at a time,
but are otherwise similar.)
.PP
How do you send mail to someone else?
Suppose it is to go to ``joe'' (assuming ``joe'' is someone's login name).
The easiest way is this:
.P1
mail joe
.ft I
now type in the text of the letter
on as many lines as you like ...
After the last line of the letter
type the character ``.'',
alone on the last line,
like so:
\&.
.P2
And that's it.
.PP
For practice, send mail to yourself.
(This isn't as strange as it might sound \(em
mail to oneself is a handy reminder mechanism.)
.PP
There are other ways to send mail \(em
you can send a previously prepared letter,
and you can mail to a number of people all at once.
For more details, see
.UL mail (1).
(The notation
.UL mail (1)
means the command 
.UL mail
in section 1
of the
.ul
.UC UNIX
.ul
.IT Programmer's
.IT Manual .)
.SH
Writing to other users\(dg
.FS
\(dg Although "write" works on Berkeley
.UC UNIX,
there is a much nicer way of communicating using display-terminals \(em
"talk" splits the screen into two sections, and both of you can type 
simultaneously (see talk(1)).
.FE
.PP
At some point, 
out of the blue will come a message
like
.P1
Message from joe tty07...
.P2
accompanied by a startling beep.
It means that Joe wants to talk to you,
but unless you take explicit action you won't be able to talk back.
To respond,
type the command
.P1
write joe
.P2
This establishes a two-way communication path.
Now whatever Joe types on his terminal will appear on yours
and vice versa.
The path is slow, rather like talking to the moon.
(If you are in the middle of something, you have to
get to a state where you can type a command.
Normally, whatever program you are running has to terminate or be terminated.
If you're editing, you can escape temporarily from the editor \(em
read the editor tutorial.)
.PP
A protocol is needed to keep what you type from getting
garbled up with what Joe types. 
Typically it's like this:
.P1
.tr --
.fi
.ft R
Joe types
.UL write
.UL smith
and waits.
.br
Smith types
.UL write
.UL joe
and waits.
.br
Joe now types his message
(as many lines as he likes).
When he's ready for a reply, he
signals it by typing
.UL (o) ,
which
stands for ``over''.
.br
Now Smith types a reply, also
terminated by
.UL (o) .
.br
This cycle repeats until
someone gets tired; he then
signals his intent to quit with
.UL (oo) ,
for ``over
and out''.
.br
To terminate
the conversation, each side must
type a ``control-d'' character alone
on a line.
When the other person types his ``control-d'',
you will get the message
.UL EOF
on your terminal.
.P2
.PP
If you write to someone who isn't logged in,
or who doesn't want to be disturbed,
you'll be told.
If the target is logged in but doesn't answer
after a decent interval,
simply type ``control-d''.
.SH
On-line Manual
.PP
The 
.ul
.UC UNIX
.ul
Programmer's Manual
is typically kept on-line.
If you get stuck on something,
and can't find an expert to assist you,
you can print on your terminal some manual section that might help.
This is also useful for getting the most up-to-date
information on a command.
To print a manual section, type
``man command-name''.
Thus to read up on the 
.UL who
command,
type
.P1
man who
.P2
and, of course,
.P1
man man
.P2
tells all about the
.UL man
command.
.SH
Computer Aided Instruction
.PP
Your
.UC UNIX
system may have available
a program called
.UL learn ,
which provides computer aided instruction on
the file system and basic commands,
the editor,
document preparation,
and even C programming.
Try typing the command
.P1
learn
.P2
If 
.UL learn
exists on your system,
it will tell you what to do from there.