home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / doc / beginners / u1 < prev    next >
Encoding:
Text File  |  1979-01-10  |  12.6 KB  |  592 lines

  1. .nr PS 9
  2. .if t .nr VS 11
  3. .if n .ls 2
  4. .if t .2C
  5. .nr PI .25i
  6. .SH
  7. INTRODUCTION
  8. .PP
  9. From the user's point of view,
  10. the
  11. .UC UNIX
  12. operating system
  13. is easy
  14. to learn and use,
  15. and presents few of the usual impediments
  16. to getting the job done.
  17. It is hard, however, for the beginner
  18. to know where to start,
  19. and how to make the best use 
  20. of the facilities available.
  21. The purpose of this introduction
  22. is to help new users
  23. get used to the main ideas of 
  24. the
  25. .UC UNIX
  26. system
  27. and start making effective use of it quickly.
  28. .PP
  29. You should have a couple of other documents with you
  30. for easy reference as you read this one.
  31. The most important is
  32. .ul
  33. The
  34. .ul
  35. .UC UNIX
  36. .IT Programmer's
  37. .IT Manual \|;
  38. it's often easier to tell you to read about something
  39. in the manual
  40. than to repeat its contents here.
  41. The other useful document is
  42. .ul
  43. A Tutorial Introduction to the
  44. .ul
  45. .UC UNIX
  46. .ul
  47. Text Editor,
  48. which will tell you how to use the editor
  49. to get text \(em
  50. programs, data, documents \(em
  51. into the computer.
  52. .PP
  53. A word of warning:
  54. the
  55. .UC UNIX
  56. system
  57. has become quite popular,
  58. and there are several major variants
  59. in widespread use.
  60. Of course details also change with time.
  61. So although the basic structure of 
  62. .UC UNIX
  63. and how to use it is common to all versions,
  64. there will certainly be a few things
  65. which are different on your system from
  66. what is described here.
  67. We have tried to minimize the problem,
  68. but be aware of it.
  69. In cases of doubt,
  70. this paper describes Version 7 
  71. .UC UNIX .
  72. .PP
  73. This paper has five sections:
  74. .IP "\ \ 1."
  75. Getting Started:
  76. How to log in,
  77. how to type,
  78. what to do about mistakes in typing,
  79. how to log out.
  80. Some of this is dependent on which
  81. system
  82. you log into
  83. (phone numbers, for example)
  84. and what terminal you use,
  85. so this section must necessarily be supplemented
  86. by local information.
  87. .IP "\ \ 2."
  88. Day-to-day Use:
  89. Things you need every day to use
  90. the system
  91. effectively:
  92. generally useful commands;
  93. the file system.
  94. .IP "\ \ 3."
  95. Document Preparation:
  96. Preparing manu\%scripts is one of the most common uses
  97. for
  98. .UC UNIX
  99. systems.
  100. This section contains advice,
  101. but not
  102. extensive instructions on any
  103. of the formatting tools.
  104. .IP "\ \ 4."
  105. Writing Programs:
  106. .UC UNIX
  107. is an excellent system for developing programs.
  108. This section talks about some of the tools,
  109. but again is not a tutorial in any of the programming languages
  110. provided by the system.
  111. .IP "\ \ 5."
  112. A
  113. .UC UNIX
  114. Reading List.
  115. An annotated bibliography of 
  116. documents that new users should be aware of.
  117. .SH
  118. I.  GETTING STARTED
  119. .SH
  120. Logging In
  121. .PP
  122. You must have a 
  123. .UC UNIX
  124. login name, which you can get from
  125. whoever administers your system.
  126. You also need to know the phone number,
  127. unless your system uses permanently connected terminals.
  128. The
  129. .UC UNIX
  130. system
  131. is capable of dealing with a wide variety of terminals:
  132. Terminet 300's; Execuport, TI and similar
  133. portables;
  134. video (CRT) terminals like the HP2640, etc.;
  135. high-priced graphics terminals like the Tektronix 4014;
  136. plotting terminals like those from GSI and DASI;
  137. and even the venerable
  138. Teletype in its various forms.
  139. But note:
  140. .UC UNIX
  141. is strongly oriented towards devices with 
  142. .ul
  143. lower case.
  144. If your terminal produces only upper case (e.g., model 33 Teletype, some video and portable terminals),
  145. life will be so difficult that you should look for another
  146. terminal.
  147. .PP
  148. Be sure to set the switches appropriately on your device.
  149. Switches that might need to be adjusted include the speed,
  150. upper/lower case mode,
  151. full duplex, even parity, and any others
  152. that local wisdom advises.
  153. Establish a connection using whatever
  154. magic is needed for your terminal;
  155. this may involve dialing a telephone call or merely flipping a switch.
  156. In either case,
  157. .UC UNIX
  158. should type
  159. .UL login: '' ``
  160. at you.
  161. If it types garbage, you may be at the wrong speed;
  162. check the switches.
  163. If that fails,
  164. push the ``break'' or ``interrupt'' key a few times, slowly.
  165. If that fails to produce a login message, consult a guru.
  166. .PP
  167. When you get a
  168. .UL login:
  169. message,
  170. type your
  171. login name
  172. .ul
  173. in lower case.
  174. Follow it by a 
  175. .UC RETURN ;
  176. the system will not do anything until you type a
  177. .UC RETURN .
  178. If a password is required,
  179. you will be asked for it,
  180. and (if possible)
  181. printing will be turned off while you type it.
  182. Don't forget
  183. .UC RETURN .
  184. .PP
  185. The culmination of your login efforts is a
  186. ``prompt character,''
  187. a single character that indicates that
  188. the system
  189. is ready to accept commands from you.
  190. The prompt character is usually a 
  191. dollar sign
  192. .UL $
  193. or a
  194. percent sign
  195. .UL % .
  196. (You may also get a message of the day just before the
  197. prompt character, or a notification that you have mail.)
  198. .SH
  199. Typing Commands
  200. .PP
  201. Once you've seen the prompt character, you can type commands,
  202. which are
  203. requests that
  204. the system
  205. do something.
  206. Try typing
  207. .P1
  208. date
  209. .P2
  210. followed by 
  211. .UC RETURN.
  212. You should get back something like
  213. .P1
  214. Mon Jan 16 14:17:10 EST 1978
  215. .P2
  216. Don't forget the
  217. .UC RETURN
  218. after the command,
  219. or nothing will happen.
  220. If you think you're being ignored,
  221. type a
  222. .UC RETURN ;
  223. something should happen.
  224. .UC RETURN
  225. won't be mentioned
  226. again,
  227. but don't forget it \(em
  228. it has to be there
  229. at the end of each line.
  230. .PP
  231. Another command you might try is
  232. .UL who ,
  233. which tells you everyone who is currently logged in:
  234. .P1
  235. who
  236. .P2
  237. gives something like
  238. .P1
  239. .ta .5i 1i
  240. mb    tty01    Jan 16    09:11
  241. ski    tty05    Jan 16    09:33
  242. gam    tty11    Jan 16    13:07
  243. .P2
  244. The time is when the user logged in;
  245. ``ttyxx'' is the system's idea of what terminal
  246. the user is on.
  247. .PP
  248. If you make a mistake typing the command name,
  249. and refer to a non-existent command,
  250. you will be told.
  251. For example, if you type
  252. .P1
  253. whom
  254. .P2
  255. you will be told 
  256. .P1
  257. whom: not found
  258. .P2
  259. Of course, if you inadvertently type the name of some other command,
  260. it will run,
  261. with more or less mysterious results.
  262. .SH
  263. Strange Terminal Behavior
  264. .PP
  265. Sometimes you can get into a state
  266. where your terminal acts strangely.
  267. For example,
  268. each letter may be typed twice,
  269. or the
  270. .UC RETURN
  271. may not cause a line feed
  272. or a return to the left margin.
  273. You can often fix this by logging out and logging back in.
  274. Or you can read the description of the command
  275. .UL stty
  276. in section I of the manual.
  277. To get intelligent treatment of
  278. tab characters
  279. (which are much used in
  280. .UC UNIX )
  281. if your terminal doesn't have tabs,
  282. type the command
  283. .P1
  284. stty \-tabs
  285. .P2
  286. and the system will convert each tab into the right number
  287. of blanks for you.
  288. If your terminal does have computer-settable tabs,
  289. the command
  290. .UL tabs
  291. will set the stops correctly for you.
  292. .SH
  293. Mistakes in Typing
  294. .PP
  295. If you make a typing mistake, and see it before
  296. .UC RETURN
  297. has been typed,
  298. there are two ways to recover.
  299. The sharp-character
  300. .UL #
  301. erases the last character typed;
  302. in fact successive uses of
  303. .UL #
  304. erase characters back to
  305. the beginning of the line (but not beyond).
  306. So if you type badly, you can correct as you go:
  307. .P1
  308. dd#atte##e
  309. .P2
  310. is the same as
  311. .UL date .
  312. .PP
  313. The at-sign
  314. .UL @
  315. erases all of the characters
  316. typed so far
  317. on the current input line,
  318. so if the line is irretrievably fouled up, type an
  319. .UL @
  320. and start the line over.
  321. .PP
  322. What if you must enter a sharp or at-sign
  323. as part of the text?
  324. If you precede either
  325. .UL #
  326. or
  327. .UL @
  328. by a backslash
  329. .UL \e ,
  330. it loses its erase meaning.
  331. So to enter a sharp or at-sign in something, type
  332. .UL \e# 
  333. or
  334. .UL \e@ .
  335. The system will always echo a newline at you after your at-sign,
  336. even if preceded by a backslash.
  337. Don't worry \(em
  338. the at-sign has been recorded.
  339. .PP
  340. To erase a backslash,
  341. you have to type two sharps or two at-signs, as in
  342. .UL \e## .
  343. The backslash is used extensively in
  344. .UC UNIX
  345. to indicate that the following character is in some way special.
  346. .SH
  347. Read-ahead
  348. .PP
  349. .UC UNIX
  350. has full read-ahead,
  351. which means that you can type as fast as you want,
  352. whenever you want,
  353. even when some command is typing at you.
  354. If you type during output,
  355. your input characters will appear intermixed with the output characters,
  356. but they will be stored away
  357. and interpreted in the correct order.
  358. So you can type several commands one after another without
  359. waiting for the first to finish or even begin.
  360. .SH
  361. Stopping a Program
  362. .PP
  363. You can stop most programs by
  364. typing the character
  365. .UC DEL '' ``
  366. (perhaps called ``delete'' or ``rubout'' on your terminal).
  367. The ``interrupt'' or ``break'' key found on most terminals
  368. can also be used.
  369. In a few programs, like the text editor,
  370. .UC DEL
  371. stops whatever the program is doing but leaves you in that program.
  372. Hanging up the phone will stop most programs.
  373. .SH
  374. Logging Out
  375. .PP
  376. The easiest way to log out is to hang up the phone.
  377. You can also type
  378. .P1
  379. login
  380. .P2
  381. and let someone else use the terminal you were on.
  382. It is usually not sufficient just to turn off the terminal.
  383. Most
  384. .UC UNIX
  385. systems
  386. do not use a time-out mechanism, so you'll be
  387. there forever unless you hang up.
  388. .SH
  389. Mail
  390. .PP
  391. When you log in, you may sometimes get the message
  392. .P1
  393. You have mail.
  394. .P2
  395. .UC UNIX
  396. provides a postal system so you can
  397. communicate with
  398. other users of the system.
  399. To read your mail,
  400. type the command
  401. .P1
  402. mail
  403. .P2
  404. Your mail will be printed,
  405. one message at a time,
  406. most recent message first.
  407. After each message,
  408. .UL mail
  409. waits for you to say what to do with it.
  410. The two basic responses are
  411. .UL d ,
  412. which deletes the message,
  413. and
  414. .UC RETURN ,
  415. which does not
  416. (so it will still be there the next time you read your mailbox).
  417. Other responses are described in the manual.
  418. (Earlier versions of
  419. .UL mail
  420. do not process one message at a time,
  421. but are otherwise similar.)
  422. .PP
  423. How do you send mail to someone else?
  424. Suppose it is to go to ``joe'' (assuming ``joe'' is someone's login name).
  425. The easiest way is this:
  426. .P1
  427. mail joe
  428. .ft I
  429. now type in the text of the letter
  430. on as many lines as you like ...
  431. After the last line of the letter
  432. type the character ``control-d'',
  433. that is, hold down ``control'' and type
  434. a letter ``d''.
  435. .P2
  436. And that's it.
  437. The ``control-d'' sequence, often called ``EOF'' for end-of-file, is used throughout 
  438. the system
  439. to mark the end of input from a terminal,
  440. so you might as well get used to it.
  441. .PP
  442. For practice, send mail to yourself.
  443. (This isn't as strange as it might sound \(em
  444. mail to oneself is a handy reminder mechanism.)
  445. .PP
  446. There are other ways to send mail \(em
  447. you can send a previously prepared letter,
  448. and you can mail to a number of people all at once.
  449. For more details see
  450. .UL mail (1).
  451. (The notation
  452. .UL mail (1)
  453. means the command 
  454. .UL mail
  455. in section 1
  456. of the
  457. .ul
  458. .UC UNIX
  459. .ul
  460. .IT Programmer's
  461. .IT Manual .)
  462. .SH
  463. Writing to other users
  464. .PP
  465. At some point, 
  466. out of the blue will come a message
  467. like
  468. .P1
  469. Message from joe tty07...
  470. .P2
  471. accompanied by a startling beep.
  472. It means that Joe wants to talk to you,
  473. but unless you take explicit action you won't be able to talk back.
  474. To respond,
  475. type the command
  476. .P1
  477. write joe
  478. .P2
  479. This establishes a two-way communication path.
  480. Now whatever Joe types on his terminal will appear on yours
  481. and vice versa.
  482. The path is slow, rather like talking to the moon.
  483. (If you are in the middle of something, you have to
  484. get to a state where you can type a command.
  485. Normally, whatever program you are running has to terminate or be terminated.
  486. If you're editing, you can escape temporarily from the editor \(em
  487. read the editor tutorial.)
  488. .PP
  489. A protocol is needed to keep what you type from getting
  490. garbled up with what Joe types. 
  491. Typically it's like this:
  492. .P1
  493. .tr --
  494. .fi
  495. .ft R
  496. Joe types
  497. .UL write
  498. .UL smith
  499. and waits.
  500. .br
  501. Smith types
  502. .UL write
  503. .UL joe
  504. and waits.
  505. .br
  506. Joe now types his message
  507. (as many lines as he likes).
  508. When he's ready for a reply, he
  509. signals it by typing
  510. .UL (o) ,
  511. which
  512. stands for ``over''.
  513. .br
  514. Now Smith types a reply, also
  515. terminated by
  516. .UL (o) .
  517. .br
  518. This cycle repeats until
  519. someone gets tired; he then
  520. signals his intent to quit with
  521. .UL (oo) ,
  522. for ``over
  523. and out''.
  524. .br
  525. To terminate
  526. the conversation, each side must
  527. type a ``control-d'' character alone
  528. on a line. (``Delete'' also works.)
  529. When the other person types his ``control-d'',
  530. you will get the message
  531. .UL EOF
  532. on your terminal.
  533. .P2
  534. .PP
  535. If you write to someone who isn't logged in,
  536. or who doesn't want to be disturbed,
  537. you'll be told.
  538. If the target is logged in but doesn't answer
  539. after a decent interval,
  540. simply type ``control-d''.
  541. .SH
  542. On-line Manual
  543. .PP
  544. The 
  545. .ul
  546. .UC UNIX
  547. .ul
  548. Programmer's Manual
  549. is typically kept on-line.
  550. If you get stuck on something,
  551. and can't find an expert to assist you,
  552. you can print on your terminal some manual section that might help.
  553. This is also useful for getting the most up-to-date
  554. information on a command.
  555. To print a manual section, type
  556. ``man command-name''.
  557. Thus to read up on the 
  558. .UL who
  559. command,
  560. type
  561. .P1
  562. man who
  563. .P2
  564. and, of course,
  565. .P1
  566. man man
  567. .P2
  568. tells all about the
  569. .UL man
  570. command.
  571. .SH
  572. Computer Aided Instruction
  573. .PP
  574. Your
  575. .UC UNIX
  576. system may have available
  577. a program called
  578. .UL learn ,
  579. which provides computer aided instruction on
  580. the file system and basic commands,
  581. the editor,
  582. document preparation,
  583. and even C programming.
  584. Try typing the command
  585. .P1
  586. learn
  587. .P2
  588. If 
  589. .UL learn
  590. exists on your system,
  591. it will tell you what to do from there.
  592.