summaryrefslogtreecommitdiff
path: root/share/doc/usd/01.begin/u1
blob: 3e7b05de509bd8d39c6bad5e7aac0d219040ffe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
.\"	$OpenBSD: u1,v 1.2 2003/08/09 09:00:14 jmc 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.