C= Commodore’ Amiga’ UNIX‘ System V Release 4

C= Commodore’ Amiga’ UNIX‘ System V Release 4

@ workspace

Prog ams i

Propertie|

xn Retresh Print Screen

Copyright 1990 Commodore-Amiga Inc. All rights reserved.

Commodore and Amiga are registered trademarks of Commodore Electronics Ltd. and Commodore-Amiga, Inc., respectively. This document may also contain reference to other trademarks and registered trademarks for the various products listed which are believed to belong to the sources associated therewith.

The information contained herein is subject to change. Furthermore, this listing should not be considered as containing any endorsement or representation with respect to the products listed, their use, results, performance, capabilities, appropriateness or availability.

THIS INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED. THE ENTIRE RISK AS TO THE USE OF THIS INFORMATION IS ASSUMED BY THE USER.

IN NO EVENT WILL COMMODORE BE LIABLE FOR ANY DAMAGES, DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL, RESULTING FROM ANY DEFECT IN THE INFORMATION, EVEN IF IT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

If this product is being acquired for or on behalf of the United States of America, its agencies and/or instrumentalities, it is provided with RESTRICTED RIGHTS, and all use, duplication, or disclosure with respect to the included software and documentation is subject to the restrictions set forth in The Rights in Technical Data and Computer Software clause at 252.227-7013 of the DOD FAR and the Rights in Data-General clause at 52.227-19 of the FAR. Unless otherwise indicated, the manufacturer/integrator is Commodore Business Machines, Inc., 1200 Wilson Drive, West Chester, PA 19380.

OPEN LOOK is a trademark of AT&T.

UNIX is a registered trademark of AT&T.

Ethernet is a trademark of Xerox Corporation.

PostScript is a registered trademark of Adobe Systems, Inc.

X Window System is a trademark of the Massachusetts Institute of Technology. XENIX and MS-DOS are registered trademarks of Microsoft Corporation.

Preface

This manual is written for anyone who wants to use Amiga UNIX. It includes conceptual introductions to topics, instructions for common user and administrative tasks, and a reference section covering most major commands.

Beginning users may want to start with a simpler book, such as Learning Amiga UNIX. Advanced users and administrators of large systems may want to supplement this book with selections from UNIX Press.

Credits Written by Kendall Robinson and Carol Wahl Directed by Richard Buck

Reviewed by Jan Carlson, Mike Ditto, Ken Farinsky, Mike Hall, and Rich Skrenta

Artwork by Cynthia Robinson

Additional contributions by Dave Ballman, Don Bein, Jesse Bornfreund, Paul Calkin, Keith Gabryelski, Sam Frederick, and Randy Gort

Produced by Johann George

This manual was written and produced using Amiga UNIX and the X Window System. 11/90

Table of Contents

Using this manual ...........sccc0e Subaneuauanted ooseduaceeueccosesssndescuiacecuoeseess 1 IN OUCS TOP AUIS CNS t2i.453; 200. acheotcn auras acces anatase Uscanetemesatad ate gaeaaemateanwen V Basic TEAtUNeS Ol WNUK series dssunsdvach oceanissiioeece Heiseaauuensaanseeoa eaves vill Getting Started. ...........cccccssscees pogiececuvaveciueessusectee: ssa duanausnsudsosuseeeseus 1 Logging intO YOUL COMPUtEL ............. cece ceecceeecceneccencceeeeceeeceeneceeeceeeeceeneeees 3 Using the virtital SCv Ons i4s5 ie cecsacsinuseantd sued ootsteeitiendy eases nee 5 Using OPEN LOOK ........cccccccescccecceccceccceccessccscececaccesccesecsscceneceacenseeaeeenees 9 CustoOMizZiINgG YOUL CNVITONMENL ............cccccceesssccccceeeeseccceeeausecceeeaaaeeeeees 20 Checking on users and Operations. ...........cccccccsecccsecceeseccesscccenccceeeceesecs 22 Checking on disk usage ...........ccccccccsscccsseccceesecccenecccesececesecceeueceesaneeeeees 31 CHECKING OL PTI l JOS sc cicintwnnrarsadanadadintoasiccncGnkuedueouomenteddedanevasndadisbionds 33 Understanding the UNIX shells .0...... cc ecccceeccceesceeeeceeeneceeneceeeneees 34 Getting help from the Man Pages ............cccccccsssssscccsssssssscceees OD TYOUDL CS NOGUINE ioe etincsessscadicadeehilel iecig dadeas aioe soundmaddad oedakeeeeecsdeeeecees 45 Working With CIirectoOriess ..........cccccccsscccssccssccscscsssccsssccsscossceees 48 Understanding the different UNIX file types .............ccc cece eseccesseceeeeees 55 PUGS CATVO TUOS 5 ce sauidePiasccnscusastawatnaasnastaascbuteaeaeswasasases condieusenadaberae ona saines 57 DATO TINO 5 oc 3 cs ses sate cctchdvaleeaiaaarnumsareaiaasanaabuatauwasde te besundstonedtebasaec akan tate: 60 Looking ata: file S:CONTONUS 5.4 sieves en raciacs vis Aevebevn cctachevesensitysalarvias beceeeeees 63 OD Va tS sactote tots dictatecncuaylhiooda a annoans oduineoak on se osesendileat use Munna aces soe: 69 Renaming and moving files cece d csincte siderite igweiammwiis 72 MENON GNANC, AAC a cathe ic taccraaranscingos eciey soma icant cates oe sackes Mcaetata deal aaa woes anaaacton sie 74 Protecting your files from other USers..............ccccccseccccssceceeeeceeeeseeeeees 75 TPOMDICSMOOEMIS ¥.225.c05552.25scheuesusawanaoia a uiane sean toe eoteswnatassa a nbaaeueesnaeeuae 81 PPPUIICIING osicacbessenscadcesasvcssencssatcess scbapdutentstetsedeubosewids seseeatiSbesedseudesese 83 Using lpadmin to add a printer................. sb Uchatio sienna fi ietaatasteecaas. 85 eM POV) UNC 65294. ciara teas anc ten at anicauaasig seu anne aed anodes nace saan etasea ne 90 CHECKING ON DYING JOOS sicsessidaedesicawasaanatedalonsy anew avoeselaateadaceieataiwadeeane: 93 Stopping the Ip print ServiCe........ cele eee ccecceecceeccesceesceescseusceeseesssenseees 95

OUND IC SIO OGIING 56s ensaasecctdcat tun haat iaanatiaenelsond use ausuhsnss das iackekeaetetenmndces 97

MI SIND S ENE Vi COE OF eecessestcscorscedeieesueecaiceuenasceucesiscaeondecescsoaceionesss 99

PD DCCla hh LOA CIOS i cts ceslenascesaatestndauadosuetistaadachavesoasacadinensacesteaebdacnmuensenea ek 100 Starting and ending the vi editor ......... eee ccescccceeeccceeneceeeeessseusecss 102 WLOVING av OUI 11. BTC asc sdsasericanssarainetenbennoniinadaraseaeaesadavenwa anes 104 PROV CCU cds are eoreccalsecmeueoentusdaseesen cic orousinaeicabs toss does henateanurascec amassed: 106 NS FOCIIVS VOX Ges sssaicinasserstintnd bina tiadesecons uledewtetestaucucbossdnabdendaaanentiesnadoueebyusbanet 107 NOVINE ANG: COPYING TOM isis cicsss ca sanosausocdiasccavasoiedabitiwerataneeiboadeccaraeniday’ 110 CWVATIO 1 SCORE oi cascrisessacenscmacteadasstabveres tubatiedoonssganssaseaneoigelatebieenesumineaiaatet 114 WAGONS CAT GOS ios sicedactvaes Ginins vecaknciienian bec aierner Nis Sila eatin: 116 CAE CMS iON COU eter enasaletesicata sien ieecen teach aati ieetet ease seetue Aes 117 PC MOAUMAG CAN OCS sitio acicsaauasacaswavsdasead yeectieveanaasancouauinnsicastac a tosuewrensson 118 TP OU DIES INO OUI sicossesseusacinsagucctivsscte soles enoiiank seatinda ee eratasalinntacsiedanestendieow: 119 Using electronic mall ...........cccccccsssccsssccessees pvesevsusenaast Meiienclal Starting elm for the first time .................cccesseccccesseceeceseecceeeeeceeeeneeses 123 Sending mail through elm 2.00.0... cecccccceesseccceessccceeesseccceeeeceeeeuneeees 124 Reading mail through elm .............c cc ecccccecccceeecceeeccceeseccceeseseeaecesenes 128 DELETIME MCSSACCE i cstossacidauecaiaabtanrseddatesdnesdloiaseaie tated ae uNteeiees 132 PAVING AIG SLOMIMNE: MAN cities andivenavsieasdansdnandoatpacessedesaacssatuvadeeoson tenes: 134 CUstomizine Your SISMATUTEC sisicie i ivasciansdinies wandsoeneihnavel he viaietena nae 136 COUSTOMNI ZINC Cl ep accnutsanteesceteniarcn ntact oussaenaeeamnaua ent eaten viabsiedseeuwacanens 137 OS DVN Ue atest ar ersteaereecesees iad eanne nynesude banat ntuaantissas tes acsaomnsdcinene dda 139 TO UDICS WOO UIA S cg. oos8 eussaucacntoar sien scsantsaaasesdahsunoueaboomseatasash deepens 141 INCU WON IRIING ios se ccc nsebesccsnsteseccscssansesadssestasceasssents saveeScewtiee: seaebeseess 143 Working locally vs. working globally..........c cece ceecccceeneeeeeeeseeeeees 145 Looking at your local World.................cccccceeccceseceeececeeeceesceeeneceeeseesaes 149 Working 1: SlODal WOLF Givssszsdverciavidcesodeswsnctonssaeas diesen deeoecdaaeeoavens 153 POLLING Wi aN OL WOF Ke ideacos van dcorsesiocadasdauacedeaulenedavniwatseeneu aerate 164 AGMINISLOPING A TECWOL ME scsi iscisicnscycvascisarterecdsjeseaczbycsidaveeswetewsdeaveeeosiades 167

TLOUDICSNOOUNE ie2itel ide cessadacedadativiwvnidanctaviiel dace hes dalansde lined anebeiieds 169

Special Features of Amiga UNIX ..........ccccccsssscssssooes sdebeseoeset’ 171

What features are unique to Amiga UNIX? ...........ccceeccccceeeeeceeeeeeeees 172 W INU SEN COTS ae detrozesa tes rtd tet sss casantcs ts sadencdetaon bnew vce taeda iamamidaseee Ome 175 Mapping the keyboard to a character Set............ccccccscccesseceeseceeeneeeees 177 PMT FAN TX AP bh MCS secre siracetassve sapacaedetioude sas tates aide eulweneactesentantosaadust 179 MiGICING SY SLCTIN PINES «cs sdecossssvsdascecessaveesakeseuscdsscwusiseusesaseeseteseecwen 181 AdGInG Users 10 /CLC/PASSW vissiccacawsiacsaedoencadiecdcsars oterideeeerere Dotdietes 183 Adding groups t0 /etc/STOUP .........ccccceeeccccesecccesecceeseececenececcenccseueeceeeues 185 Defining startup actions in /etc/profile...............ccccesscccseseceeeeseeeeeeeeees 187 Defining devices in /etc/inittal ...........ccccccecccsscccesecccescceeecceecceeneeeees 188 Define disks and file systems in /etc/vfstab ..............cccccesecceseceeeneeeees 192 Network system names in /etc/hosts ............cccccccsscccesesccsceceseceneeceeees 193 Naming your system in /etc/nodename ..............cccceecceseceeescceceeeeceeues 194 Maintaining your system............. Was Ucgicepcuedeasautaceeestes PONT Tees ey 35 Adding and removing USe€Yr ACCOUNLS .............eseccceseeceeeecceaeeeeeeaeeeeeaees 197 PROGINS BWANA CIS sescs sine sacdnietenede wan eccnstaitotalet aes toaiadesestes Maacaeetendeice ss 203 Using the WN S ies ica seacigeeveasveatandionveactuesvabndslacwentacevevsncos we casmaseets 216 Conheurine Our SVStCM siiecdeiidacisessanedsdtecienvidacdinesadceuseaannoeeinosaedee 222 Adding terminals to your SYStEM .............cccccesecccesseceeeeccceeseceeeeeeeaees 227 Shutting down and restarting your COMpUtEY ................ceecceeeeeeeeeeees 230 BACKS Wp VOUT OS a sasiccieaccslts ucinedataneusisindaniabuiecn nee taeedeaneaatenseee 232 Scheduling tasks USING CLON ...........cccccceescccesecceeccesecceeceeencceeneceeeneees 236 LIINEX 2 CCOUNEING TES in siasoiesesiastavseadusiassanosatsnerodsistensaraatuneissassesaineats 240 EEO DIES NOON S trccncrreusnusdeoraacasseues busses sasiddest ian cadhaatanticabeswansuossceadedbe, 242 UNTX COMMAN reference ..........cccccsccssccssccssccssccsscossccssccssceess 247 Command Reference Charts sinviinestinstinnsiscrincnntn etinieiainnven 247 acctcom list process StatiStiCsS ...........cccceccccssssecceseseeeeeeeeeeees 292 alias CUSCOMIZE COMMANAS ............ccccccseeeeecceeeeeecneenseeeees 253 apropos search man pages for keyword ................cceseceseeees 254 be start binary calculator ...............cccccccccsecesecceeceeeeees 255 cal MISPlAay Calendar varcsvisincscvsiseacaisvsashcentinateavesnactooane 256 cancel CATICEIMPIINU [OD xtxtrescatiesteesaara edie aceessieatesinaienael 257

cat Gis playa Mile x, aioctescsi snsowsssesitewidoapuatinaveaspndinenietece anes 258

cd cherp chmod chown clear color cp

Cp10 crontab date df

du echo elm emacs env exit fdfmt file find finger Finger fsck ftp grep head history init

CHAN CECE CLORY ich scieti iuckid asian cwoniior ata eaiasbe ees 259 CRATE OT OUD ai-8 sas eae scans eeeeaeasumeenca mans eames 260 CHANGE PELMISSIONS ............cceesccesesceseceesesecesecseeesens 261 CHANGE OWNETL...........ccccceeseeeccsseeeseeeces Sahataimanneeioniis 263 CICAKSChCC ic cnissitussdatarearnteaveresamianieatotaaieose 264 Change Screen COLOLS............ccccsccesesccsecccensscuseseeeuess 265 CODY. FICS ascension aticzaianeisnanoiea aortinoneaiaeees 266 COPY TAINO UG ste seneseiccastsuntaesewiideiatiescsaiagoestecnscsnewes 267 ChEALC CLOM, PADI scciecsssicessiteuicepcdinriasesineuedesaeecn: 269 set or display date and time ...............ccccccceeeeeeeees 270 calculate free disk SPace ............cccccceeccceesceeeeeceeuees 271 display disk USAGE ...........ccccccccesecceeccensceesceseseeseees 272 CCMO OUC DUE ijunsscsatasiueciasnaeh ina ainaveieiaaeonaaeneaceadacess 273 start electronic mail programM...............ccccceseceeeeeee 274 SCREOM CCI VOM seed sececegeeesesnus eae debarcienieenianaednabet 276 display environment variables..................cccecceeeees 277 IOS OU Ol SHOU sdenctevaaeadsecncoun tate uaateaseaacabaoecauesdeeenaees 278 TOLMAL IODPY GISk sxixeclceiisensieocteenitieanlctnie cess: 279 SHOW FUE CY De ao psaecrwisa eswsasacaniewadeuonntacndcontaarenessuosess 280 PVING: TUNES) serosa sassansayceotaadacencsdbanseaatasaheoataisaccivudawewons 281 display user information. ..............cccccccceesceeseeeeeeees 282 display user information. .............ccccceccceecceeeceeeceees 283 TIS SY SECT CHECK ai decanecasdaccadeematstactiesintuaadosetqincdenns 284 Network File Transfer Protocol...................ccce0ce0e 286 search files for a phrase............cccccecceecceesceeccenseeees 288 display first part of a file.........0...... a coutte eden tesataae: 289 display previous COMMANAB................cccecceeeeeeeeeees 290 Initialize SyStEM PYLOCESSES ............scccceeeeceeeceneeeees 291 St. DACKOTOUNG JODS :scsiiesetertdereteestaeeterdisideriveateas’ 292 LETMUM ALC a PLOCESS a victwstrrinnusvadinweievimase mangas 293 oA ST 0) Fh gare Wy Ol (=e ee ee 294 link files or GiIrectOVieS ..............ccccceeecceseseeeseceeeeeees 295 ETA GTO ona 52¢ caateiacettnelsnaiainawiaatuciebacsataugnacen ie aetiak: 296 AAMINISteY PVINCETLS ............ cee eecceeceeeceecceeceeceeeceesees 297 report printer Status ..............cccccecsscceecescneeeeeeeeeeees 299

list file and directory information ...................006. 300

mail

man mesg mkdir mkfs more mount mv oladduser olinit passwd passwdall

PE ping pr

ps pwconv pwd rcp rdb rlogin rm rmdir m rwho Sc

sed set setenv shutdown S10C sleep sort stty tail talk

read and send electronic mail................cccccceeceeeeee 302 INVATAUA | DAGES ics sdecsasecestnoustousoreneriel estates 303 allow or GENY MESSAEG...........cscccesscceseceesecesseseeeens 304 TAK ECMCILECUOVY, cine ninocateeucstecndsapasnsecesiueniseneetiedeks 305 Make TIES y SCCM *s iss. desisstaswosidasseceasaedoxsassdesteuadeidunss 306 display Tle CONLETIUG si. secausicerndaceadgw adie 308 mount file SYStEMS ............cccceecceeccesccescceseceeceeneeeees 309 MOVE OF TENAME filES «0.0.0... cece sec eeccencceeceeeeeeneeeees 311 set up OPEN LOOK defaults .............cccc cece cecceeeceee 312 start, OPEN OOK sicoriasaissearecsdnse eccctesmsbabosasusacciands 3138 Set or ChANGE PASSWOLKA ............cceecceseceeeceeeceeeeeeeees 314 set or delete system PaSSWOTAS .............cscceseceeeeees 315 Pace LHVOUPH Ha [lO adeveceweseasessevssiededsierosevacwaescedes 316 check remote system status..........ccccccccsssccnsseeeeeees 317 format a file for printing.............ccccceccceseceeeeeeeeeeees 318 NSU PLOCCSSES isis eacevicesanoconsaddoasielsawssidessatonnnaumeaneest 319 update the hidden password file ......................0008 320 print Working directOry............cccccccssesccesccesseeeneees 321 FOMIOUC COD Vaiesticictitesianteadonenuties eeu ererenstestsacvannenss d22 define disk partitions ...............cccccccssssceceeeeeeeeeseeees 323 FOMOLC LOSI ostsoaustcwaciactacasttuaseteeceorannasesaeae ye eaees 325 VOMIOVC vesskhacrossssassatbouastxsagaddeameagavineanscceicsneseaeeueaes 326 FEMOVEsCITeCLOLY «stertvcriasatas tocnauteiaaseneiteanimrraceeds 327 POAC TIC Ws ace treet seen ie teneraneias ied ween 328 ITS VEMOUC UISEL S vacdsacwesconcticscasaadssntdousdeeammsnoastodatens 329 spreadsheet calculator ..............cccccceccseeceeeeeeeeeeenes 330 edit a file or stream from a command line........... 331 display or set shell variables ................ccccceecceeeeees 333 display or set shell variables .................cccceccceeeeeee 336 Shutdown the SySteM ..............cccccsssccesecceeeceeceeeeees 337 SCree ii W/O CONC ON sdcesscasacuras terevaversecdextn dit ecaeeatna tyes 338 SUSDENG CE SNE Ils sshaninte sands sue eraieteiesdctetieaaueions 340 SOLU: MCS OL 11CS o2cesseceiavainenynas iactenacivasiteasbinietss 341 Set terminal Options .............cccceccccsseceeseeeeseeeceeeeees 342 display the end of a file ........ eee eccceccseeeeeeeees 343

ExChangVe SCLEEN MESSAES.........ccccecceecesecesceeeceeees 344

tar CVEALE TADE ATCIIVE acess os. udolcetadesacaecseeaneetaeecleaaeass 345 tee copy output to two place. ..........cceccceecceseceeeeeeeeees 347 telnet log in to a remote SYStEM.............ccecccceseeeceeseeeeseees 348 tty display terminal device NAME...............scccceeeeeeeeees 349 type display the pathname of a command ..................5 350 uname set or display system NaMe ..............ccccesecseeeeeeeeees 351 uptime displays active time .............ccccecccsecceseeceeseneeeeeeeens 352 vl VISA CCIUGR iasactsszccarcnceocsadssranceaededngsaverevanwmerinasestan 353 wall WHILE 10: ll USEPS sacentesisiserreondessibcuanennsvaruniancaee: 354 who listS USEYS ON SYSTEM ............cccccseceseccesccesccessceseeeues 355 whodo WNO'S GOING WAL cciesiitnaleutiweccessbuswsnce-senacesatanaaoens 356 xhost list systems with access to your X server ............ 357 xset set X user preferences............cccccsecccsseccceesecesseeneeees 358 xterm create an xterm WINKOW ............cccccseececeeeeceeseceeeees 360 SNEClA CM ATACHOTS ad decwet tauniet ices te tutcnducxenaud edema ainaiccsseaaOandasanneeonanners 361

MENON vssaiesexscindnccicdeusihvanwevnewssaucececdsadstacsetwcsoacdsauanissieseeinincieiodstee OOO

Using this manual

jonuDwWw siuj Buisy |

Using this manual

Who should read this manual?

What kind of book is it?

Basic chapters

Advanced chapters

Using this manual

This manual is directed at two audiences:

¢* newcomers to UNIX who want an introduction to some of the most important features and commands

°* experienced UNIX users who want to learn about new Amiga UNIX features

Most of this book is written as an introductory reference guide, providing a little information about a large variety of common tasks. No previous knowledge is required; you can read any page at any time, and it should tell you what you need to get started with a task or command. If you need more advanced information, there are many other sources you can check. This manual is not intended to provide advanced information.

The first six chapters cover basic tasks that any new UNIX user will encounter at some point (and which an experienced UNIX user will already know). The subjects include files and directories, online help, simple networking, printing, editing, and electronic mail. These chapters apply to many UNIX systems, not just Amiga UNIX, and could be used as an introductory guide for any UNIX System V Release 4 system.

The chapters become increasingly complex as you advance through the book; the second half (chapters 7 through 11) present information that many novice users will not need to know. The final chapter is specifically a reference chapter. It covers many commands in a bit more detail than the rest of the book.

Who should read which chapter?

Terms

Chapter What does it cover?

Basic information for new users: getting started, online help Basic information for all users:

files and directories, printing, editing in vi, using elm to send or read mail

Overview of multi-user topics:

multiple users, multiple login sessions, networking, exchanging files and messages, checking statu

Advanced information:

details of new Amiga Unix features and commands, system files, system maintenance overview for people who manage their own systems

Reference chapter for all users

Most of the terms in this document are explained where they are used; since each UNIX command tends to be its own odd form of abbreviated English, a glossary of terms would be a list of commands, or even a complete index. In general, no terms are used in a way that differs from standard UNIX or computer usage.

Using this manual

Press the RETURN key

Conventions

Using this manual

We do not list the RETURN key each time it should be pressed; we assume that users either know or will

quickly learn to end a command by pressing RETURN.

Specific typographic conventions are used to either identify characteristics or focus your attention. These conventions are minimized so the manual reads as smoothly as possible. We use four such conventions, to show command lines in text, substitutions, keys, and the appearance of a screen.

Four typographic conventions

We use four typographic conventions in this manual to highlight specific concepts.

What does it mean?

bold words

italics

uppercase

typewriter font

a Unix command or command line: Is -It man Is

a value to be substituted, frequently as part of a command line:

filename

cat filename

also used for chapter and manual titles

Using Amiga Unix

Learning the Basics

a key on the keyboard, or a

combination of keys if connected by a

hyphen: RETURN CTRL-C

text that appears on your screen either as you type it or in response to your commands; values to be substituted by you are in italics

Using this manual

Notes for users

Notes for experienced UNIX users

Notes for PC users

Using this manual

Experienced UNIX users already know most or all of the information covered in the first six chapters; it’s straight UNIX, and the only parts you might not know are the System V Release 4 enhancements from AT&T and the unique additions of Amiga UNIX. Concentrate your attention on chapter 10, Maintaining your system (in case there are system files and administrative procedures that are new to you) and chapter 8, Special features of Amiga UNIX (which documents all the new Amiga UNIX commands).

Your PC experience will make you a quick learner, but it may not help you to guess which UNIX command serves which purpose. (Once you become accustomed to the names and conventions, UNIX will seem easy; until then, you probably won’t find many familiar- sounding commands. )

As an experienced PC user, you might be able to skip the introductory chapters written for new users. However, these chapters are short, and they specifically focus on common computer tasks and how they are performed in UNIX. Since the tutorials in Learning to Use Amiga UNIX were written specifically to help PC users transfer to UNIX, we recommend that you read that book and then scan the first few chapters of this manual.

PC commands

Notes for new users

Many information sources for new users

vi

You can also check the reference chapter at the end of the manual; the common MS-DOS commands are listed with their UNIX equivalents and, where appropriate, the combination of procedures you can use to imitate or expand on PC commands.

New users should read the rest of this introduction; it highlights some important UNIX concepts that you might not have seen before. You should then skim the first few chapters, to see what kinds of commands and tasks are commonly used, then refer back to this book whenever you want to learn more about a specific topic. There is an easy progression to follow to find more information:

e start with the index to this book, then read the appropriate paragraph or page to see how a task is performed

e follow the tutorial in our companion book, Learning to Use Amiga UNIX, for hands-on instructions and examples

e read the reference chapter at the end of this book for more options on a specific command

¢ continue to the online man pages if you still need more information

e read the detailed documentation in AT&T's complete UNIX PRESS documentation set for UNIX System V Release 4

Using this manual

UNIX PRESS Manuals

Using Amiga UNIX reference pages

Learning Amiga UNIX

Read reference material in ascending order

As a new user, you can probably become a competent UNIX user simply by reading the first few chapters of this book and following the tutorials in Learning to Use Amiga UNIX.

Using this manual vii

Basic features of UNIX

Amiga UNIX virtual screens

Multiple users

If a command does not seem to work...

viii

UNIX has many features that are common on large multi-user computers, some that are unique to UNIX, and almost all of the features normally found in desktop personal computers. Describing these features would take an entire book; in fact, it usually takes about fifteen books. This manual is an overview to some important UNIX features; this page is a brief introduction to that overview.

Note the following features and concepts. You will see them regularly throughout the manual and as you work at your computer using UNIX.

Amiga UNIX adds virtual screens to UNIX; press any ALT-functionkey combination (F1 through F10) to change to a different login screen. Virtual screens make your one Amiga screen work like ten different screens, sharing one keyboard and monitor.

UNIX is a multi-user and networking system; each virtual screen can be used" by a different user, as can any attached terminals or any remote network logins. You can communicate with these other users, see what they're doing, and even restrict them from specific files and commands.

If a command does not work, you should first try typing it again. Some special characters do not appear on your screen; what looks like a clean command line might have garbage hidden on it. If you type a command several times and it still does not work, check the command syntax in this manual, then your path. It is important to have the command’s location in your path; UNIX searches only your path when you type a command, and does not look anywhere else.

Using this manual

CTRL-C to stop a process

Processes run

“invisibly” in

background

Directory tree

Online help with man

Using this manual

If you start a command, you may not be able to do anything else until it finishes. Some commands can take a long time, particularly if you make a mistake and ask for the wrong operators (listing an entire hard disk, for example, instead of just your directory). Use CTRL-C to stop the current command.

UNIX is a multi-tasking system; it runs many processes in the "background", where you cannot see them and they do not visibly interfere with your "foreground" work (what you type and see on the screen). If your system seems slow, you might have large processes running in the background. (UNIX itself always keeps processes running in the background, but it handles these so they do not take much computing power away from you.) To stop a background process, use the kill command. To keep working while a long, slow process continues, put it in the background.

UNIX is very dependent on files and directories; most objects are in files or are processed through files, and all files are in directories. You should understand the basic file and directory concepts and commands documented in the first chapter of this manual.

UNIX provides extensive online help, although in a somewhat cryptic fashion. Every UNIX command is documented in a "man page’; type man, followed by the name of a command, to get the man page for that command. Man pages document all the intricacies of a command, which makes them somewhat difficult for novice users to read and use. It’s still good to know that they’re there, so you can always look up information to learn about a command or try to fix a problem. (Note that on some smaller systems, a system administrator might remove

Complete documentation from AT&T

the man pages to make room for other files. The man pages represent several books of text and take up a lot of disk space.)

AT&T provides a complete documentation set for UNIX System V Release 4. Since Amiga UNIX is an exact port of that system, you can read any part of this documentation. It is printed by Prentice Hall, and is available in many bookstores or directly from Prentice Hall. The only features not listed in the AT&T documentation are those which we added to Amiga UNIX and described in this manual.

Using this manual

Getting started

Log in

Type your username at the login prompt. Type your password at the password prompt.

Virtual screens

Alt-functionkey combinations control the virtual screens. Press ALT-F1 through ALT-F10 for different login screens.

OPEN LOOK System status oladduser _ puts .olsetup ina who Check who is logged user’s .profile into the machine olinit start OPEN LOOK finger Similar to who but more details about users

last List most recent login for one or more users

ps List your processes ps-e List everyone’s processes UNIX shells /bin/sh Bourne shell. Historically the standard AT&T shell. /bin/csh C shell. Used by programmers and Berkeley enthusiast /bin/ksh Korn shell. Compatible with Bourne shell. Some C shel

features. Easy command line editing. /usr/lib/rsh Restricted shell. Limits a user’s capabilities.

peppjs Buiyjes

Getting Started

Why should you read this chapter?

General features of UNIX

User accounts

Networking

Getting started

You should read this chapter if you have never used UNIX before. If you already know UNIX, you should still skim this chapter to learn about the unique screen features of an Amiga terminal.

UNIX in general has a few features that distinguish it from personal computer operating systems, including:

e UNIX is multi-tasking e UNIX allows multiple user sessions e UNIX has a built-in security system

e UNIX includes networking software and commands

You can have many users and operations all working on your computer at the same time. You should learn how to keep track of these users and processes; remember, a computer that can do many things requires a little extra time to maintain, monitor, and learn.

You must have a user account in order to work on a UNIX system. Every user account has a unique name and password associated with it. Unless you know this username and password, you will not be allowed on the computer. User accounts, usernames, and passwords are UNIX’s defense against unwanted users.

UNIX provides the tools you need to communicate over a network. All you have to do is make the physical connection and configure the network software.

Amiga UNIX virtual screens

Amiga UNIX has a unique feature called virtual screens. You can have up to ten virtual screens, which means you can log in to your single computer ten times. Each of these screens can run any UNIX command, even windowing and graphics commands. It’s like having ten different terminals plugged into your computer.

This chapter provides you with the basic information you need to start using Amiga UNIX, to use the virtual screens, and to keep track of users and processes on your computer.

Getting started

Logging into your computer

Login is a security feature

Type your user name and password

The password does not appear on the screen

Geiting started

: dog.

UNIX provides a security feature called logging in. Any time you want to use a UNIX system, you must first log in by typing your username and password.

a ee

Your password does not appear on the screen as you type it. This prevents other people from reading your password over your shoulder.

All UNIX systems have a user called root. root is the most powerful user on your computer and is sometimes called the "superuser". root has the power to override file protections and user security. root also has the power to damage your system. Log in as root only to perform system maintenance. Create your own user account for your regular work.

You give other users permission to use your computer by setting up a login account for them. See chapter 10, Maintaining your system, for information about setting up user accounts.

Change your Change your password at any time by using the password passwd comand.

passwd:changing password for username - Old password: :

New password Re- eek new Ge

Type your old password, then your new password, then confirm your new password by typing it again.

4 Getting started

Using the virtual screens

Press ALT anda function key to select a screen

Check each function key fora screen

Getting started

Use each virtual screen as if it is a Separate terminal. Press ALT-functionkey to change to the screen

associated with that key.

Press Alt-Function keys for virtual screens

If an empty black screen appears, you have not defined a screen for that function key.

You can have many processes running on these virtual screens; logging off of one screen has no affect on the others. Check the screens currently running by pressing each ALT-functionkey combination in sequence. You should always check the current function keys after logging out, because you might have forgotten about some screens that are still in use.

You create additional virtual screens by executing specific programs from the command line (such as olinit, which creates an X screen and an OPEN LOOK session at the maximum resolution of your monitor).

Change screen characteristics

Change screen color

These screens are automatically associated with your current function key; that is, screens you create from F2 are also attached to F2 (stacked one behind the other). Since only the top screen is visible, you have to cancel it to see any other screens behind it.

Screen settings may be different for different screens, since these settings are all customizable by a user or system administrator. By default, eight of the ten function keys are defined, with a variety of different colors, fonts, and resolution levels. You can set display characteristics in any of three ways:

° system defaults

¢ each virtual screen setting in inittab (see Editing system files later in this manual)

e atthe command line for a particular session

Change the current color with the color -be color -fc color command, using -be for background color and a number from 000 to fff. Each position in the number represents an amount for red, green, and blue, respectively. Changing these numbers individually allows a wide variety of color combinations between the darkest, 000, and the lightest, fff. Change the foreground color with -fe. In place of the exact number for a color, you can type the standard colors black, blue, green, cyan, red, magenta, yellow, and white, as shown in the screen on the next page.

Getting started

Show current screen colors

Choose a font type and size

Getting started

set background set foreground color to blue color to white

Look at the current background and foreground colors by typing color -show. Many colors are listed; the first two are the background and foreground colors, respectively.

background foreground color color

Because of the Amiga’s unique graphic processor, you can use different fonts, sizes, and colors, even when you are not running a graphic program (such as X) or graphical user interface (such as OPEN LOOK). You can get a login prompt, request and see UNIX commands, and even edit files in a variety of Amiga fonts.

Change the font size and type

At the present time, two Amiga fonts are shipped with Amiga UNIX release:

¢ topaz8 (the default) ° topazll

Use sioc to change either the current font or the default font. sioc setfont filename changes the current font for this login session on this screen; sioc setfont resets the screen font to the default system font; and sioc setdeffont filename changes the system default font.

change system default To.... topaz 11

After they start, a short menu appears. Select "Programs... from this menu. Another menu appears with only one option: "Xterm..."; click on this option to start an X terminal window.

Getting started

Using OPEN LOOK

What is OPEN OPEN LOOK is a graphical user interface that lets you

LOOK? run terminal windows and programs by clicking menu options and icons. You're still working in UNIX, but instead of having to type all the commands, you can select them from pull-down menus, operate others with a mouse, and have several running at the same time in different windows.

Setting up OPEN OPEN LOOK doesn’t start by default, you configure it

LOOK to run whenever you want. You only have to set up OPEN LOOK once, after that you can start it by typing a single command.

To create your own OPEN LOOK environment, you first have to run the oladduser command. This program puts various OPEN LOOK and X Window System resource files in your home directory, and modifies your .profile.

Log out then log back in to use your changed startup file.

Getting started 9

OPEN LOOK and the C shell

Start OPEN LOOK

10

The oladduser command doesn’t work with the C shell. If you use the C shell, copy the following files from /usr/X/adm into your home directory:

e .Xdefaults

e .olinitre

¢ .olprograms You also need to add the following lines to your .login file:

e setenv DISPLAY unix:0

e setenv XNETACCESS on

¢ set path=( $path /usr/X/bin )

To start OPEN LOOK, type olinit and wait a minute for the OPEN LOOK windows and X Window System server to start.

Getting started

The OPEN LOOK After OPEN LOOK starts, you see a single menu on a

workspace blank screen. The following figure shows the workspace with an OPEN LOOK window and the workspace menu.

workspace title bar menu

Utilities b> Properties >

\ crunchtkendall $ J Exit

workspace window

Getting started 11

Menus

Three primary types of menus

12

Most menus under OPEN LOOK work the same way:

e make them appear (if not already visible) by clicking the right mouse button

¢ close or attach them by clicking the push pin at the top left corner of the menu with the left button

¢ select options by clicking on them with the left button.

ry workspace

click to

close or : click To

attach the Utilities > select

menu Properties b

an options

The mouse buttons are similarly consistent: the right mouse button usually brings up a menu and selects options from it, and the left button usually selects or drags an object.

The three primary types of OPEN LOOK menus are: workspace, window, and application. Each type of menu is position-specific; you get a different one depending on where the mouse pointer is when you click the right mouse button.

If you have an OPEN LOOK window open, move the mouse pointer into it and click the right mouse button. A menu for that window appears. Do the same thing for a different application and a different, application-

Getting started

Three types of menu options

Getting started

specific, set of menu options appears. You can also click on the blank workspace to get the workspace menu, or in the title bar of a window, to get the window menu.

workspace menu (click in blank space)

window menu

application menu

OPEN LOOK menu options do one of three things:

start a submenu (...)

start a dialogue box ( > )

start a program (no marker)

leads to a submenu

v weorkspagg

L | Utilities b> Properties b Exit

inn

Programs

Terminal Session

Small Terminal Session

Edit Programs...

starts a program

leads fo a dialogue box

13

The workspace The workspace menu is the first menu you see after

menu you start OPEN LOOK. You start all other OPEN LOOK programs, menus, and windows using the workspace menu. The table on the following page summarizes the workspace menu options.

Where does it lead?

Programs X programs and terminal windows Utilities Programs for managing the

workspace

Properties Change settings for mouse, icons, or keyboard

Exit Quit OPEN LOOK completely and return to regular command prompt

The window Another special menu, the window menu, has options menu for manipulating the window. The window menu options are the same for all windows.

Window

xterm

-rw-r-—r— 4574 Sep 26 10¢37 passwd”

-rworwcr 2220 Sep 27 10154 exports” Close eves

-ru-runP

-ru-r- Pa

Restore Size deuxtusron

Back 191280 Oct 16 17305 psdatabase 213 Oct 16 17396 maotd

4 Oct 16 17106 log,pid Refresh dct Get leivice an 11838 Oct 16 17106 rmtab

: 3 Oct 16 417306 state ult 8192 Oct 16 17306 ld,so,cache

-rw-rw-r-—

14 Getting started

Some common OPEN LOOK programs run in windows. Most OPEN features of OPEN LOOK windows share the following features:

LOOK windows e Resize a window by clicking on one of the four corners and dragging.

e Move a window by clicking anywhere on the border

e Explode to fill a screen by double clicking on the title bar. Double-click again to switch back to normal size.

e Shrink a window by selecting Close from the window menu.

¢ Make a window active by clicking the left mouse button just inside the border or on the title bar. The title bar on the active window is black. Any characters you type appear only in the active window, regardless of where the pointer is.

¢ Scroll through a window by clicking the scroll bar on the right side of the window.

this button double click resize WiINdoW for Close to explode Cany corner) option or shrink

aterm

-rWw-P--Ph-— 4574 Sep 26 10¢a7 passwd”

i a le 2220 Sep 27 10¢54 exports” select To =Kueh=<r—— Yel Sep 28 12109 group :

—rw-rhu-Ph— 2470 Oct 10 09:59 exports : make -rw-r-—P-— 1010 Oct 11 11346 fstab Move

druxrwsr wx Bi2 Oct 15 12354 sm é window diruxrwsirw% Bi? Oct 15 12154 sm,bak WINdOW —rw-r--P-— 4670 Oct 16 11317 passud :

acitve -rw-r--r—— 16816 Oct 16 14:55 format,dat

—PW-Ph--Ph-— 1041260 Oct 16 17105 psdatabase —PWw—-ru-PW— 243 Oct 16 17106 motd

-PW-PW rh 4 Oct 16 17106 syslog,pid -Pwor--h-— 2310 Oct 16 17106 xtab

Sd a el 0 11838 Oct 16 17106 rmtab

—PW— rh 3 Oct 16 17106 state Pwr Pr 8192 Oct 16 17106 1ld,so,cache al een Ae Aoi 600 Oct 16 17106 ttys

—FWR ho 999 Oct 16 17108 mtab

Sl a heel toate toate 360 Oct 16 17? t24 networks

al iL tl Ol to 13260 Oct 16 21144 dumpdates

Getting started 15

Active windows

The terminal window

Advantages of a terminal window

16

You can open many windows at once, but only one can be active at a time. You can tell which window is active because it is usually the one at the very front (on top of the others) and its title bar is filled, while the others are empty.

The terminal window (xterm) is OPEN LOOK’s equivalent of a virtual screen. You can type any UNIX command in a terminal window. The main difference is that virtual screens let you run foreground processes on different screens (function keys), while OPEN LOOK lets you run foreground processes in different w