📄 u1
字号:
.nr PS 9.if t .nr VS 11.if n .ls 2.if t .2C.nr PI .25i.SHINTRODUCTION.PPFrom the user's point of view,the.UC UNIXoperating systemis easyto learn and use,and presents few of the usual impedimentsto getting the job done.It is hard, however, for the beginnerto know where to start,and how to make the best use of the facilities available.The purpose of this introductionis to help new usersget used to the main ideas of the.UC UNIXsystemand start making effective use of it quickly..PPYou should have a couple of other documents with youfor easy reference as you read this one.The most important is.ulThe.ul.UC UNIX.IT Programmer's.IT Manual \|;it's often easier to tell you to read about somethingin the manualthan to repeat its contents here.The other useful document is.ulA Tutorial Introduction to the.ul.UC UNIX.ulText Editor,which will tell you how to use the editorto get text \(emprograms, data, documents \(eminto the computer..PPA word of warning:the.UC UNIXsystemhas become quite popular,and there are several major variantsin widespread use.Of course details also change with time.So although the basic structure of .UC UNIXand how to use it is common to all versions,there will certainly be a few thingswhich are different on your system fromwhat 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 ..PPThis 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 whichsystemyou log into(phone numbers, for example)and what terminal you use,so this section must necessarily be supplementedby local information..IP "\ \ 2."Day-to-day Use:Things you need every day to usethe systemeffectively:generally useful commands;the file system..IP "\ \ 3."Document Preparation:Preparing manu\%scripts is one of the most common usesfor.UC UNIXsystems.This section contains advice,but notextensive instructions on anyof the formatting tools..IP "\ \ 4."Writing Programs:.UC UNIXis 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 languagesprovided by the system..IP "\ \ 5."A.UC UNIXReading List.An annotated bibliography of documents that new users should be aware of..SHI. GETTING STARTED.SHLogging In.PPYou must have a .UC UNIXlogin name, which you can get fromwhoever administers your system.You also need to know the phone number,unless your system uses permanently connected terminals.The.UC UNIXsystemis capable of dealing with a wide variety of terminals:Terminet 300's; Execuport, TI and similarportables;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 venerableTeletype in its various forms.But note:.UC UNIXis strongly oriented towards devices with .ullower 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 anotherterminal..PPBe 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 othersthat local wisdom advises.Establish a connection using whatevermagic is needed for your terminal;this may involve dialing a telephone call or merely flipping a switch.In either case,.UC UNIXshould 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..PPWhen you get a.UL login:message,type yourlogin name.ulin 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 ..PPThe culmination of your login efforts is a``prompt character,''a single character that indicates thatthe systemis ready to accept commands from you.The prompt character is usually a dollar sign.UL $or apercent sign.UL % .(You may also get a message of the day just before theprompt character, or a notification that you have mail.).SHTyping Commands.PPOnce you've seen the prompt character, you can type commands,which arerequests thatthe systemdo something.Try typing.P1date.P2followed by .UC RETURN.You should get back something like.P1Mon Jan 16 14:17:10 EST 1978.P2Don't forget the.UC RETURNafter the command,or nothing will happen.If you think you're being ignored,type a.UC RETURN ;something should happen..UC RETURNwon't be mentionedagain,but don't forget it \(emit has to be thereat the end of each line..PPAnother command you might try is.UL who ,which tells you everyone who is currently logged in:.P1who.P2gives something like.P1.ta .5i 1imb tty01 Jan 16 09:11ski tty05 Jan 16 09:33gam tty11 Jan 16 13:07.P2The time is when the user logged in;``ttyxx'' is the system's idea of what terminalthe user is on..PPIf you make a mistake typing the command name,and refer to a non-existent command,you will be told.For example, if you type.P1whom.P2you will be told .P1whom: not found.P2Of course, if you inadvertently type the name of some other command,it will run,with more or less mysterious results..SHStrange Terminal Behavior.PPSometimes you can get into a statewhere your terminal acts strangely.For example,each letter may be typed twice,or the.UC RETURNmay not cause a line feedor a return to the left margin.You can often fix this by logging out and logging back in.Or you can read the description of the command.UL sttyin section I of the manual.To get intelligent treatment oftab characters(which are much used in.UC UNIX )if your terminal doesn't have tabs,type the command.P1stty \-tabs.P2and the system will convert each tab into the right numberof blanks for you.If your terminal does have computer-settable tabs,the command.UL tabswill set the stops correctly for you..SHMistakes in Typing.PPIf you make a typing mistake, and see it before.UC RETURNhas 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 tothe beginning of the line (but not beyond).So if you type badly, you can correct as you go:.P1dd#atte##e.P2is the same as.UL date ..PPThe at-sign.UL @erases all of the characterstyped so faron the current input line,so if the line is irretrievably fouled up, type an.UL @and start the line over..PPWhat if you must enter a sharp or at-signas 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 \(emthe at-sign has been recorded..PPTo erase a backslash,you have to type two sharps or two at-signs, as in.UL \e## .The backslash is used extensively in.UC UNIXto indicate that the following character is in some way special..SHRead-ahead.PP.UC UNIXhas 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 awayand interpreted in the correct order.So you can type several commands one after another withoutwaiting for the first to finish or even begin..SHStopping a Program.PPYou can stop most programs bytyping the character.UC DEL '' ``(perhaps called ``delete'' or ``rubout'' on your terminal).The ``interrupt'' or ``break'' key found on most terminalscan also be used.In a few programs, like the text editor,.UC DELstops whatever the program is doing but leaves you in that program.Hanging up the phone will stop most programs..SHLogging Out.PPThe easiest way to log out is to hang up the phone.You can also type.P1login.P2and let someone else use the terminal you were on.It is usually not sufficient just to turn off the terminal.Most.UC UNIXsystemsdo not use a time-out mechanism, so you'll bethere forever unless you hang up..SHMail.PPWhen you log in, you may sometimes get the message.P1You have mail..P2.UC UNIXprovides a postal system so you cancommunicate withother users of the system.To read your mail,type the command.P1mail.P2Your mail will be printed,one message at a time,most recent message first.After each message,.UL mailwaits for you to say what to do with it.The two basic responses are.UL d ,which deletes the message,and.UC RETURN ,which does not(so it will still be there the next time you read your mailbox).Other responses are described in the manual.(Earlier versions of.UL maildo not process one message at a time,but are otherwise similar.).PPHow 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:.P1mail joe.ft Inow type in the text of the letteron as many lines as you like ...After the last line of the lettertype the character ``control-d'',that is, hold down ``control'' and typea letter ``d''..P2And that's it.The ``control-d'' sequence, often called ``EOF'' for end-of-file, is used throughout the systemto mark the end of input from a terminal,so you might as well get used to it..PPFor practice, send mail to yourself.(This isn't as strange as it might sound \(emmail to oneself is a handy reminder mechanism.).PPThere are other ways to send mail \(emyou 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 mailin section 1of the.ul.UC UNIX.ul.IT Programmer's.IT Manual .).SHWriting to other users.PPAt some point, out of the blue will come a messagelike.P1Message from joe tty07....P2accompanied 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.P1write joe.P2This establishes a two-way communication path.Now whatever Joe types on his terminal will appear on yoursand vice versa.The path is slow, rather like talking to the moon.(If you are in the middle of something, you have toget 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 \(emread the editor tutorial.).PPA protocol is needed to keep what you type from gettinggarbled up with what Joe types. Typically it's like this:.P1.tr --.fi.ft RJoe types.UL write.UL smithand waits..brSmith types.UL write.UL joeand waits..brJoe now types his message(as many lines as he likes).When he's ready for a reply, hesignals it by typing.UL (o) ,whichstands for ``over''..brNow Smith types a reply, alsoterminated by.UL (o) ..brThis cycle repeats untilsomeone gets tired; he thensignals his intent to quit with.UL (oo) ,for ``overand out''..brTo terminatethe conversation, each side musttype a ``control-d'' character aloneon a line. (``Delete'' also works.)When the other person types his ``control-d'',you will get the message.UL EOFon your terminal..P2.PPIf 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 answerafter a decent interval,simply type ``control-d''..SHOn-line Manual.PPThe .ul.UC UNIX.ulProgrammer's Manualis 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-dateinformation on a command.To print a manual section, type``man command-name''.Thus to read up on the .UL whocommand,type.P1man who.P2and, of course,.P1man man.P2tells all about the.UL mancommand..SHComputer Aided Instruction.PPYour.UC UNIXsystem may have availablea program called.UL learn ,which provides computer aided instruction onthe file system and basic commands,the editor,document preparation,and even C programming.Try typing the command.P1learn.P2If .UL learnexists on your system,it will tell you what to do from there.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -