|
|
1.1 ! root 1: .tr | ! 2: .bp ! 3: .ce ! 4: HOW TO GET STARTED ! 5: .sp 1.5 ! 6: This section provides the basic information ! 7: you need to get started on \s8UNIX\s10: ! 8: how to log in and log out, ! 9: how to communicate through your terminal, ! 10: and how to run a program. ! 11: .pg ! 12: .ft I ! 13: Logging in.|| ! 14: .ft R ! 15: You must call \s8UNIX\s10 from an appropriate terminal. ! 16: \s8UNIX\s10 supports \s8ASCII\s10 terminals typified by the \s8TTY\s10 37, ! 17: the GE Terminet 300, the Memorex 1240, and various ! 18: graphical terminals. ! 19: You must also have a valid user name, ! 20: which may be obtained, together with the telephone number, from the system administrators. ! 21: The same telephone number ! 22: serves terminals operating at all the standard speeds. ! 23: After a data connection is established, ! 24: the login procedure depends on what kind of terminal ! 25: you are using. ! 26: .pg ! 27: .in .5i ! 28: .ul ! 29: \s8TTY\s10 37 terminal:|| ! 30: \s8UNIX\s10 will type out ``login: ''; you respond with ! 31: your user name. ! 32: From the \s8TTY\s10 37 terminal, and any other which has the ``new-line'' ! 33: function (combined carriage return and linefeed), terminate each line you type with the ! 34: ``new-line'' key ! 35: (\fInot\fR the ``return'' key). ! 36: .pg ! 37: .ul ! 38: 300-baud terminals:|| ! 39: Such terminals include the GE Terminet 300, most display terminals, ! 40: Execuport, TI, and certain ! 41: Anderson-Jacobson terminals. ! 42: These terminals generally have a speed ! 43: switch which should be set at ``300'' (or ``30'' for ! 44: 30 characters per second) ! 45: and a half/full duplex switch which should be set at ! 46: full-duplex. ! 47: (Note that this switch will often have to be changed ! 48: since many other systems require half-duplex). ! 49: When a connection is established, a few garbage ! 50: characters are typed (the login message at the wrong speed). ! 51: Depress the ``break'' key; ! 52: this is a speed-independent signal to \s8UNIX\s10 that a 300-baud ! 53: terminal is in use. ! 54: \s8UNIX\s10 will type ``login: '' at the correct speed; you type your ! 55: user name, followed by the ``return'' key. ! 56: Henceforth, the ``return'', ``new line'', or ``linefeed'' keys ! 57: will give exactly the same results. ! 58: .pg ! 59: .in 0 ! 60: For all these terminals, it is important ! 61: that you type your name in lower case if possible; if you type ! 62: upper case letters, \s8UNIX\s10 ! 63: will assume that your terminal cannot generate lower-case ! 64: letters and will translate all subsequent upper-case ! 65: letters to lower case. ! 66: .pg ! 67: The evidence that you have successfully ! 68: logged in is that the Shell program ! 69: will type a ``%'' to you. ! 70: (The Shell is described below under ! 71: ``How to run a program.'') ! 72: .pg ! 73: For more information, consult ! 74: \fIgetty\fR (VII), which discusses the login sequence in more ! 75: detail, and \fIdc\fR (IV), which discusses typewriter I/O. ! 76: .pg ! 77: .ul ! 78: Logging out.|| ! 79: There are three ways to log out: ! 80: .pg ! 81: .in .5i ! 82: You can simply hang up the phone. ! 83: .pg ! 84: You can log out by typing an end-of-file indication ! 85: (EOT character, control ``d'') to the Shell. ! 86: The Shell will terminate and the ``login: '' message ! 87: will appear again. ! 88: .pg ! 89: You can also log in directly as another user ! 90: by giving a \fIlogin\fR command (I). ! 91: .pg ! 92: .in 0 ! 93: .ul ! 94: How to communicate through your terminal.|| ! 95: When you type to \s8UNIX\s10, a gnome deep in the system ! 96: is gathering your characters and saving them in a secret ! 97: place. ! 98: The ! 99: characters will not be given to a program ! 100: until you type a return (or new-line), as described above ! 101: in ! 102: .ul ! 103: Logging in. ! 104: .pg ! 105: \s8UNIX\s10 typewriter I/O is full-duplex. ! 106: It has full read-ahead, which means that you can ! 107: type at any time, ! 108: even while a program is ! 109: typing at you. ! 110: Of course, if you type during output, the output will ! 111: have the input characters interspersed. ! 112: However, whatever you type will be saved ! 113: up and interpreted in correct sequence. ! 114: There is a limit to the amount of read-ahead, ! 115: but it is generous and not likely to be exceeded unless ! 116: the system is in trouble. ! 117: When the read-ahead limit is exceeded, the system ! 118: throws away all the saved characters. ! 119: (We reassure you that this doesn't happen often.)| ! 120: .pg ! 121: On a typewriter input line, the character ``@'' ! 122: kills all the characters typed before it, so typing mistakes ! 123: can be repaired on a single line. ! 124: Also, the character ``#'' erases the last character typed. ! 125: Successive uses of ``#'' erase characters back to, but ! 126: not beyond, the beginning of the line. ! 127: ``@'' and ``#'' can be transmitted to a program ! 128: by preceding them with ``\\''. ! 129: (So, to erase ``\\'', you need two ``#''s). ! 130: .pg ! 131: The \s8ASCII\s10 ``delete'' (a.k.a. ``rubout'') character is not passed to programs ! 132: but instead generates ! 133: an ! 134: .ul ! 135: interrupt signal. ! 136: This signal ! 137: generally causes whatever program ! 138: you are running to terminate. ! 139: It is typically used to stop a long printout that ! 140: you don't want. ! 141: However, programs can arrange either to ignore ! 142: this signal altogether, ! 143: or to be notified when it happens (instead ! 144: of being terminated). ! 145: The editor, for example, catches interrupts and ! 146: stops what it is doing, ! 147: instead of terminating, so that an interrupt can ! 148: be used to halt an editor printout without ! 149: losing the file being edited. ! 150: .pg ! 151: The \fIquit\fR signal is generated ! 152: by typing the \s8ASCII\s10 FS character. ! 153: It not only causes a running program to terminate ! 154: but also generates a file with the core image ! 155: of the terminated process. ! 156: Quit is useful ! 157: for debugging. ! 158: .pg ! 159: Besides adapting to the speed of the terminal, ! 160: \s8UNIX\s10 tries to be intelligent about whether ! 161: you have a terminal with the new-line function ! 162: or whether it must be simulated with carriage-return ! 163: and line-feed. ! 164: In the latter case, all input carriage returns ! 165: are turned to new-line characters (the standard ! 166: line delimiter) ! 167: and both a carriage return and a line feed ! 168: are echoed to the terminal. ! 169: If you get into the wrong mode, the \fIstty\fR command ! 170: (I) will rescue you. ! 171: .pg ! 172: Tab characters are used freely in \s8UNIX\s10 source programs. ! 173: If your terminal does not have the tab function, ! 174: you can arrange to have them turned into spaces ! 175: during output, and echoed as spaces ! 176: during input. ! 177: The system assumes ! 178: that tabs are set every eight columns. ! 179: Again, the \fIstty\fR command (I) ! 180: will set or reset this mode. ! 181: Also, there is a file which, if printed on \s8TTY\s10 37 ! 182: or TermiNet 300 terminals, will set the tab stops ! 183: correctly (\fItabs\fR (VII)). ! 184: .pg ! 185: Section \fIdc\fR (IV) discusses typewriter I/O more fully. ! 186: Section \fIkl\fR (IV) discusses the console typewriter. ! 187: .pg ! 188: .ul ! 189: How to run a program; The Shell.|| ! 190: When you have successfully logged into \s8UNIX\s10, a program ! 191: called the Shell is listening to your terminal. ! 192: The Shell reads typed-in lines, splits them up ! 193: into a command name and arguments, and executes the command. ! 194: A command is simply an executable program. ! 195: The Shell looks first in your current directory ! 196: (see next section) ! 197: for a program with the given name, ! 198: and if none is there, then in a system directory. ! 199: There is nothing special about system-provided ! 200: commands except that they are kept in a directory ! 201: where the Shell can find them. ! 202: .pg ! 203: The command name is always the first word on an input line; ! 204: it and its arguments are separated from one another by ! 205: spaces. ! 206: .pg ! 207: When a program terminates, the Shell will ordinarily regain control and type ! 208: a ``%'' at you to indicate that it is ready for another command. ! 209: .pg ! 210: The Shell has many other capabilities, which are described in detail in section ! 211: \fIsh\fR\|(I). ! 212: .pg ! 213: .ul ! 214: The current directory.|| ! 215: \s8UNIX\s10 has a file system arranged in a hierarchy of directories. ! 216: When the system administrator gave you a user name, ! 217: he also created a directory for you (ordinarily ! 218: with the same name as your user name). ! 219: When you log in, any file ! 220: name you type is by default ! 221: in this directory. ! 222: Since you are the owner of this directory, you have ! 223: full permissions to read, write, alter, or destroy ! 224: its contents. ! 225: Permissions to have your will with other directories ! 226: and files will have been granted or denied to you ! 227: by their owners. ! 228: As a matter of observed fact, few \s8UNIX\s10 users ! 229: protect their files from destruction, ! 230: let alone perusal, by other users. ! 231: .pg ! 232: To change the ! 233: current directory (but not the set of permissions you ! 234: were endowed with at login) use \fIchdir\fR (I). ! 235: .pg ! 236: .ul ! 237: Path names.|| ! 238: To refer to files not in the current directory, you must ! 239: use a path name. ! 240: Full path names begin with ``/'', the name of the root directory of the ! 241: whole file system. ! 242: After the slash comes the name of each directory containing the next ! 243: sub-directory (followed by a ``/'') until finally the ! 244: file name is reached. ! 245: E.g.: ! 246: .ul ! 247: /\|usr/\|lem/\|filex ! 248: refers to the file ! 249: .ul ! 250: filex ! 251: in the directory ! 252: .ul ! 253: lem; lem ! 254: is itself a subdirectory of ! 255: .ul ! 256: usr; usr ! 257: springs directly from the root directory. ! 258: .pg ! 259: If your current directory has subdirectories, ! 260: the path names of files therein begin with ! 261: the name of the subdirectory (no prefixed ``/''). ! 262: .pg ! 263: Without important exception, ! 264: a path name may be used anywhere a file name is ! 265: required. ! 266: .pg ! 267: Important commands which modify the contents of files ! 268: are \fIcp\fR (I), \fImv\fR (I), and \fIrm\fR (I), ! 269: which respectively copy, move (i.e. rename) and remove files. ! 270: To find out the status of files or directories, use \fIls\fR (I). ! 271: See \fImkdir\fR (I) for making directories; \fIrmdir\fR (I) for destroying them. ! 272: .pg ! 273: For a fuller discussion of the file system, see ! 274: ``The \s8UNIX\s10 Time-Sharing System,'' ! 275: by the present authors, ! 276: to appear in the Communications of the ACM; ! 277: a version is also available from the same source as this ! 278: manual. ! 279: It may also be useful to glance through ! 280: section II of this manual, which discusses ! 281: system calls, even if you don't intend ! 282: to deal with the system at the assembly-language level. ! 283: .pg ! 284: .ul ! 285: Writing a program.|| ! 286: To enter the text of a source program into a \s8UNIX\s10 file, use \fIed\fR (I). ! 287: The three principal languages in \s8UNIX\s10 are ! 288: assembly language (see \fIas\fR (I)), Fortran (see \fIfc\fR (I)), ! 289: and C (see \fIcc\fR (I)). ! 290: After the program text has been entered through ! 291: the editor ! 292: and written on a file, you can give the file ! 293: to the appropriate language processor as an argument. ! 294: The output of the language processor ! 295: will be left on a file in the current directory named ``a.out''. ! 296: (If the output is precious, use \fImv\fR to move it to a less ! 297: exposed name soon.)| ! 298: If you wrote in assembly language, you will probably ! 299: need to load the program with library subroutines; see ! 300: \fIld \fR(I). The other two language processors call ! 301: the loader automatically. ! 302: .pg ! 303: When you have finally gone through this entire process ! 304: without provoking any diagnostics, the resulting program ! 305: can be run by giving its name to the Shell ! 306: in response to the ``%'' prompt. ! 307: .pg ! 308: The next command you will need is \fIdb\fR (I). ! 309: As a debugger, \fIdb\fR is better than average for ! 310: assembly-language programs, ! 311: marginally useful for C programs ! 312: (when completed, \fIcdb\fR (I) will be a boon), ! 313: and virtually useless for Fortran. ! 314: .pg ! 315: Your programs can receive arguments from the command line ! 316: just as system programs do. ! 317: See \fIexec\fR (II). ! 318: .pg ! 319: .ul ! 320: Text processing.|| ! 321: Almost all text is entered through the editor. ! 322: The commands most often used to write text on a terminal are: ! 323: .ul ! 324: cat, pr, roff, nroff, ! 325: and ! 326: .ul ! 327: troff, ! 328: all in section I. ! 329: .pg ! 330: The \fIcat\fR command simply dumps \s8ASCII\s10 text ! 331: on the terminal, with no processing at all. ! 332: The \fIpr\fR command paginates the text, supplies headings, ! 333: and has a facility for multi-column output. ! 334: .ul ! 335: Troff ! 336: and ! 337: .ul ! 338: nroff ! 339: are elaborate text formatting programs, ! 340: and require careful forethought ! 341: in entering both the text and the formatting commands ! 342: into the input file. ! 343: .ul ! 344: Troff ! 345: drives a Graphic Systems phototypesetter; ! 346: it was used to produce this manual. ! 347: .ul ! 348: Nroff ! 349: produces output on a typewriter terminal. ! 350: .ul ! 351: Roff ! 352: (I) ! 353: is a somewhat less elaborate text formatting ! 354: program, and requires somewhat less forethought. ! 355: .pg ! 356: .ul ! 357: Surprises.|| ! 358: Certain commands provide inter-user communication. ! 359: Even if you do not plan to use them, it would be ! 360: well to learn something about them, because someone else may ! 361: aim them at you. ! 362: .pg ! 363: To communicate with another user currently logged in, ! 364: .ul ! 365: write ! 366: (I) ! 367: is used; ! 368: .ul ! 369: mail ! 370: (I) ! 371: will leave a message whose presence will be announced ! 372: to another user when he next logs in. ! 373: The write-ups in the manual also suggest how to respond to ! 374: the two commands if you are a target. ! 375: .pg ! 376: When you log in, a message-of-the-day may greet you ! 377: before the first ``%''.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.