; TeX output 1995.02.13:2232(b{K $"Hm#Rp cmss10HLinuxInstallationandGettingStalrted $"c)K`y cmr10CopyrightrcUU!", cmsy10 1992{1994 UUMattUUW*elshI $" m#R cmss10VersionUU2.2.2,11February1995.$"ThisjbGookisaninstallationandnew-userguidefortheLinuxsystem,meantforUNIXnovicesand$"gurusalike.*9ContainedhereinisinformationonhowtoobtainLinux,/installationofthesoftware,/a$"bGeginningqtutorialfornewUNIXqusers,xandanintroGductiontosystemadministration.Itismeanttobe$"generalUUenoughtobGeapplicabletoanydistributionoftheLinuxsoftware.J3"ThisbGookisfreelydistributable;youmaycopyandredistributeitundercertainconditions.CPlease$"seeUUthecopyrightanddistributionstatementonpagexii.*(b{Kō$"I"VG cmbx10ICon4tentsDؽ$""V cmbx10Prefaceixؼ3"Audience񆍑 cmmi10::::::::::::::::::::::::::::::::::::::::::::: 9ix3"Organization:::::::::::::::::::::::::::::::::::::::::::Vx3"Acknowledgments8:::::::::::::::::::::::::::::::::::::::::Vx3"CreditsUUandLegalese Ǎ::::::::::::::::::::::::::::::::::::::: 9xi3"DoGcumentationUUConventions1/:::::::::::::::::::::::::::::::::::xiiiؽ$"13"In9troQductionTtoLinux.13"1.1J"AbGoutUUThisBookԍ::::::::::::::::::::::::::::::::::::::.s13"1.2J"AUUBriefHistoryofLinux* ::::::::::::::::::::::::::::::::::.s23"1.3J"SystemUUF*eatures::::::::::::::::::::::::::::::::::::::.s43"1.4J"SoftwareUUF*eatures.::::::::::::::::::::::::::::::::::::::.s6J"1.4.1j"BasicUUcommandsandutilitiesۙ:::::::::::::::::::::::::::.s6J"1.4.2j"T*extUUproGcessingandwordprocessing :::::::::::::::::::::::.s7J"1.4.3j"ProgrammingUUlanguagesandutilitiesw捑:::::::::::::::::::::::.r10J"1.4.4j"TheUUXWindowSystem::::::::::::::::::::::::::::::.r10J"1.4.5j"Networkingj':::::::::::::::::::::::::::::::::::::.r12J"1.4.6j"T*elecommunicationsUUandBBSsoftware⍑::::::::::::::::::::::.r13J"1.4.7j"InterfacingUUwithMS-DOSr:::::::::::::::::::::::::::::.r14J"1.4.8j"OtherUUapplications[ˍ:::::::::::::::::::::::::::::::::.r143"1.5J"AbGoutUULinux'sCopyrightǍ:::::::::::::::::::::::::::::::::.r153"1.6J"TheUUDesignandPhilosophyofLinux덑:::::::::::::::::::::::::::.r17J"1.6.1j"HintsUUforUNIXnovices?D::::::::::::::::::::::::::::::.r19J"1.6.2j"HintsUUforUNIXgurus:::::::::::::::::::::::::::::::.r19]iB(b{KP덍3"1.7J"Di erencesUUBetweenLinuxandOtherOpGeratingSystems)n:::::::::::::::.r20ؼJ"1.7.1j"WhyUUuseLinux?xG::::::::::::::::::::::::::::::::::.r20J"1.7.2j"LinuxUUvs.qMS-DOSˍ:::::::::::::::::::::::::::::::::.r21J"1.7.3j"LinuxUUvs.qTheOtherGuysmk::::::::::::::::::::::::::::.r22J"1.7.4j"OtherUUimplementationsofUNIX3:::::::::::::::::::::::::.r223"1.8J"HardwareUURequirementsd::::::::::::::::::::::::::::::::::.r24J"1.8.1j"MotherbGoardUUandCPUrequirements0΍:::::::::::::::::::::::.r25J"1.8.2j"MemoryUUrequirementsi:::::::::::::::::::::::::::::::.r25J"1.8.3j"HardUUdrivecontrollerrequirements7::::::::::::::::::::::::.r25J"1.8.4j"HardUUdrivespacerequirements::::::::::::::::::::::::::.r26J"1.8.5j"MonitorUUandvideoadapatorrequirementsύ::::::::::::::::::::.r26J"1.8.6j"MiscellaneousUUhardwarebҍ::::::::::::::::::::::::::::::.r27J"1.8.7j"EthernetUUcardsM:::::::::::::::::::::::::::::::::::.r283"1.9J"SourcesUUofLinuxInformation[:::::::::::::::::::::::::::::::.r28J"1.9.1j"OnlineUUdoGcuments̍:::::::::::::::::::::::::::::::::.r29J"1.9.2j"LinuxUUontheW*orldWideWebZ::::::::::::::::::::::::::.r29J"1.9.3j"BoGoksUUandotherpublishedworks":::::::::::::::::::::::::.r30J"1.9.4j"USENETUUnewsgroups?K:::::::::::::::::::::::::::::::.r30J"1.9.5j"InternetUUmailinglists::::::::::::::::::::::::::::::::.r323"1.10J"GettingUUHelpw::::::::::::::::::::::::::::::::::::::::.r32ؽ$"23"ObtainingTandInstallingLin9uxG353"2.1J"DistributionsUUofLinux:::::::::::::::::::::::::::::::::::.r35J"2.1.1j"GettingUULinuxfromtheInternetQ:::::::::::::::::::::::::.r36J"2.1.2j"GettingUULinuxfromotheronlinesources4L:::::::::::::::::::::.r37J"2.1.3j"GettingUULinuxviamailorder:::::::::::::::::::::::::::.r37J"2.1.4j"GettingUUSlackware΍:::::::::::::::::::::::::::::::::.r373"2.2J"PreparingUUtoInstallLinuxV:::::::::::::::::::::::::::::::::.r44J"2.2.1j"InstallationUUoverviewi::::::::::::::::::::::::::::::::.r44J"2.2.2j"RepartitioningUUconcepts^::::::::::::::::::::::::::::::.r45J"2.2.3j"LinuxUUpartitionrequirements}:::::::::::::::::::::::::::.r45J"2.2.4j"RepartitioningUUyourdrivesbƍ:::::::::::::::::::::::::::::.r473"2.3J"InstallingUUtheLinuxsoftwareFd:::::::::::::::::::::::::::::::.r49Π(b{KP덍J"2.3.1j"BoGotingUULinux/:::::::::::::::::::::::::::::::::::.r49ؼJ"2.3.2j"DrivesUUandpartitionsunderLinux鹍::::::::::::::::::::::::.r51J"2.3.3j"CreatingUULinuxpartitions7:::::::::::::::::::::::::::::.r52J"2.3.4j"CreatingUUtheswapspace[::::::::::::::::::::::::::::::.r56J"2.3.5j"CreatingUUthe lesystems'::::::::::::::::::::::::::::::.r56J"2.3.6j"InstallingUUthesoftwareK:::::::::::::::::::::::::::::::.r57J"2.3.7j"CreatingUUthebGootUU oppyorinstallingLILO7ō:::::::::::::::::::.r60J"2.3.8j"AdditionalUUinstallationproGcedures ::::::::::::::::::::::::.r613"2.4J"PostinstallationUUproGceduresݍ::::::::::::::::::::::::::::::::.r613"2.5J"RunningUUIntoT*rouble:::::::::::::::::::::::::::::::::::.r62J"2.5.1j"ProblemsUUwithbGootingUUtheinstallationmedia ::::::::::::::::::.r63J"2.5.2j"HardwareUUproblemsj:::::::::::::::::::::::::::::::::.r65J"2.5.3j"ProblemsUUinstallingthesoftware":::::::::::::::::::::::::.r69J"2.5.4j"ProblemsUUafterinstallingLinux::::::::::::::::::::::::::.r70ؽ$"33"Lin9uxTT utorialNG743"3.1J"IntroGduction:::::::::::::::::::::::::::::::::::::::::.r743"3.2J"BasicUUUNIXConcepts:::::::::::::::::::::::::::::::::::.r74J"3.2.1j"CreatingUUanaccount::::::::::::::::::::::::::::::::.r75J"3.2.2j"LoggingUUinj-::::::::::::::::::::::::::::::::::::::.r75J"3.2.3j"VirtualUUconsoles":::::::::::::::::::::::::::::::::::.r76J"3.2.4j"ShellsUUandcommands:::::::::::::::::::::::::::::::.r76J"3.2.5j"LoggingUUoutύ:::::::::::::::::::::::::::::::::::::.r77J"3.2.6j"ChangingUUyourpassword8$::::::::::::::::::::::::::::::.r78J"3.2.7j"FilesUUanddirectories8::::::::::::::::::::::::::::::::.r78J"3.2.8j"TheUUdirectorytree^:::::::::::::::::::::::::::::::::.r79J"3.2.9j"TheUUcurrentworkingdirectory::::::::::::::::::::::::::.r79J"3.2.10j"ReferringUUtohomedirectoriesi֍:::::::::::::::::::::::::::.r803"3.3J"FirstUUStepsintoUNIXj:::::::::::::::::::::::::::::::::::.r81J"3.3.1j"MovingUUaround:::::::::::::::::::::::::::::::::::.r81J"3.3.2j"LoGokingUUatthecontentsUUofdirectories0Ǎ::::::::::::::::::::::.r82J"3.3.3j"CreatingUUnewdirectories::::::::::::::::::::::::::::::.r84J"3.3.4j"CopyingUU les ::::::::::::::::::::::::::::::::::::.r84Dg(b{KP덍J"3.3.5j"MovingUU les :::::::::::::::::::::::::::::::::::::.r84ؼJ"3.3.6j"DeletingUU lesanddirectories,:::::::::::::::::::::::::::.r85J"3.3.7j"LoGokingUUat les:::::::::::::::::::::::::::::::::::.r85J"3.3.8j"GettingUUonlinehelp :::::::::::::::::::::::::::::::::.r863"3.4J"SummaryUUofBasicCommandsэ:::::::::::::::::::::::::::::::.r863"3.5J"ExploringUUtheFileSystemr:::::::::::::::::::::::::::::::::.r883"3.6J"TypGesUUofshellsF:::::::::::::::::::::::::::::::::::::::.r923"3.7J"WildcardsM܍::::::::::::::::::::::::::::::::::::::::::.r933"3.8J"UNIXUUPlumbing#::::::::::::::::::::::::::::::::::::::.r95J"3.8.1j"StandardUUinputandoutputH::::::::::::::::::::::::::::.r95J"3.8.2j"RedirectingUUinputandoutput)э:::::::::::::::::::::::::::.r96J"3.8.3j"UsingUUpipGesƙ:::::::::::::::::::::::::::::::::::::.r97J"3.8.4j"Non-destructiveUUredirection"::::::::::::::::::::::::::::.r993"3.9J"FileUUPermissions::::::::::::::::::::::::::::::::::::::.r99J"3.9.1j"ConceptsUUof lepGermissions::::::::::::::::::::::::::::.r99J"3.9.2j"InterpretingUU lepGermissions?2::::::::::::::::::::::::::::.q100J"3.9.3j"DepGendencies#::::::::::::::::::::::::::::::::::::.q101J"3.9.4j"ChangingUUpGermissions׍:::::::::::::::::::::::::::::::.q1013"3.10J"ManagingUU lelinks鍑:::::::::::::::::::::::::::::::::::::.q102J"3.10.1j"HardUUlinks::::::::::::::::::::::::::::::::::::::.q102J"3.10.2j"SymbGolicUUlinksۍ:::::::::::::::::::::::::::::::::::.q1033"3.11J"JobUUControl8~:::::::::::::::::::::::::::::::::::::::::.q104J"3.11.1j"JobsUUandproGcesses8A:::::::::::::::::::::::::::::::::.q104J"3.11.2j"F*oregroundUUandbackgroundp::::::::::::::::::::::::::::.q104J"3.11.3j"BackgroundingUUandkillingjobsፑ::::::::::::::::::::::::::.q105J"3.11.4j"StoppingUUandrestartingjobsT{:::::::::::::::::::::::::::.q1073"3.12J"UsingUUtheExXconventions usedinthismanual,andtoEdChi,who$"sentUUmeaprintedcopyofthebGookUUforedition. (b{$"ͳ xiKP덑3"ThanksdtoMelindaA.McBrideatSSC,Inc.,whodidanexcellentjobcompletingtheindex $"forChapters3,׎4,and5.PIhwouldalsoliketothankAndyOram,׎LarKaufman,andBillHahnat$"O'ReillyUUandAssoGciatesfortheirassistancewiththeLinuxDocumentationPro8ject.ؼ3"ThankstoLinuxSystemsLabs, PMorseT*elecommunications, PYggdrasilComputing,andothers$"forUUtheirsuppGortoftheLinuxDocumentationPro8jectthroughsalesofthisbookandotherworks.3"Much%thankstothemanyactivists,Xincluding(innoparticularorder)LinusT*orvqalds,XDonald$"Becker,^AlanCox,RemyCard,T*edT'so,H.J.Lu,RossBiro,DrewEckhardt,EdCarp,Eric$"Y*oungdale,Fred,vqanKempGen,StevenTweedie,andascoreofothers,fordevotingsomuchtimeand$"energyUUtothispro8ject,andwithoutwhomtherewouldn'tbGeanythingtowriteabGookUUabout.3"SpGecialthankstothemyriadofreaderswhohavesenttheirhelpfulcommentsandcorrections.$"ThereUUarefartoGomanytolisthere.qWhoneedsaspellchecker,UUwhenyouhaveanaudience?jOzMattUUW*elsh13UUJanuary1994(=e$"CreditsandLegalese׍$"ThepsLinuxDoGcumentationPro8jectisaloGoseteamofwriters,:proofreaders,andpseditorswhoare$"working:onasetofde nitiveLinuxmanuals.hTheoverallcoGordinatorofthepro8jectisMattW*elsh,$"aidedUUbyLarsWirzeniusandMichaelK.Johnson.3"ThisïmanualisbutoneinasetofseveralbGeingdistributedbytheLinuxDoGcumentationPro8ject,$"includingmCaLinuxUser'sGuide,s>SystemAdministrator'sGuide,andKernelHacker'smCGuide.These$"manualsareallavqailableinLffUJaTU>ExXsourceformatandPostscriptoutputforanonymousFTPfrom$"sunsite.unc.edu,UUinthedirectory/pub/Linux/docs/LDP.3"W*e encourageanyone withapGenchant forwritingoreditingtojoinusinimprovingLinuxdoGcu-$"mentation.EIf+youhaveInternete-mailaccess,youcanjointheDOC channeloftheLinux-Activists$"mailingUUlistbysendingmailtorፑ="ߤN cmtt9linux-activists-request@niksula.hut.fi$"withUUtheline="X-Mn-Admin: s,joinDOC$"asUUthe rstlineofthemessagebGody*.3"F*eelfreetogetintouchwiththeauthorandcoGordinatorofthismanualifyouhavequestions, $"pGostcards,money*,orYvideas.MattWelshcanbGereachedviaInternete-mailatmdw@sunsite.unc.edu,$"andUUinreallifeatrፑ="205UUGrayStreet="Wilson,UUN.C.27896="U.S.A. J(b{$"xiiKP덑$"UNIXUUisatrademarkofX/OpGen. $"LinuxUUisnotatrademark,andhasnoconnectiontoUNIX^Zcmr5TMorX/OpGen.$"TheUUXWindowSystemisatrademarkoftheMassachusettsInstituteofT*echnology.$"MS-DOSUUandMicrosoftWindowsaretrademarksofMicrosoft,Inc.Aύ$"CopyrightrcUU 1992{1994MattUUW*elsh$"205UUGrayStreetNE,WilsonNC,27893USA$"mdw@sunsite.unc.edu!L捑$"LinuxInstallationandGettingStarte}'d|maybGereproducedanddistributed,Einwholeorinpart,$"sub8jectUUtothefollowingconditions:ؼ0[q0.="TheUcopyrightnoticeabGoveandthispGermissionnoticemustbGepreservedcompleteonall="completeUUorpartialcopies.0[q1.="Any)translationorderivqativeworkofLinuxInstallationandGettingStarte}'d)mustbGeapproved="byUUtheauthorinwritingbGeforedistribution.0[q2.="IfyoudistributeLinuxvInstallationandGettingStarte}'dinpart,5instructionsforobtaining="theocompleteversionofthismanualmustbGeincluded,andameansforobtainingacomplete="versionUUprovided.0[q3.="SmallzpGortionsmaybereproducedasillustrationsforreviewsorquotesinotherworkswithout="thisUUpGermissionnoticeifpropercitationisgiven.0[q4.="The9GNUGeneralPublicLicensereferencedbGelowmaybGereproducedundertheconditions="givenUUwithinit.0[q5.="SeveralUysectionsofthisdoGcumentareheldunderseparatecopyright.r3Whenthesesectionsare="coveredbyadi erentcopyright,htheseparatecopyrightisnoted.IfNy9oudistributeLinux="InstallationHandGettingStartedinpart,dandthatpartis,inwhole,co9veredHunder="aTseparate,notedcop9yright,Ttheconditionsofthatcop9yrightTapply . )p(b{$"$xiiiKP덑3"Exceptionsorfor$"pro t.qIfUUdoingso,youmaywishtoincludeashort\installationsupplement"foryourrelease.3"TheauthorwouldliketoknowofanyplanstopublishanddistributethisbGookcommercially*.$"In/&thisway*,ewe/&canensurethatyouarekeptup-to-datewithnewrevisions.;And,eshouldanew$"versionTbGerightaroundthecorner,TyoumightwishtodelayyourpublicationofthebGookTuntilitis$"avqailable.3"IfyouaredistributingthisbGookcommercially*,Ddonations,royalties,and/orprintedcopiesare$"greatly߯appreciatedbytheauthor.ContributinginthiswayshowsyoursuppGortforfreesoftware$"andUUtheLinuxDoGcumentationPro8ject.!L捑$"All}sourcecoGdeinLinuxFInstallationandGettingStarte}'d}isplacedundertheGNU}GeneralPublic$"License.qSeeUUAppGendixEforacopyoftheGNU\GPL."(u$"Doucumen=tationConventions׍$"TheseUUconventionsshouldbGeobvious,butwe'llincludethemhereforthepGedantic.D$"BoldlgUsedUUtomarknewTconcepts,WARNINGS,andk9eywordsUUinalanguage.J$"italicslgUsedforemphasisintext,andoGccasionallyforquotesorintroductionsatthebe-lgginning Aofasection.ҌAlsousedtoindicatecommandsfortheusertotypGewhenlgshowingUUscreeninteraction(seebGelow).$"hp0J cmsl10slantedilgUsedtomarkmeta-v\rariablesinthetext,gespGeciallyinrepresentationsofthelgcommandUUline.qF*orexample,gls?-lUUhfoGoilgwhereUUhfoGoiwould\standfor"a lename,suchas/bin/cp.$"TypewriterlgUsedUUtorepresentscreeninteraction,asing$j cmti9lsN<{l/bin/cp g-rwxr-xr-x s,1rootXwheel12104Sep2515:53/bin/cplgAlso`usedforcoGdeexamples,%^whetheritisCQcode,%^ashellscript,orsomethingelse,lgandtodisplaygeneral les,ssuchascon guration les.QTWhennecessaryforclarity'slgsake,UUtheseexamplesor gureswillbGeenclosedinthinboxes.J$"ff  ffKey,„ fffffflgRepresentsUUakeytopress.qY*ouwilloftenseeitinthisform:2/(b{$"kxivKP덒gPressUUI#ff  ݍ ffreturn8 ffffff &]toUUcontinue.J$"!Tq lasy103lgAZdiamondinthemargin,5Ulikeablackdiamondonaskihill,5Umarks\danger"or lg\caution."qReadUUparagraphsmarkedthiswaycarefully*.?G(b{K$"K"Vp cmbx10KChapterF1;]ڍ$"IIn4trovduction toLinux:ؼ$"LinuxMisquitepGossiblythemostimportantachievementoffreesoftwaresincetheoriginalSp}'aceWar, $"or,.nmore$recently*,Emacs.aIthasdevelopGedintotheopGeratingsystemforbusinesses,.neducation,and$"pGersonalproductivity*.8LinuxisnolongerjustforUNIXwizardswhositforhoursinfrontofthe$"glowingbconsole(althoughweassureyouthatquiteanumbGerofusersfallintothiscategory). This$"bGookUUwillhelpyougetthemostoutofit.ؼ3"Linux& (pronouncedwithashorti,Z9asinLIH-nucks)isacloneoftheUNIX%opGeratingsystem$"thatrunsonIntel80386and80486computers.IItsuppGortsawiderangeofsoftware,fromTU>'ExXto$"X'WindowstotheGNU'C/C++compilertoTCP/IP.bIt'saversatile,1bGona deimplementationof$"UNIX,UUfreelydistributedbythetermsoftheGNUGeneralPublicLicense(seeAppGendixE).3"Linuxcanturnany386or486PCintoaworkstation.iItwillgiveyouthefullpGowerofUNIX$"atyour ngertips.BusinessesareinstallingLinuxonentirenetworksofmachines,˥usingtheopGer-$"atingQsystemtomanage nancialandhospitalrecords,Đadistributedusercomputingenvironment,$"telecommunications,andmore.oUniversitiesworldwideareusingLinuxforteachingcoursesonop-$"erating+systemsprogramminganddesign.fAnd,aofcourse,computingenthusiasts+everywhereare$"usingUULinuxathome,forprogramming,proGductivity*,andall-aroundhacking.3"WhatmakesLinuxsodi erentisthatitisafr}'eeimplementationofUNIX.Itwasandstillis$"developGedbyagroupofvolunteers,primarilyontheInternet,exchangingcoGde,reportingbugs,and$" xingproblemsinanopGen-endedenvironment.FAnyoneiswelcometojoinintheLinuxdevelopment$"e ort:'allittakesisinterestinhackingafreeUNIXcloneandsomekindofprogrammingknow-how.$"TheUUbGookthatyouholdinyourhandsisyourtourguide.($"1.1IAbuoutThisBook׍$"ThisbGookisaninstallationandentry-levelguidetotheLinuxsystem.QThepurpGoseistogetnew$"usersrupandrunningwiththesystembyconsoloGdatingasmuchimpGortantmaterialaspGossibleinto$"oneQTbGook.eInsteadofcoveringmanyofthevolatiletechnicaldetails,Tthosethingswhichtendto$"changeUUwithrapiddevelopment,wegiveyouenoughbackgroundto ndoutmoreonyourown.q1@(b{$"$"1.2.ATBriefHistoryofLin9ux32KP덑3"Linux:isnotdiculttoinstallanduse.hHowever,@aswithanyimplementationofUNIX,thereis $"often"someblackmagicinvolvedtogeteverythingworkingcorrectly*.|.We"hopGethatthisbookwill$"getUUyouontheLinuxtourbusandshowyouhowgroGovythisopGeratingsystemcanbe.ؼ3"InUUthisbGook,UUwecoverthefollowingtopics.ؼ3"="Whats"isLinux?.ThedesignandphilosophyofthisuniqueopGeratingsystem,zandwhatitcan="doUUforyou.3"="AllofthedetailsofwhatisneededtorunLinux,Cincludingsuggestionsonwhatkindof="hardwareUUcon gurationisrecommendedforacompletesystem.3"="How-toobtainandinstallLinux.TherearemanydistributionsoftheLinuxsoftware.W*e="presentmageneraldiscussionofLinuxsoftwaredistributions,showtoobtainthem,sandgeneric="instructionsUUforinstallingthesoftwareUU(whichshouldbGeapplicabletoanydistribution).="ThisUUeditionalsocontainsspGeci cinstructionsfortheSlackwaredistributionofLinux.3"="AbriefintroGductoryUNIXtutorial,forthoseuserswhohaveneverhadexpGeriencewithUNIX="bGefore.oThis|8tutorialshould,hopefully*,provide|8enoughmaterialforcompletenovicestohave="enoughUUbasicknow-howUUto ndtheirwayUUaroundthesystem.3"="AnJintroGductiontosystemsadministrationwithLinux.nHThiscoversthemostimpGortanttasks="that 'newLinuxadministratorswillneedtobGefamiliarwith,*suchascreatingusers,*managing=" lesystems,UUandsoforth.3"="Informationoncon guringmoreadvqancedaspGectsofLinux,UsuchastheXWindowSystem,="networkingUUwithTCP/IPandSLIP*,andthesetupofelectronicmailandnewssystems.ؼ3"ThisbGookisforthepersonalcomputeruserwishingtogetstartedwithLinux.QW*edon'tassume$"previous9UNIX expGerience,butdoexpectnovicestorefertoothermaterialsalongtheway*.4For9those$"unfamiliarwithUNIX,alistofusefulsourcesofinformationisgiveninAppGendixA./Ingeneral,$"thisUUbGookismeanttobereadalongwithanotherbookonbasicUNIXconcepts.($"1.2IABriefHistoryofLin=ux׍$"UNIXisoneofthemostpGopularoperatingsystemsworldwidebecauseofitslargesupportbaseand$"distribution.&VItswasoriginallydevelopGedasamultitaskingsystemforminicomputersandmainframes$"inthemid-1970's, buthassincegrowntobGecomeoneofthemostwidelyusedoperatingsystems$"anywhere,UUdespiteitssometimesconfusinginterfaceandlackofcentralstandardization.ؼ3"TherealreasonforUNIX'spGopularity?/ManyhackersfeelthatUNIXistheRightThing|the$"One'T*rueOpGeratingSystem.PHence,\thedevelopment'ofLinuxbyanexpandinggroupofUNIX$"hackersUUwhowantUUtogettheirhandsdirtywiththeirownsystem.3"V*ersionsClofUNIXCgexistformanysystems|rangingfrompGersonalcomputerstosupercomputers$"suchastheCrayY-MP.MostversionsofUNIXforpGersonalcomputersarequiteexpensiveandL̠(b{$"$"1.2.ATBriefHistoryofLin9ux33KP덑$"cumbGersome.Atithetimeofthiswriting,naone-machineversionofA*T&T'sSystemVQforthe386 $"runsUUatabGoutUS$1500.ؼ3"LinuxisafreelydistributableversionofUNIXdevelopGedprimarilybyLinusT*orvqalds^ٓRcmr71 qatthe$"UniversitysofHelsinkiinFinland.LinuxwasdevelopGedwiththehelpofmanyUNIXsprogrammers$"andAwizardsacrosstheInternet,allowingAanyonewithenoughknow-howandgumptiontheabilityto$"developYandchangethesystem.CsTheLinuxkernelusesnocoGdefromA*T&T5oranyotherproprietary$"source,andwmuchofthesoftwareavqailableforLinuxisdevelopGedbytheGNUbpro8jectattheF*ree$"SoftwaresF*oundationinCambridge,{Massachusetts.QHowever,programmerssalloverstheworldhave$"contributedUUtothegrowingpGoolUUofLinuxsoftware.3"LinuxRwasoriginallydevelopGedasahobbypro8jectbyLinusT*orvqalds.pItwasinspiredbyMinix,$"asmallUNIXsystemdevelopGedbyAndyT*anenbaum,and!bthe rstdiscussionsabGoutLinuxwere$"onjQtheUSENETj newsgroupcomp.os.minix.Thesediscussionswereconcernedmostlywiththe$"developmentUUofasmall,academicUNIXsystemforMinixuserswhowantedUUmore.3"The=veryearlydevelopmentofLinuxwasmostlydealingwiththetask-switchingfeaturesofthe$"80386UUprotected-moGdeinterface,allwritteninassemblycoGde.qLinuswrites,ؼL"\Afterthatitwasplainsailing:#hairycoGdingstill,ςbutIhadsomedevices,anddebug-="gingWwaseasier.NIbGetweenmultipleloginsessionsfromthesystemconsoleintextmoGde.QjUsersofthe\screen"$"programUUwill ndtheLinuxvirtualconsoleimplementationfamiliar.l(b{$"$"1.3.SystemTF eatures? 5KP덑3"Theݤkernelisabletoemulate387-FPU݀instructionsitself,sothatsystemswithoutamathco- $"proGcessorUUcanrunprogramsthatrequire oating-pointmathinstructions.ؼ3"LinuxlsuppGortsvqarious lesystemtypGesforstoringdata.lV*arious lesystems,rsuchastheext2fs$" lesystem,UhavebGeendevelopedspeci callyforLinux. Other lesystemtypGes,UsuchastheMinix-1$"andXenix lesystems,^arealsosuppGorted.!TheMS-DOS lesystemhasbeenimplementedaswell,$"allowingOyoutoaccessMS-DOS lesonharddriveor oppydirectly*.%TheISO9660CD-ROM$" lesystemtypGe,whichreadsallstandardformatsofCD-ROMs,isalsosuppGorted. nW*e'lltalkmore$"abGoutUU lesystemsinChapters2and4.3"LinuxgprovidesacompleteimplementationofTCP/IPgnetworking.kThisincludesdevicedrivers$"formanypGopularEthernetcards,SLIP;(SerialLineInternetProtoGcol,allowingyoutoaccessa$"TCP/IPCnetworkdviaaserialconnection),(PLIP(ParallelLineInternetProtoGcol),(PPPC(Point-to-$"PointProtoGcol),NFS(NetworkFileSystem),andsoon.JThecompleterangeofTCP/IPclientsand$"services=issuppGorted,7suchasFTP*,telnet,NNTP*,andSMTP.We'lltalkmoreabGoutnetworking$"inUUChapter5.3"TheDhLinuxkernelisdevelopGedtousethespecialprotected-modefeaturesoftheIntel80386and$"80486ҊproGcessors.eInparticular,Linuxmakesuseoftheprotected-moGdedescriptor-basedmemory$"management|paradigmandmanyoftheotheradvqancedfeaturesoftheseproGcessors.)Anyonefamiliar$"with:$80386protected-moGdeprogrammingknowsthatthischipwasdesignedforamultitaskingsystem$"suchUUasUNIX(or,actually*,Multics).qLinuxexploitsthisfunctionality*.3"TheֺLinuxkernelsuppGortsdemand-pagedloadedexecutables.Thatis,onlythosesegmentsof$"agprogramwhichareactuallyusedarereadintomemoryfromdisk."Also,,copy-on-writepagesare$"sharedamongexecutables,$Zmeaningthatifseveralinstancesofaprogramarerunningatonce,they$"willUUsharepagesinphysicalmemory*,reducingoverallmemoryusage.3"Intordertoincreasetheamountofavqailablememory*,|Linuxalsoimplementsdiskpaging:Bthat$"is,5up-to256megabytesof\swapspace"^2canbGeallocatedondisk.dWhenthesystemrequiresmore$"physicalmemory*,itwillswapoutinactivepagestodisk,thusallowingyoutorunlargerapplications$"andf[suppGortmoreusersatonce.However,swapf[isnosubstituteforphysicalRAM|itismuch$"slowerUUduetodriveaccesslatencytimes.3"Thekernelalsoimplementsauni edmemorypGoolforuserprogramsanddiskcache.vInthis$"way*,UUallfreememoryisusedforcaching,andthecacheisreducedwhenrunninglargeprograms.3"ExecutablesGusedynamicallylinkedsharedlibraries,=meaningthatexecutablessharecommon$"libraryicoGdeinasinglelibrary lefoundondisk,notunliketheSunOS]sharedlibrarymechanism.$"Thisallowsexecutable lestooGccupymuchlessspaceondisk,espGeciallythosethatusemanylibrary$"functions.ThereZarealsostatically-linkedlibrariesforthosewhowishtouseob8jectdebuggingor$"maintainF\complete"executableswithouttheneedforsharedlibrariestobGeinplace.lLinuxshared$"librariesParedynamicallylinkedatrun-time,}allowingtheprogrammertoreplacemoGdulesofthe$"librariesUUwiththeirownroutines.3"T*ofacilitatedebugging,ItheLinuxkerneldoGescoredumpsforpost-mortemanalysis.TUsinga$"coredumpandanexecutablelinkedwithdebuggingsuppGort,"itispossibletodeterminewhatcaused$"X-ffr J= "5-:2LܸSwÎapspaceisinappropriatelynamed:Yentirepro'ExX,developedbyDonaldKnuthof$"computerUUsciencefame.qDialectsofTU>'ExX,suchasLffUJaTU>EX,arealsoavqailable.3"T*extңproGcessorssuchasTU>'ExXandgroffdi ermostlyinthesyntaxoftheirformattinglanguages.$"ThemvchoiceofoneformattingsystemoveranotherisalsobasedupGonwhatutilitiesareavqailableto$"satisfyUUyourneeds,aswellaspGersonaltaste.3"F*or"example,somepGeopleconsiderthegroffformattinglanguagetobeabitobscure,sothey$"use TU>'ExX,whichismorereadablebyhumans.However,groffiscapableofproGducingplainASCII$"output,j~viewable3onaterminal,whileTU>'ExXisintendedprimarilyforoutputtoaprintingdevice.$"However,vqariousprogramsexisttoproGduceplainASCIInfromTU>'ExX-formatteddocuments,orto$"convertUUTU>'ExXtogroff,forexample.(b{$"$"1.4.Soft9wareTF eatures88KP덑3"AnotherJtextproGcessingsystemistexinfo,anextensiontoTU>'ExXusedforsoftwareJdocumentation $"byrtheF*reeSoftwareF*oundation.:|texinfoiscapableofproGducingaprinteddoGcument,Рoranonline-$"browsable-LhypGertext\Info"documentfromasinglesource le.Info lesarethemainformatof$"doGcumentationUUusedbyGNUsoftwaresuchasEmacs.ؼ3"T*extDproGcessorsareusedwidelyinthecomputingcommunityDforproducingpapers,g@theses,$"magazineq]articles,x_andbGooksq](infact,thisbGookq]wasproGducedusingLffUJaTU>ExX).TheabilitytoproGcess$"the3sourcelanguageasaplaintext leopGensthedoortomanyextensionstothetextprocessor$"itself.e@Because/sourcedoGcumentsarenotstoredinanobscureformat,7Creadableonlybyaparticular$"word@bproGcessor,Dprogrammersareabletowriteparsersandtranslatorsfortheformattinglanguage,$"extendingUUthesystem.3"WhatCHdoGessuchaformattinglanguagelooklike?;Ingeneral,~theformattinglanguagesource$"consistswmostlyofthetextitself,alongwith\controlcoGdes"toproduceaparticulare ect,suchas$"changingUUfonts,settingmargins,creatinglists,andsoon.3"AsUUanexample,takethefollowingtext:="Mr.qT*orvqalds:笍="W*e+areveryupsetwithyourcurrentplanstoimplementp}'ost-hypnoticmzsuggestioninthe="Lin9uxUUterminaldrivercoGde.qW*efeelthiswayforthreereasons:!DF[q1.S"Plantingmsubliminalmessagesintheterminaldriverisnotonlyimmoral,3itisaS"wasteUUoftime;!DF[q2.S"IthasbGeenproventhat\post-hypnoticsuggestions"areine ectivewhenusedupGonS"unsuspGectingUUUNIXhackers;F[q3.S"W*e1havealreadyimplementedhigh-voltageelectricshoGcks,(asasecuritymeasure,S"inUUthecoGdeforlogin.!D="W*eUUhopGeyouwillreconsider.3"ThisUUtextwouldappGearintheLffUJaTU>ExXformattinglanguageasthefollowing:E="\begin{quote} =="Mr.Torvalds:z="Weareveryupsetwithyourcurrentplanstoimplement{\empost-hypnotic="suggestion\/}inthe{\bfLinux}terminaldrivercode.Wefeelthis="wayforthreereasons:="\begin{enumerate}="\itemPlantingsubliminalmessagesinthekerneldriverisnotonlyY|immoral,itisawasteoftime;="\itemIthasbeenproventhat``post-hypnoticsuggestions''areineffectiveY|whenuseduponunsuspectingUNIXhackers;="\itemWehavealreadyimplementedhigh-voltageelectricshocks,asaY|securitymeasure,inthecodefor{\ttlogin}.="\end{enumerate}="Wehopeyouwillreconsider.="\end{quote} (b{$"$"1.4.Soft9wareTF eatures89KP덑3"The1authorenterstheabGove\source"textusinganytexteditor,'andgeneratestheformatted $"output/byproGcessingthesourcewithLffUJaTU>ExX.At rstglance,thetypGesettinglanguagemayappGearto$"bGeobscure,߃butit'sactuallyquiteeasytolearn.@Usingatextprocessingsystemenforcestypographi-$"calstandardswhenwriting.>F*orexample,allenumeratedlistswithinadoGcumentwillloGokthesame,$"unless }theauthormoGdi esthede nitionoftheenumeratedlist\environment".YTheprimarygoalis$"toallowtheauthortoconcentrateonwritingtheactualtext, insteadofworryingabGouttypGesetting$"conventions.ؼ3"WYSIWYG2wordZproGcessorsareattractiveformanyreasons;YtheyprovideapGowerful(andsome-$"timesQcomplex)visualinterfaceforeditingthedoGcument.KHowever,thisinterfaceisinherentlylimited$"tothoseaspGectsoftextlayoutwhichareaccessibletotheuser._/F*orexample,(manywordproGcessors$"provideaspGecial\formatlanguage"forproducingcomplicatedexpressionssuchasmathematical$"formulae.qThisUUisidenticaltextproGcessing,albeitonamuchUUsmallerscale.3"ThesubtlebGene toftextprocessingisthatthesystemallowsyoutospGecifyexactlywhatyou$"mean.iWAlso,Atext<proGcessingsystemsallowyoutoeditthesourcetextwithanytexteditor,Aandthe$"sourceYiseasilyconvertedYtootherformats.~uThetradeo forthis exibilityandpGoweristhelackof$"aUUWYSIWYGinterface.3"ManyȼusersofwordproGcessorsareusedtoseeingtheformattedtextastheyeditit.BOntheother$"hand,g)when0ewritingwithatextproGcessor,onegenerallydoGesnotworryabouthowthetextwill$"appGearn"whenformatted..Thewriterlearnstoexpecthowthetextshouldlookfromtheformatting$"commandsUUusedinthesource.3"ThereareprogramswhichallowyoutoviewtheformatteddoGcumentonagraphicsdisplaybGefore$"printing.TF*orexample,)thexdviprogramdisplaysa\deviceindepGendent" legeneratedbytheTU>'ExX$"systemundertheXWindowsenvironment.hOthersoftwareapplications,&suchasxfig,&providea$"WYSIWYGh&graphicsh+interfacefordrawing guresanddiagrams,lwhicharesubsequentlyconverted$"toUUthetextproGcessinglanguageforinclusioninyourdocument.3"Admittedly*,textxdproGcessorssuchasnroffwerearoundlongbGeforewordproGcessingwasavqailable.$"However,many pGeoplestillprefertousetextprocessing,becauseitismoreversatileandindependent$"ofagraphicsenvironment.Ineithercase,theidocwordproGcessorisalsoavqailableforLinux,and$"bGeforeclongweexpecttoseecommercialwordprocessorsbecomingavqailableaswell.!JIfyouabsolutely$"don'twanttogiveupwordproGcessingfortextprocessing,]youcanalwaysrunMS-DOS,orsome$"otherUUopGeratingsystem,inadditiontoLinux.3"Thereѥaremanyothertext-proGcessing-relatedutilitiesavqailable.ThepGowerfulMET*AFONT$"system,;used fordesigningfontsforTU>'ExX,isincludedwiththeLinuxpGortofTU>'ExX.Otherprograms$"includeispell,#aninteractivespGellcheckerandcorrector;makeindex,usedforgeneratingindicies$"inTLffUJaTU>ExXdoGcuments;@aswellasmanygroffandTU>'ExX-basedmacropackqagesforformattingmany$"typGesxofdocumentsandmathematicaltexts.cConversionprogramstotranslatebGetweenTU>'ExXor$"groffUUsourcetoamyriadofotherformatsareavqailable. p(b{$"$"1.4.Soft9wareTF eatures310KP덍$"1.4.3MbProgramminglanguagesandutilitiesN$"Linux,providesacompleteUNIX,}programmingenvironment,4includingallofthestandardlibraries, $"programming3toGols,:compilers,anddebuggersthatyouwouldexpGectto ndonotherUNIX systems.$"Within@theUNIX@qsoftware@developmentworld,{applicationsandsystemsprogrammingisusually$"doneWinCWorC++.QThestandardCandC++compilerforLinuxisGNU'sgcc,whichisanadvqanced,$"moGdern]compilersupportingmanyoptions.7ItisalsocapableofcompilingC++(includingA*T&T$"3.0UUfeatures)aswellasOb8jective-C,anotherob8ject-orienteddialectofC.ؼ3"BesidesCandC++, manyothercompiledandinterpretedprogramminglanguageshavebGeen$"pGorted>toLinux,vsuch>asSmalltalk,FOR*TRAN,Pascal,vLISP*,Scheme,vandAda(ifyou'remasoGchistic$"enoughtoprograminAda|we'renotgoingtostopyou).>WInaddition,vqariousassemblersforwriting$"protected-moGdeI80386codeareavqailable,asareUNIXIFhackingfavoritessuchasPerl(thescript$"languageGtoendallscriptlanguages)andTcl/Tk(ashell-likecommandproGcessingsystemincluding$"suppGortUUfordevelopingsimpleXWindowsapplications).3"TheadvqancedgdbdebuggerhasbGeenported,whichallowsyouto 9stepthroughaprogram$"toT ndbugs,5orexaminethecauseforacrashusingacoredump.gprof,apro lingutility*,will$"giveyoupGerformancestatisticsforyourprogram,(lettingyouknowwhereyourprogramisspGending$"mostofitstimeexecuting.$TheEmacstexteditorprovidesaninteractiveeditingandcompilation$"environment0forvqariousprogramminglanguages.EfOthertoGolsincludeGNUmakeandimake,usedto$"managebcompilationoflargeapplications;^andRCS,asystemforsourceloGckingandrevisioncontrol.3"Linux implementsdynamically-linkedsharedlibraries,zwhichallowbinariestobGemuchsmaller$"asĻthesubroutinecoGdeislinkedatrun-time.TheseDLLĞlibrariesalsoallowtheapplicationspro-$"grammerētooverride&functionēde nitionswiththeirowncoGde.AF*orexample,ifaprogrammerwished$"towriteherownversionofthemalloc()libraryroutine,?thelinkerwouldusetheprogrammer's$"newUUroutineinsteadoftheonefoundinthelibraries.3"LinuxisidealfordevelopingUNIXapplications.1ItprovidesamoGdernprogrammingenvironment$"with butwillalso$"letR2youworkinthecomfortofyourownhome.^3.ComputerSciencestudentscanuseLinuxtolearn$"UNIXUUprogrammingandtoexploreotheraspGectsofthesystem,suchaskernelarchitecture.3"WithLinux,notonlydoyouhaveaccesstothecompletesetoflibrariesandprogramming$"utilities,UUbutyoualsohavethecompletekernelandlibrarysourcecoGdeatyour ngertips.#$"1.4.4MbTheXWindowSystemN$"TheFXWindowSystemisthestandardgraphicsinterfaceforUNIXmachines.ItisapGowerful$"environment,suppGortingmanyapplications.d7UsingXWindows,4theusercanhavemultipleterminal$"X-ffr J= "5-:3LܸThe:authoruseshisLinÎuxsystemtodevelopandtestXWindowsapplicationsathome,TwhichcanbxV*ariouswidgetsets,IsuchasAthena,IOpGenLook,$"and|Xaw3D| aresuppGorted. Allofthestandardfonts,bitmaps,man|pages,anddoGcumentationare$"included.qPEXUU(aprogramminginterfacefor3-Dgraphics)isalsosuppGorted.3"ManyXapplicationsprogrammersusetheproprietaryMotifwidgetsetfordevelopment.LinuxsuppGortsmany$"pGopularBEthernetcardsandinterfacesforpersonalcomputers,includingtheD-LinkpocketBEthernet$"adaptorUUforlaptops.3"However,bGecauseOnoteveryoneOhasanEthernetdropathome,LinuxalsosuppGortsSLIP4(Serial$"LineInternetProtoGcol),whichallowsyoutoconnecttotheInternetviamoGdem.Inordertouse$"SLIP*,you'llneedtohaveaccesstoaSLIPserver,%amachineconnectedtothenetworkwhichallows$"dial-inBaccess.ManybusinessesanduniversitiesprovidesuchSLIP!servers.Infact,>ifyourLinux$"system̰hasanEthernetconnectionaswellasamoGdem,youcancon gureitasaSLIP̑serverfor$"otherUUhosts.3"NFSC(NetworkDFileSystem)allowsyoursystemtoseamlesslyshare leswithothermachines$"onthenetwork.#FTP(FileT*ransferProtoGcol)allowsyoutotransfer lesbGetweenothermachines.$"Otherapplicationsincludesendmail,Easystemforsendingandreceivingelectronicmailusingthe$"SMTPxprotoGcol;.NNTP-basedelectronicnewssystemssuchasC-NewsandINN;telnet,rlogin,$"andrsh,whichallowyoutologinandexecutecommandsonothermachinesonthenetwork;and$"finger,{which@allowsyoutogetinformationonotherInternetusers.4RThereareliterallytonsof$"TCP/IP-basedUUapplicationsandprotoGcolsoutthere.3"ThefullrangeofmailandnewsreadersareavqailableforLinux,suchaselm,pine,rn,nn,and$"tin.eWhatever1yourpreference,8youcancon gureyourLinuxsystemtosendandreceiveelectronic$"mailUUandnewsfromalloverUUtheworld.3"If$youhaveexpGeriencewithTCP/IPapplicationsonotherUNIXsystems,>LinuxwillbGevery$"familiarMtoyou.YThesystemprovidesastandardsoGcketprogramminginterface,sovirtuallyany$"programwhichusesTCP/IPcanbGeportedtoLinux.TheLinuxXserveralsosuppGortsTCP/IP*,$"allowingUUyoutodisplayapplicationsrunningonothersystemsonyourLinuxdisplay*.3"InUUChapter5we'lldiscusscon gurationandsetupofTCP/IP*,includingSLIP,forLinux. (b{$"$"1.4.Soft9wareTF eatures313KP덑3"UUCPPj(UNIX-to-UNIXCopy)Pkisanoldermechanismusedtotransfer les,Qgelectronicmail,and $"electronic +newsbGetween +UNIX machines.XClassically*,3UUCPmachines +connectedtoeachotherover$"theh phonelinesviamoGdem,lbutUUCPhisabletotransportoverh aTCP/IPhnetworkh aswell.Ifyou$"do_nothave_accesstoaTCP/IPMnetwork_oraSLIPserver,"you_cancon gureyoursystemtosend$"andUUreceive lesandelectronicmailusingUUCP*.SeeChapter5formoreinformation.#$"1.4.6MbTelecommunicationsandBBSsoftwareN$"IfyouhaveamoGdem,[[youwillbGeabletocommunicatewithothermachinesusingoneofthe$"telecommunicationsz^packqagesavqailableforLinux.ManypGeopleusetelecommunicationssoftware$"tocaccessbulletinbGoardsystems(BBSs),'aswellascommercialonlineservicessuchasProGdigy*,$"CompuServe,gandcAmericaOn-Line.}OtherpGeopleusetheirmodemstoconnecttoaUNIXcsystem$"atcJworkorschoGol.Y*oucanevenuseyourmoGdemandLinuxsystemtosendandreceivefacsimiles.$"T*elecommunicationsYWsoftwareunderLinuxisverysimilartothatfoundunderMS-DOSYorother$"opGerating0systems.Anyonewhohaseverusedatelecommunicationspackqagewill ndtheLinux$"equivqalentUUfamiliar.ؼ3"OneofthemostpGopularcommunicationspackqagesforLinuxisSeyon,vanXapplicationproviding$"aCpcustomizable,Gergonomicinterface,withbuilt-insuppGortforvqarious letransferprotocolssuchas$"Kermit,#=ZMoGdem,andsoon._OthertelecommunicationsprogramsincludeC-Kermit,#=pcomm,and$"minicom.STheseAaresimilartocommunicationsprogramsfoundonotheropGeratingsystems, Eandare$"quiteUUeasytouse.3"IfyoudonothaveaccesstoaSLIPlserver(seetheprevioussection),$youcanusetermto$"multiplexUyourserialline.RtermwillallowyoutoopGenmultipleloginsessionsoverthemoGdem$"connectiontoaremotemachine.~termwillalsoallowyoutoredirectXclientconnectionstoyour$"loGcal?"X?server,Cthroughtheserialline,allowingyoutodisplayremoteX?applicationsonyourLinux$"system.qAnotherUUsoftwarepackqage,KA9Q,implementsasimilarSLIP-likeinterface.3"Running:abulletinbGoardsystem(BBS):isafavorite:hobby(andmeansofincome)formany$"pGeople.hLinux:"supportsawiderangeofBBS:software,?mostofwhichismorepGowerfulthanwhatis$"avqailableforotheropGeratingsystems.Withaphoneline,amodem,andLinux,youcanturnyour$"system2intoaBBS,providingdial-inaccesstoyoursystemtousersworldwide.$^BBS softwarefor$"LinuxUUincludesXBBSandtheUniBoardBBSpackqages.3"MostBBSsoftwareloGckstheuserintoamenu-basedsystemwhereonlycertainfunctionsand$"applicationsHareavqailable.L/AnalternativetoBBSHaccessisfullUNIXaccess,whichwouldallow$"userstodialintoyoursystemandloginasaregularuser.ZWhilethiswouldrequireafairamount$"ofmaintenanceonthepartofthesystemadministrator,ritcanbGedone,andprovidingpublicUNIX$"accessufromyourLinuxsystemisnotdiculttodo.A}AlongwithaTCP/IPPnetwork,nyoucanprovide$"electronicUUmailandnewsaccesstousersonyoursystem.3"IfKyoudonothaveaccesstoaTCP/IPK|networkorUUCPK|feed,ULinuxwillalsoallowyouto$"communicateͨwithanumbGerofBBSGnetworks,+suchasFidoNet,+withwhichyoucanexchange$"electronicHnewsandmailviathephoneline.KMoreinformationontelecommunicationsandBBS$"softwareUUunderLinuxcanbGefoundinChapter5.(b{$"$"1.4.Soft9wareTF eatures314KP덍$"1.4.7MbInterfacingwithMS-DOSN$"V*ariousutilitiesexisttointerfacewiththeworldofMS-DOS.Themostwell-knownapplicationisthe $"LinuxIMS-DOS.Emulator,whichallowsyoutorunmanyMS-DOS.applicationsdirectlyfromLinux.$"AlthoughLinuxandMS-DOSѷarecompletelydi erentopGeratingsystems,%the80386protected-mode$"environmentallowscertaintaskstobGehaveasiftheywererunningin8086-emulationmoGde,=as$"MS-DOSUUapplicationsdo.ؼ3"TheMS-DOSemulatorisstillunderdevelopment,yetmanypGopularapplicationsrununderit.$"Understandably*, however,MS-DOSapplicationswhichusebizarreoresotericfeaturesofthesystem$"mayΆneverbGesupported,becauseitisonlyanemulator.[F*orexample,youwouldn'texpGecttobe$"able1itorunanyprogramswhichuse80386protected-moGdefeatures,8suchasMicrosoftWindows(in$"386UUenhancedmoGde,thatis).3"ApplicationsTwhichrunsuccessfullyundertheLinuxMS-DOSHEmulatorinclude4DOSH(acom-$"mandinterpreter),F*oxpro2.0,HarvqardGraphics,MathCad,Stacker3.1,T*urbGoAssembler,T*urbGo$"C/C++,\T*urbGoZPascal,MicrosoftWindows3.0(inr}'ealmoGde),\andW*ordPerfect5.1.%Standard$"MS-DOSUUcommandsandutilities(suchasPKZIP,andsoon)workwiththeemulatoraswell.3"The?MS-DOS$EmulatorismeantmostlyasanadhoGcsolutionforthosepeoplewhoneedMS-$"DOS+only+forafewapplications,3butuseLinuxforeverythingelse.cIt'snotmeanttobGeacomplete$"implementationofMS-DOS.Ofcourse,iftheEmulatordoGesn'tsatisfyyourneeds,youcanalways$"run>7MS-DOS>1aswellasLinuxonthesamesystem.jUsingtheLILO>1bGoot>7loader,ByoucanspGecifyat$"bGoot|timewhichopGeratingsystemtostart.WLinuxcancoGexistwithotheroperatingsystems,Asuchas$"OS/2,UUaswell.3"Linuxprovidesaseamlessinterfacefortransferring lesbGetweenLinuxandMS-DOS.Y*oucan$"mount+anMS-DOS+partitionor oppyunderLinux,4anddirectlyaccessMS-DOS+ lesasyouwould$"anyUUother.3"Currentlyunderdevelopmentisapro8jectknownasWINE|aMicrosoftWindowsemulatorfor$"theXWindowSystemunderLinux.?sequencers>andeditors(allowingyoutocompGosemusicforplaybackthroughasynthesizeror$"otherUUMIDI-controlledinstrument),andsoundeditorsfordigitizedsounds.3"Can'tl ndtheapplicationyou'reloGokingfor?$ TheLinuxSoftwareMap,describGedinAppendixA,$"contains?5alistofmanysoftwarepackqageswhichhavebGeenwrittenandportedtoLinux.jgWhilethis$"list;isfarfromcomplete,itcontainsagreatdealofsoftware.EAnotherwayto ndLinuxapplications$"isz?toloGokattheINDEXz6 lesfoundonLinuxFTPsites,zifyouhaveInternetaccess.JustbypGoking$"aroundUUyou'll ndagreatdealofsoftwarejustwaitingtobGeplayedwith.3"IfAyouabsolutelycan't ndwhatyouneed,$xyoucanalwaysattempttopGorttheapplicationfrom$"anotherplatformtoLinux.UDMostfreelydistributableUNIX-basedsoftwarewillcompileonLinux$"withfewproblems.3Or,ifallelsefails,youcanwritetheapplicationyourself.3Ifit'sacommercial$"application&Pyou'reloGokingfor,ZtheremaybGeafree\clone"avqailable.Or,Zyoucanencouragethe$"softwarecompanytoconsiderreleasingaLinuxbinaryversion.'Severalindividualshavecontacted$"softwareA^companies,|`askingthemtopGorttheirapplicationstoLinux,andhaveA^metwithvqarious$"degreesUUofsuccess.($"1.5IAbuoutLin=ux'sCopyright׍$"LinuxMiscoveredbywhatisknownastheGNUMGener}'alxPublicLicense,)orMGPL.TheGPLMwas$"developGed5{fortheGNU5spro8jectbytheF*reeSoftwareF*oundataion.g)ItmakesanumbGerofprovisions$"for|thedistributionandmoGdi cationof\freesoftware".\F*ree"|inthissensereferstofreedom,pnot$"just~cost.TheGPL~hasalways~bGeensub8jecttomisinterpretation,>andwehopGethatthissummary$"willŠhelpyoutounderstandtheextentandgoalsoftheGPLŃanditse ectonLinux.¨AŃcomplete$"copyUUoftheGPLisincludedinAppGendixE.3"Originally*,>LinusTorvqaldsreleasedLinuxunderalicensemorerestrictivethantheGPL,which$"allowedthesoftwaretobGefreelydistributedandmodi ed,butpreventedanymoneychanginghands'w(b{$"$"1.5.AbQoutTLin9ux'sCopyrightR16KP덑$"forcitsdistributionanduse.^Ontheotherhand,'theGPLUallowspGeopletosellandmakepro tfrom $"freesoftware,VbutdoGesnotallowthemtorestricttherightforotherstodistributethesoftwarein$"anyUUway*.ؼ3"First,!itshouldbGeexplainedthat\freesoftware"coveredbytheGPLisnotinthepublicdomain.$"Publicʃdomainsoftwareʃissoftwareʃwhichisnotcopyrighted,andisliterallyownedbythepublic.$"Software5McoveredbytheGPL,ontheotherhand,mKiscopyrightedtotheauthororauthors.This$"meansHthatthesoftwareHisprotectedbystandardinternationalcopyrightlaws,Jandthattheauthor$"ofthesoftwareislegallyde ned.LBJustbGecausethesoftwaremaybGefreelydistributeddoesnotmean$"thatUUitisinthepublicdomain.3"GPL-licensed softwareisalsonot\shareware".Generally*,:\shareware"softwareisownedand$"copyrighteddbytheauthor,buttheauthorrequiresuserstosendinmoneyforitsuseafterdis-$"tribution.Ontheotherhand,=softwarecoveredbytheGPLmaybGedistributedandusedfreeof$"charge.3"TheUGPLalsoallowspGeopletotakeandmoGdifyfreesoftware,Uanddistributetheirownversions$"ofXthesoftware.{zHowever,Y`anyXderivedworksfromGPLXsoftwaremustalsobGecoveredbytheGPL.$"In#Ootherwords,-QacompanycouldnottakeLinux,-QmoGdifyit,andsellitunderarestrictivelicense.aIf$"anyUUsoftwareisderivedfromLinux,thatsoftwaremustbGecoveredbytheGPLaswell.3"The>GPL allowsfreesoftwaretobGedistributedandusedfreeofcharge.JHowever,italsoallowsa$"pGersonIDororganizationtodistributeGPLIAsoftwareIDforafee,Kandeventomakeapro tfromitssale$"anddistribution.However,insellingGPLsoftware,thedistributorcannottakethoserightsaway$"fromthepurchaser;"thatis,ifyoupurchaseGPLssoftwarefromsomesource,youmaydistributethe$"softwareUUforfree,orsellityourselfaswell.3"This mightsoundlikeacontradictionat rst._ZWhysellsoftwareforpro twhentheGPLallows$"anyone3toobtainitforfree?fAsanexample,:let'ssaythatsomecompanydecidedtobundlealarge$"amountoffreesoftwareonaCD-ROManddistributeit.TThatcompanywouldneedtochargefor$"thePoverheadofproGducinganddistributingtheCD-ROM,andthecompanymayevendecideto$"makeUUpro tfromthesalesofsoftware.qThisisallowedbytheGPL.3"OrganizationsCwhichsellfreesoftwaremustfollowcertainrestrictionssetforthintheGPL.First,$"theygcannotrestricttherightsofuserswhopurchasethesoftware.0Thismeansthatifyoubuya$"CD-ROMԵofGPLsoftware,youcancopyanddistributethatCD-ROMԵfreeofcharge,orresellit$"yourself.MSecondly*,Pdistributorsmustmakeitobvioustousersthatthesoftwareisindeedcoveredby$"thevGPL.Thirdly*,distributorsmustprovide,freeofcharge,thecompletesourcecoGdeforthesoftware$"bGeingdistributed.7ThiswillallowanyonewhopurchasesGPLsoftwaretomakemoGdi cationsofthat$"software.3"AllowingacompanytodistributeandsellfreesoftwareisaverygoGodthing.lNoteveryonehas$"accessbtotheInternettodownloadsoftware,f suchasLinux,f forfree.TheGPLballowscompaniesto$"sellKanddistributesoftwareKtothosepGeoplewhodonothaveKfree(cost-wise)accesstothesoftware.$"F*orcexample,manyorganizationssellLinuxondiskette,tapGe,orcCD-ROMviamailorder,and$"makepro tfromthesesales.ThedevelopGersofLinuxmayneverseeanyofthispro t;thatisthe$"understandingthatisreachedbGetweenthedevelopGerandthedistributorwhensoftwareislicensed$"by7theGPL.Inotherwords,0LinusknewthatcompaniesmaywishtosellLinux,0andthathemay9s(b{$"$"1.6.TheTDesignandPhilosoph9yofLinuxԇ017KP덑$"notUUseeapGennyofthepro tsfromthosesales.ؼ3"In?mthefreesoftware?mworld,CtheimpGortantissueisnotmoney*.jzThegoaloffreesoftwareisalways $"todevelopanddistributefantasticsoftwareandtoallowanyonetoobtainanduseit.tZInthenext$"section,UUwe'lldiscusshowthisappliestothedevelopmentofLinux.($"1.6ITheDesignandPhilosoph=yofLinux׍$"WhenܷnewusersencounterLinux,theyoftenhaveafewmisconceptionsandfalseexpGectationsof$"theHsystem.LinuxisauniqueopGeratingsystem,݅anditisimportanttounderstanditsphilosophy$"and##designinordertouseite ectively*.a TimeenoughforasoapbGox.a EvenifyouareanagedUNIX$"guru,UUwhatfollowsisprobablyofinteresttoyou.3"Inb_commercialUNIXb\developmentb_houses,etheentiresystemisdevelopGedwitharigorouspolicy$"of#qualityassurance,W|sourceandrevisioncontrolsystems,W|doGcumentation,and#bugrepGortingand$"resolution.cODevelopGers)arenotallowedtoaddfeaturesortochangekeysectionsofcoGdeonawhim:$"theylmustvqalidatethechangeasarespGonsetoabugreportandconsequently\checkin"allchanges$"toWJthesourcecontrolsystem,WsothatthechangescanbGebackedoutifnecessary*.wEachdevelopGeris$"assignedahoneormorepartsofthesystemcoGde,dmandonlythatdevelopermayalterthosesectionsof$"theUUcoGdewhileitis\checkedUUout".3"Internally*,˰theFqualityassurancedepartmentrunsrigorousregressiontestsuitesoneachnewpass$"ofBtheopGeratingsystem,FFandreportsanybugs.kItistheresponsibilityofthedevelopGersto xthese$"bugsqasrepGorted.Aq complicatedsystemofstatisticalanalysisisemployedqtoensurethatacertain$"pGercentage͕ofbugsare xedbeforethenextrelease,andthattheoperatingsystemasawholepasses$"certainUUreleasecriteria.3"Inyall,theproGcessusedbycommercialUNIXbdevelopGerstomaintainandsuppGorttheircodeis$"verycomplicated,andquitereasonablyso.;ThecompanymusthavequantitativeproGofthatthenext$"revisionToftheopGeratingsystemisreadytobeshipped;Thence,!thegatheringandanalysisofstatistics$"abGouttheoperatingsystem'sperformance.ItisabigjobtodevelopacommercialUNIXsystem,$"often largeenoughtoemployhundreds(ifnotthousands)ofprogrammers,Mtesters,doGcumentors,$"andadministrativepGersonel.ROfcourse, UnotwocommercialUNIX}vendorsarealike, Ubutyougetthe$"generalUUpicture.3"WithLinux,youcanthrowouttheentireconceptoforganizeddevelopment,sourcecontrol$"systems,#structuredbugrepGorting,orstatisticalanalysis.]+Linuxis,andmorethanlikelyalwayswill$"bGe,UUahacker'sUUoperatingsystem.^43"Linux>isprimarilydevelopGedasagroupe ortbyvolunteersontheInternetfromalloverthe$"world.)AcrosstheInternetandbGeyond,anyonewithenoughknow-howhastheoppGortunitytoaid$"in}developinganddebuggingthekernel,(pGortingnewsoftware,(writingdoGcumentation,(orhelping$"newusers.PThereisnosingleorganizationrespGonsiblefordevelopingthesystem.F*orthemostpart,$"thewhilestabilityisanimportantfactor$"inUUthedevelopmentUUofLinux,itisnottheonly7factor.3"MoreimpGortant,perhaps,isfunctionality*.*`Inmanycases,newcoGdewillmakeitintothestandard$"kerneleventhoughitisstillbuggyandnotfunctionallycomplete.LTheassumptionisthatitismore$"impGortanttoreleasecodewhichuserscantestandusethandelayareleaseuntilitis\complete".$"AsGanexample,JRWINEG(theMicrosoftWindowsEmulatorforLinux)hadan\ocial"alpharelease$"bGefore{itwascompletelytested.8Inthisway*,theLinuxcommunityatlargehadachancetoworkp(b{$"$"1.7.Di erencesTBet9weenLinuxandOtherOpQeratingSystemsk20KP덑$"withthecoGde,"testit,andhelpdevelopit,whilethosewhofoundthealphacoGde\goodenough"for $"theirUUneedscoulduseit.qCommercialUNIXvendorsrarely*,ifever,releasesoftwareinthismanner.ؼ3"IfyouhavebGeenaUNIXsystemsadministratorformorethanadecade, andhaveusedevery$"commercialxqUNIXxhsystemundertheSun(nopunintended),8Linuxxqmaytakesomegettingusedto.$"TheGsystemisverymoGdernanddynamic.`Anewkernelreleaseismadeapproximatelyeveryfew$"months.NewsoftwareisconstantlybGeingreleased.OnedayyoursystemmaybGecompletelyup-$"to-datewiththecurrenttrend,andthenextdaythesamesystemisconsideredtobGeintheStone$"Age.3"Withallofthisdynamicactivity*,ܚhowcanyoubGeexpectedtokeepupwiththeever-changing$"Linuxworld?{F*orthemostpart,.itisbGesttoupgradeincrementally;Ythatis,.upgradeonlythose$"parts8ofthesystemthatne}'ed8upgrading,>andthenonlywhenyouthinkanupgradeisnecessary*.IFor$"example,ԡif+youneveruseEmacs,ԡthereislittlereasontocontinuouslyinstalleverynewreleaseof$"Emacs Zonyoursystem.`F*urthermore,*evenifyouareanavidEmacsuser,*thereisusuallynoreason$"toPupgradeitunlessyou ndthatsomefeatureismissingthatisinthenextrelease.pDThereislittle$"orUUnoreasontoalwaysUUbGeontopofthenewestversionofsoftware.3"W*ehopGethatLinuxwillmeetorexceedyourexpGectationsofahomebrewUNIXsystem.^Atthe$"veryVcoreofLinuxisthespiritoffreesoftware,)ofconstantdevelopmentandgrowth.oTheLinux$"communityfavorsexpansionoverstability*,andthatisadicultconcepttoswallowformanypGeople,$"espGeciallythosesosteepedintheworldofcommercialUNIX.Y*oucannotexpectLinuxtobeperfect;$"nothing2everisinthefreesoftwareworld.f7However,9webGelievethatLinuxreallyisascompleteand$"usefulUUasanyotherimplementationofUNIX.($"1.7IDi erencesBet=weenLinuxandOtherOpueratingSys-Items׍$"ItCisimpGortanttounderstandthedi erencesbetweenCLinuxandotheropGeratingsystems,>suchas$"MS-DOS,dOS/2,]andotherimplementationsofUNIXdIforthepGersonalcomputer.tFirstofall,it$"shouldcbGemadeclearthatLinuxwillcoexisthappilywithotheroperatingsystemsonthesame$"machine:hthatis,youcanrunMS-DOS|andOS/2alongwithLinuxonthesamesystemwithout$"problems.qThereUUareevenwaystointeractbGetweenthevqariousopGeratingsystems,aswe'llsee.#$"1.7.1MbWhyuseLinux?N$"WhycuseLinuxinsteadofawell-known,Vwell-tested,andcwell-doGcumentedcommercialopGerating$"system?W*ecouldgiveyouathousandreasons.OneofthemostimpGortant, phowever,isthat$"Linux isanexcellentchoiceforpGersonalUNIXcomputing.Ifyou'reaUNIXsoftwaredevelopGer,$"why'useMS-DOSathome?|>LinuxwillallowyoutodevelopandtestUNIXsoftwareonyourPC,$"includingijdatabaseandXWindowsapplications.#$Ifyou'reastudent,chancesarethatyouruniversity$"computingsystemsrunUNIX.WithLinux,L5youcanrunyourownUNIXsystemandtailoritto$"yourownneeds.xInstallingandrunningLinuxisalsoanexcellentwaytolearnUNIXifyoudon't$"haveUUaccesstootherUNIXmachines.d(b{$"$"1.7.Di erencesTBet9weenLinuxandOtherOpQeratingSystemsk21KP덑3"But7let'snotlosesight.Linux7isn'tjustforpGersonalUNIX7[users.Itisrobustandcomplete $"enoughqltohandlelargetasks,xraswellasdistributedcomputingneeds. Manybusinesses|espGecially$"smallqones|aremovingtoLinuxinlieuofotherUNIX-basedworkstationenvironments.%Universities$"are ndingLinuxtobGeperfectforteachingcoursesinoperatingsystemsdesign.^FLargercommercial$"softwareUUvendorsarestartingtorealizetheoppGortunitiesthatafreeoperatingsystemcanprovide.ؼ3"ThefollowingsectionsshouldpGointoutthemostimpGortantdi erencesbGetweenLinuxandother$"opGeratingVsystems.uW*ehopethatyou'll ndthatLinuxcanmeetyourcomputingneeds,or(at$"least)@enhanceyourcurrentcomputingenvironment.HKeepinmindthattheybGestwaytogetataste$"forLLinuxisjusttotryitout|youneedn'teveninstallacompletesystemtogetafeelforit.In$"ChapterUU2,we'llshowyouhow.#$"1.7.2MbLinuxvs.MS-DOSN$"It's.GnotuncommontorunbGothLinuxandMS-DOS.=onthesamesystem.dManyLinuxusersrelyon$"MS-DOSfor;applicationssuchaswordproGcessing.HiWhileLinuxprovidesitsownanaloguesforthese$"applicationsB(forexample,FuTU>'ExX),therearevqariousreasonswhyaparticularuserwouldwanttorun$"MS-DOS")as"]wellasLinux.IfyourentiredissertationiswrittenusingW*ordPerfectforMS-DOS,$"youHmaynotbGeabletoeasilyconvertittoTU>'ExXorsomeotherformat.mTherearemanycommercial$"applicationsJlforMS-DOSJiwhicharen'tavqailableforLinux,Landthere'snoreasonwhyyoucan'tuse$"bGoth.3"AsMyoumightknow,MS-DOSLdoGesnotfullyutilizethefunctionalityofthe80386and80486$"proGcessors.Onخtheotherhand,9Linuxrunscompletelyintheprocessor'sprotectedmode,9and$"exploitsPallofthefeaturesoftheproGcessor.BY*oucandirectlyaccessallofyouravqailablememory$"(andzbGeyond, usingvirtualRAM).LinuxprovidesacompleteUNIXUinterfacenotavqailableunder$"MS-DOS|developingxandpGortingUNIXxapplicationsunderLinuxiseasilydone,whileunderMS-$"DOSHxyouH|arelimitedtoasmallsubsetoftheUNIXprogrammingfunctionality*.mBecauseLinuxisa$"trueUUUNIXsystem,youdonothavetheselimitations.3"W*ecoulddebatetheprosandconsofMS-DOSandLinuxforpagesonend./GHowever,letitsuce$"to saythatLinuxandMS-DOSarecompletelydi erententities.PMS-DOSisinexpGensive(compared$"toHowever,therealdi erencebGetween$"LinuxandTheOtherGuysisthefactthatLinuxisaversionofUNIX,andhencebGene tsfromthe$"contributionsUUoftheUNIXcommunityatlarge.3"What9makesUNIXsoimpGortant?=NotonlyisitthemostpGopularoperatingsystemformultiuser$"machines,;it5isalsothefoundationforthema8jorityofthefreesoftwareworld.g*Ifyouhaveaccessto$"theZInternet,[nearlyallofthefreesoftwareavqailablethereiswrittenspGeci callyforUNIXZsystems.$"(TheUUInternetitselfislargelyUNIX-based.)3"There/aremanyimplementationsofUNIX,frommanyvendors,fandnosingleorganizationis$"respGonsiblefordistribution.ۅThereisalargepushintheUNIXcommunityforstandardizationin$"theTformofopGensystems,Tbutnosinglecorporationcontrolsthisdesign.qHence,Tanyvendor(or,Tas$"itUUturnsout,anyhacker)mayimplementthesestandardsinanimplementationofUNIX.3"OS/2andWindowsNT,ontheotherhand,$areproprietarysystems.cTheinterfaceanddesign$"areXcontrolledbyasinglecorpGoration,Xandonlythatcorporationmayimplementthatdesign.:(Don't$"expGect@toseeafreeversionofOS/2anytimeinthenearfuture.)Inonesense,x@thiskindoforganization$"is bGene cial:M_itsetsastrictstandardfortheprogramminganduserinterfaceunlikethatfoundeven$"inHtheopGensystemscommunity*.m\OS/2HisOS/2whereveryougo|thesameholdsforWindowsNT.3"However,uthe UNIXinterfaceisconstantlydevelopingandchanging.Severalorganizationsare$"attemptingO8tostandardizetheprogrammingmoGdel,butthetaskisverydicult.iLinux,inparticular,$"is mostlycompliantwiththePOSIX.1standardfortheUNIX programminginterface.XAstimegoGes$"on,~itisexpGectedthatthesystemwilladheretoothersuchstandards,butstandardizationisnot$"theUUprimaryissueintheLinuxdevelopmentcommunity*.#$"1.7.4MbOtherimplementationsofUNIXN$"ThereJJareseveralotherimplementationsofUNIXJGforthe80386and80486.nThe80386architecture$"lendsUUitselftotheUNIXdesign,andanumbGerUUofvendorshavetakenadvqantageofthis.3"F*eature-wise,otherimplementationsofUNIXforthePCarequitesimilartoLinux.PY*ouwill$"seezthatalmostallcommercialversionsofUNIXz|suppGortroughlythesamesoftware,programming$"environment,and/networkingfeatures.UHowever,therearesomestrongdi erencesbGetweenLinux$"andUUcommercialversionsofUNIX.3"FirstsPofall,zLinuxsuppGortsadi erentrangeofhardwarefromcommercialimplementations.˷In$"general,Linux]suppGortsthemostwell-knownhardwaredevices,butsuppGortisstilllimitedtothat$"hardware whichdevelopGersactuallyhaveaccessto.{However,;commercialUNIXvendorsgenerally$"haveawidersuppGortbase,Landtendtosupportmorehardware,LalthoughLinuxisnotfarbGehind.x(b{$"$"1.7.Di erencesTBet9weenLinuxandOtherOpQeratingSystemsk23KP덑$"W*e'llUUcoverthehardwarerequirementsforLinuxinSection1.8.ؼ3"Secondly*,k{commercial3implementationsofUNIX3usuallycomebundledwithacompletesetof $"doGcumentation$+aswellasusersuppGortfromthevendor.adIncontrast,.mostofthedoGcumentationfor$"LinuxislimitedtodoGcumentsavqailableontheInternet|andbGookssuchasthisone._InSection1.9$"we'llUUlistsourcesofLinuxdoGcumentationandotherinformation.3"Asfarasstabilityandrobustnessareconcerned, manyusershaverepGortedthatLinuxisatleast$"as Atthetimeofthiswriting, $"HURDUUisstillinearlystagesofdevelopment.ؼ3"Other< inexpGensiveversionsofUNIX;existaswell,usuchasCoherent(avqailableforabGout$99)$"andMinix(anacademicbutusefulUNIXcloneupGonwhichearlydevelopmentofLinuxwasbased).$"SomeFoftheseimplementationsareofmostlyacademicinterest,whileothersarefull- edgedsystems$"forUUrealproGductivity*.qNeedlesstosay*,however,manypGersonalUNIXusersaremovingtoLinux.($"1.8IHardw=areRequirements׍$"Now ,youmustbGeconvincedofhowwonderfulLinuxis,andallofthegreatthingsthatitcandofor$"you.(However,bGeforeWyourushoutandinstallthesoftware,youneedtobGeawareofthehardware$"requirementsUUandlimitationsthatLinuxhas.3"KeepinmindthatLinuxwasdevelopGedbyitsusers.Thismeans,forthemostpart,thatthe$"hardwarewhichissuppGortedbyLinuxisonlythehardwarewhichtheusersanddevelopGersactually$"havewhichwouldviolatetheGPL).Thecompaniesthatmaintainproprietary$"interfaceswritetheirowndriversforopGeratingsystemssuchasMS-DOSandMicrosoftWindows;$"the:enduser(that'syou)neverneedstoknowabGouttheinterface.!Unfortunately*,sthisdoGesnot$"allowUULinuxdevelopGerstowritedriversforthosedevices.3"ThereoisverylittlethatcanbGedoneaboutthesituation.Insomecases,oprogrammershave$"attempted/ towritehackishdriversbasedonassumptionsabGouttheinterface.eInothercases,6devel-$"opGersxwillworkwiththecompanyinquestionandattempttoobtaininformationabGoutthedevice$"interface,UUwithvqaryingdegreesofsuccess.3"In!Xthefollowingsections,+we'llattempttosummarizethehardwarerequirementsforLinux.`sThe$"Linux$Har}'dwaregHHOWTO}(seeSection1.9)containsamorecompletelistingofhardwaresuppGorted$"byUULinux.3"Disclaimer:aogoGoddealofhardwaresupportforLinuxiscurrentlyinthedevelopmentstage.$"Someb.distributionsmayormaynotsuppGorttheseexperimentalfeatures.QThissectionprimarily$"listsV1hardwarewhichhasbGeensupportedforsometimeandisknowntobestable.tZWhenindoubt,$"consultrthedoGcumentationforthedistributionofLinuxyouareusing(seeSection2.1formore$"informationUUonLinuxdistributions).(b{$"$"1.8.Hardw9areTRequirements+25KP덍$"1.8.1MbMotherb`oardandCPUrequirementsN$"Linux vcurrentlysuppGortssystemswithanIntel80386,6~80486,orPentiumCPU.Thisincludesall $"vqariations~onthisCPU~typGe,such~asthe386SX,486SX,486DX,and486DX2.Non-Intel\clones",$"suchUUasAMDandCyrixproGcessors,workwithLinuxaswell.ؼ3"If6youhavea80386or80486SX,youmayalsowishtouseamathcoproGcessor,Poalthoughone$"isn'tErequired(theLinuxkernelcandoFPUEemulationifyoudonothaveamathcoproGcessor).lAll$"standardUUFPUcouplingsaresuppGorted,suchasIIT,CyrixF*asMath,andIntelcoprocessors.3"ThesystemmotherbGoardmustuseISAorEISAbusarchitecture.Thesetermsde nehowthe$"systemJinterfaceswithpGeripheralsandothercomponentsonthemainbus.PMostsystemssoldtoday$"areKeitherISAKorEISAbus.nIBM'sMicroChannel(MCA)bus,MfoundonmachinessuchastheIBM$"PS/2,UUisnotcurrentlysuppGorted.3"SystemsUwhichusealoGcalbusarchitecture(forfastervideoanddiskaccess)aresuppGortedas$"well.dItJissuggestedthatyouhaveastandardloGcalbusarchitecturesuchastheVESA5LoGcalBus$"(\VLB").#$"1.8.2MbMemoryrequirementsN$"Linux˄requiresverylittlememorytoruncomparedtootheradvqancedopGeratingsystems.SY*ou$"shouldThaveattheveryleast2megabytesofRAM;however,Titisstronglysuggestedthatyouhave$"4UUmegabytes.qThemorememoryyouhave,thefasterthesystemwillrun.3"LinuxRcansuppGortthefull32-bitaddressrangeofthe386/486;Sinotherwords,Ritwillutilizeall$"ofUUyourRAMautomatically*.3"Linuxwillrunhappilywithonly4megabytesofRAM,includingallofthebGellsandwhistles$"suchasXWindows,ۢEmacs,andsoon.However,ۢhavingmorememoryisalmostasimpGortantas$"havingafasterproGcessor.\8megabytesismorethanenoughforpGersonaluse;+16megabytesormore$"mayUUbGeneededifyouareexpGectingaheavyuserloadonthesystem.3"MostpLinuxusersalloGcateaportionoftheirharddriveasswapspace,6whichisusedasvirtual$"RAM.EvenifyouhaveagreatdealofphysicalRAMinyourmachine, youmaywishtouseswap$"space.DfWhile0swapspaceisnoreplacementforactualphysicalRAM,itcanallowyoursystemtorun$"largerapplicationsbyswappingoutinactivepGortionsofcodetodisk./Theamountofswapspace$"thatyoushouldalloGcatedependsonseveralfactors;Mwe'llcomebacktothisquestioninSection2.2.3.#$"1.8.3MbHarddrivecontrollerrequirementsN$"Y*ou5qdonotneedtohave5qaharddrivetorunLinux;@youcanrunaminimalsystemcompletelyfrom$" oppy*.T#However,Qthisisslowandverylimited,Qandmanyusershaveaccesstoharddrivestorage$"anyway*.You[musthaveanA*T-standard(16-bit)controller.ThereissuppGortinthekernelforXT-$"standardr(8bit)controllers; however,mostrcontrollersusedtoGdayareA*T-standard.Linuxshould$"suppGortallMFM,RLL,andIDEcontrollers.kMost,zbutnotall,ESDIcontrollersaresuppGorted|$"onlyUUthosewhichdoST506hardwareemulation.֩(b{$"$"1.8.Hardw9areTRequirements+26KP덑3"TheĻgeneralrulefornon-SCSIėharddriveand oppycontrollersisthatifyoucanaccessthedrive $"fromUUMS-DOSoranotheropGeratingsystem,youshouldbeabletoaccessitfromLinux.ؼ3"LinuxalsosuppGortsanumbGerofpopularSCSIdrivecontrollers, althoughsuppGortforSCSIis$"moreUlimitedbGecauseofthewiderangeofcontrollerinterfacestandards.@rSuppGortedSCSI0controllers$"includeWtheAdaptecAHA1542B,AHA1542C,AHA1742AWE(BIOSversionW1.34),IAHA1522,AHA1740,$"AHA1740(SCSI-2controller,BIOS1.34inEnhancedmoGde);ӫF*utureDomain1680,TMC-850,TMC-$"950;/SeagatesST-02;UltraStorSCSI;W*esternDigitalWD7000FASST.Cloneswhicharebasedon$"theseUUcardsshouldworkaswell.#$"1.8.4MbHarddrivespacerequirementsN$"Ofcourse, toinstallLinux,you'llneedtohavesomeamountoffreespaceonyourharddrive.RLinux$"willsuppGortmultipleharddrivesinthesamemachine;5youcanalloGcatespaceforLinuxacross$"multipleUUdrivesifnecessary*.3"TheamountofharddrivespacethatyouwillrequiredepGendsgreatlyonyourneedsandthe$"amountofsoftwarethatyou'reinstalling.ULinuxisrelativelysmallasUNIXimplementationsgo;$"you]couldrunacompletesystemin10to20megabytesofspaceonyourdrive.However,Aifyou$"wanttohaveroGomforexpansion,andforlargerpackqagessuchasXWindows,youwillneedmore$"space. Ifyouplantoallowmultipleuserstousethemachine,youwillneedtoalloGcatestoragefor$"theirUU les.3"Also,+unlessfyouhavealargeamountofphysicalRAMO(16megabytesormore),+youwillmore$"thanlikelywanttoalloGcateswapspace,tobGeusedasvirtualRAM.W*ewilldiscussallofthedetails$"ofUUinstallingandusingswapspaceinSection2.2.3.3"Each=distributionofLinuxusuallycomeswithsomeliteraturethatshouldhelpyoutogauge$"the2preciseamountofrequiredstoragedepGendingontheamountofsoftwareyouplantoinstall.$"Y*ou2ncanrunaminimalsystemwithlessthan20megabytes;>acompletesystemwithallofthebGells$"anduwhistlesin80megabytesorless;andaverylargesystemwithroGomformanyusersandspace$"forfutureexpansionintherangeof100-150megabytes.hAgain,these guresaremeantonlyasa$"ballparkapproximation;*youwillhavetoloGokatyourownneedsandgoalsinordertodetermine$"yourUUspGeci cstoragerequirements.#$"1.8.5MbMonitorandvideoadapatorrequirementsN$"Linux){suppGortsallstandardHercules,2ACGA,EGA,VGA,IBM)pmonoGchrome,2AandSupGerVGA)pvideo$"cardsandmonitorsforthedefaulttext-basedinterface.qIngeneral,ifthevideocardandmonitor$"couplingworksunderanotheropGeratingsystemsuchasMS-DOS,itshouldwork newithLinux.$"OriginalUUIBMCGAcardssu erfrom\snow"underLinux,whichisnotpleasanttouse.3"GraphicallenvironmentssuchastheXWindowSystemhavevideohardwarerequirementsof$"their6Uown.grInsteadoflistingtheserequirementshere,ThesemanualsareanaloguestothedoGcumentationsets$"avqailablenwithcommercialversionsofUNIX:theycovereverythingfrominstallingLinux,5tousing$"andUUrunningthesystem,programming,networking,UUkerneldevelopment,andmore.ؼ3"TheLinuxDoGcumentationPro8jectmanualsareavqailableviaanonymousFTPfromtheInternet,$"asdwellasviamailorderfromseveralsources.KAppGendixAliststhemanualswhichareavqailableand$"coversUUmeansofobtainingthemindetail.3"There~arenotmanybGooks~speci callyaboutLinuxcurrentlyavqailable.*.However,~therearealarge$"numbGeryofbooksaboutUNIXNingeneralwhicharecertainlyapplicabletoLinux|asfarasusingand$"programming_&thesystemisconcerned,aLinuxdoGesnotdi ergreatlyfromotherimplementationsof$"UNIX.Inshort,almosteverythingyouwanttoknowabGoutusingandprogrammingLinuxcanbGe$"foundPinsourcesmeantforageneralUNIX#audience.5qInfact,ąthisbGookPismeanttobGecomplemented$"by.thelargelibraryofUNIX.bGooks.currentlyavqailable;;here,6bwepresentthemostimpGortantLinux-$"spGeci cUUdetailsandhopethatyouwilllooktoothersourcesformorein-depthinformation.3"ArmedwithanumbGerofgoodbooksaboutusingUNIX,aswellasthebookyouholdinyour$"hands,IyoujshouldbGeabletotacklejustabGoutanything.AppGendixAincludesalistofhighly-$"recommendedUUUNIXbGooks,UUbothforUNIXnewcomersandUNIXwizardsalike.3"There+isalsoamonthlymagazineabGoutLinux,gcalledtheLinux-Journal.LItisdistributedworld-$"wide,euandb;isanexcellentwaytokeepintouchwiththemanygoings-onintheLinuxcommunity|$"espGecially4ifyoudonothaveaccesstoUSENET4 news(seebGelow).fSeeAppGendixAforinformation$"onUUsubscribingtotheLinuxJournal.#$"1.9.4MbUSENETnewsgroupsN$"USENETb+isb.aworldwideelectronicnewsanddiscussionforumwithaheavycontingentofso-called$"\newsgroups"|discussion areasdevotedtoaparticulartopic.MuchofthedevelopmentofLinux$"has8bGeendoneover8thewaves8oftheInternetandUSENET,andnotsuprisinglythereareanumbGer$"ofUUUSENETnewsgroupsavqailablefordiscussionsabGoutLinux.3"TheZoriginalLinuxnewsgroupwasalt.os.linux,eandwascreatedtomovesomeofthedis-$"cussionsabGoutLinuxoutofcomp.os.minixandthevqariousmailinglists.Soon,thetracon$"alt.os.linuxThese$"doGcumentsDwerelabGoriouslywrittenforpeoplelikeyou|pGeoplewhoneedhelpwiththeLinuxsystem.$"EvenM\bGookswrittenforUNIXMZingeneralareapplicabletoLinux,Nandyoushouldtakeadvqantageof$"them.;Morethanlikely*,pyouwill ndtheanswertoyourproblemssomewhereinthisdoGcumentation,$"asUUimpGossibleasitmayseem.3"IfyouhaveaccesstoUSENETnewsoranyoftheLinux-relatedmailinglists,+bGesuretoactually$"r}'eadNtheFbyrunningLinuxinthe rstplace!RemembGerthatLinuxisallabGouthackingand$" xingproblemsyourself.;ItisnotacommercialopGeratingsystem,nordoesittrytolooklikeone.$"Hackingwon'tkillyou.|Infact,JitwillteachyouagreatdealabGoutthesystemtoinvestigate$"andSsolveproblemsyourself|maybGeevenenoughtoonedaycallyourselfaLinuxguru.Learnto$"appreciatefthevqalueofhackingthesystem,andhowto xproblemsyourself.+Y*oucan'texpGectto$"runUUacomplete,homebrewLinuxsystemwithoutsomedegreeofhandiwork.3"R}'emainVcalm.[Itisvitaltorefrainfromgettingfrustratedwiththesystem, 'atallcosts.Nothing$"ismearnedbytakinganaxe|orworse,3apGowerfulelectromagnet|toyourLinuxsystemina tof$"anger.UTheauthorshavefoundthatalargepunchingbagorsimilarinanimateob8jectisawonderful$"waywtorelievetheoGccasionalstressattack.'AsLinuxmaturesanddistributionsbGecomemorereliable,$"weyhopGethatthisproblemwillgoaway*.#However,evencommercialUNIXyimplementationscanbGe$"trickyτattimes.E,Whenallelsefails,Gsitback,Gtakeafewdeepbreaths,Gandgoaftertheproblemagain$"whenUUyoufeelrelaxed.qY*ourmindandconsciencewillbGeclearer.3"R}'efrainsfrompostingspuriously.ManygRpGeoplemakethemistakeofpGostingormailingmessages$"pleading`forhelpprematurely*. Whenencounteringaproblem,donot|werepGeat,donot|rush$"immediatelytoyournearestterminalandpGostamessagetooneoftheLinuxUSENETnewsgroups.$"Often,cyou`willcatchyourownmistake veminuteslaterand ndyourselfinthecurioussituation$"ofdefendingyourownsanityinapublicforum.'sBeforepGostinganythinganyoftheLinuxmailing$"listsornewsgroups,j rstattempttoresolvetheproblemyourselfandbGeabsolutelycertainwhatthe$"problemUUis.qDoGesyoursystemnotrespondwhenswitchedon?qPerhapsthemachineisunplugged.3"Ifyoudop}'ostforhelp,makeitworthwhile.Ifkallelsefails,qyoumaywishtopGostamessagefor"G(b{$"$"1.10.GettingTHelpDf34KP덑$"helpinanyofthenumbGerofelectronicforumsdedicatedtoLinux, suchasUSENETZnewsgroups $"and@mailinglists.jWhenpGosting,Dremember@thatthepGeoplereadingyourpGostarenottheretohelp$"you.SThe.networkisnotyourpGersonalconsultingservice.STherefore,$itisimportanttoremainas$"pGolite,UUterse,andinformativeaspossible.ؼ3"Howcanoneaccomplishthis?First,ܻyoushouldincludeasmuch(relevqant)informationabGout$"yourfsystemandyourproblemaspGossible.ZPostingthesimplerequest,0\IUcannotseemtogete-mail$"to]work"willprobablygetyounowhereunlessyouincludeinformationonyoursystem,whatsoftware$"youareusing,whatyouhaveattemptedtodosofarandwhattheresultswere.Whenincluding$"technicalinformation,eitisusuallyagoGodideatoincludegeneralinformationontheversion(s)of$"yourt5software(Linuxkernelversion,forexample),aswellasabriefsummaryofyourhardware$"con guration.However,don'tDoverdoit|includinginformationonthebrandandtypGeofmonitor$"thatUUyouhaveprobablyisirrelevqantifyou'retryingtocon gurenetworkingsoftware.3"Secondly*,AremembGerޯthatyouneedtomakesomeattempt|howeverfeeble|atsolvingyour$"problem bGeforeyougototheNet.Ifyouhaveneverattemptedtosetupelectronicmail,2wfor$"instance,and rstdecidetoaskfolksontheNethowtogoabGoutdoingit,youaremakingabig$"mistake.There=areanumbGerofdocumentsavqailable(seetheSection1.9)onhowtogetstarted$"withImanycommontasksunderLinux.mTheideaistogetasfaralongaspGossibleonyourownand$"thenaskUUforhelpifandwhenyougetstuck.3"AlsoNremembGerthatthepeoplereadingyourmessage,Lhoweverhelpful,LmayoGccasionallyget$"frustrated`byseeingthesameproblemoverandoveragain. BesuretoactuallyreadtheLinux$"newsgroupsVandmailinglistsbGeforepostingyourproblems. iManytimes,gVthesolutiontoyour$"problem hasbGeendiscussedrepeatedly*,:andallthat'srequiredto nditistobrowsethecurrent$"messages.3"Lastly*,3whenpGostingtoelectronicnewsgroupsandmailinglists,trytobGeaspoliteaspossible.$"ItHSismuchHSmoree ectiveandworthwhiletobGepolite,Jdirect,andHSinformative|morepeoplewillbe$"willingtohelpyouifyoumasterahumbletone..T*obGesure,the amewarisanartformacross$"many>formsofelectroniccommunication, butdon'tallowthattopreoGccupyyourandotherpGeople's$"time.;PSavethenetworkunduewearandtearbykeepingbandwidthaslowaspGossible,ҝandbypaying$"as muchattentiontoothersourcesofinformationwhichareavqailabletoyou.Thenetworkisan$"excellent_waytogethelpwithyourLinuxproblems|butitisimpGortanttoknowhowtousethe$"networkUUe e}'ctively.#Z(b{K$"KChapterF2;]ڍ$"IObtaining andInstallingLin4ux:ؼ$"Inthischapter,*we'lldescribGehowtoobtaintheLinuxsoftware,*intheformofoneofthevqarious $"pre-packqagedUUdistributions,andhowtoinstallthedistributionthatyouchoGose.ؼ3"AsAwehavementioned,thereisnosingle\ocial"distributionoftheLinuxsoftware;Wthere$"are, infact,manydistributions,eachofwhichservesaparticularpurpGoseandsetofgoals.HThese$"distributions6areavqailableviaanonymousFTP+fromtheInternet,.onBBS+systemsworldwide,.and$"viaUUmailondiskette,tapGe,andCD-ROM.3"Here,"wepresentageneraloverviewoftheinstallationproGcess.^zEachdistributionhasitsown$"spGeci c-=installationinstructions,c7butarmedwiththeconceptspresentedhereyoushouldbGeable$"tofeelyourwaythroughanyinstallation.AppGendixAlistssourcesofinformationforinstallation$"instructionsUUandotherhelp,ifyou'reatatotalloss.3"ThisUUbGookcontainsadditionalsectionsdetailingtheSlackwaredistributionofLinux.($"2.1IDistributionsofLin=ux׍$"Because9Linuxisfreesoftware,:1nosingleorganizationorentityisrespGonsibleforreleasingand$"distributingptthesoftware.%}Therefore,;anyoneptisfreetoputtogetheranddistributetheLinuxsoftware,$"aselongastherestrictionsintheGPLe[areobserved.Theupshotofthisisthattherearemany$"distributionsUUofLinux,avqailableviaanonymousFTPorviamailorder.3"Y*ou݈arenowfacedwiththetaskofdecidingupGonaparticulardistributionofLinuxwhich$"suits@yourneeds.4Notalldistributionsarealike.4ManyofthemcomewithjustabGoutallofthe$"softwareԆyou'dneedtorunacompletesystem|andthensome.ZOtherLinuxdistributionsare$"\small"xdistributionsintendedforuserswithoutcopiousamountsofdiskspace.GManydistributions$"contain.onlythecoreLinuxsoftware,5andyouareexpGectedtoinstalllargersoftwarepackqages,5such$"asUUtheXWindowSystem,yourself.q(InChapter4we'llshowyouhow.)3"Theu(LinuxDistributionŪHOWTOe(seeAppGendixA)containsalistofLinuxdistributionsavqailable$"viaَtheInternetaswellasmailorder.HAppGendixBalsolistscontactaddressesforanumbGerofLinux35$h(b{$"$"2.1.DistributionsTofLin9ux%N36KP덑$"mail-ordervendors.zIfyoupurchasedthisbGookinprintedtheform,.lthepublishershouldalsobGe $"ableUUtoprovideyouwithaLinuxdistributionortellyouwhocan.ؼ3"HowhLcanyoudecideamongallofthesedistributions?IfyouhaveaccesstoUSENEThnews,$"orRanothercomputerconferencingsystem,youmightwanttoaskthereforpGersonalopinionsfrom$"pGeople,whohave,installedLinux. KEven,better,!ifyouknowsomeonewhohasinstalledLinux,!ask$"themforhelpandadvice.6JTherearemanyfactorstoconsiderwhenchoGosingadistribution,Əhowever,$"everyone'sneedsandopinionsaredi erent.YInactuality*, XmostofthepGopularLinuxdistributions$"contain*roughlythesamesetofsoftware,3sothedistributionthatyouselectismoreorlessarbitrary*.3"This bGookcontainsinformationoninstallingthepopularSlackwareandSlackwareProdistribu-$"tionsUUofLinux."Ǎ$"2.1.1MbGettingLinuxfromtheInternetN$"IfxyouhaveaccesstotheInternet,theeasiestwaytoobtainLinuxisviaanonymousFTP*.^1$"AppGendixClistsanumberofFTPJarchivesiteswhichcarryLinuxsoftware. IOneoftheseis$"sunsite.unc.edu,UUandthevqariousLinuxdistributionscanbGefoundinthedirectory|="/pub/Linux/distributions{$"there.3"ManymdistributionsarereleasedviaanonymousFTPasasetofdiskimages. RThatis,]sthe$"distribution consistsofasetof les,andeach lecontainsthebinaryimageofa oppy*.Inorder$"to9copythecontentsoftheimage leontothe oppy*,?youcanusetheRAWRITE.EXE9programunder$"MS-DOS. Thisprogramcopies,+-bloGck-for-block,+-the contentsofa letoa oppy*,+-withoutregardfor$"diskUUformat.^23"RAWRITE.EXE[is[avqailableonthevariousLinuxFTP[sites,includingsunsite.unc.eduinthe$"directory|="/pub/Linux/system/Install/rawwrite{3"Therefore, fin*manycases,yousimplydownloadthesetofdisketteimages, fanduseRAWRITE.EXE$"withIeachimageinturntocreateasetofdiskettes.$Y*oubGootIfromtheso-called\bGootIdiskette"$"andB\you'rereadytoroll.ktThesoftwareisusuallyinstalleddirectlyfromthe oppies,F'althoughsome$"distributionsmallowyoutoinstallfromanMS-DOSXpartitiononyourharddrive.VSomedistributions$"allowSyoutoinstalloveraTCP/IPSnetwork.ThedoGcumentationforeachdistributionshoulddescribGe$"theseUUinstallationmethoGdsiftheyareavqailable.3"Other^LinuxdistributionsareinstalledfromasetofMS-DOS^:format oppies.DF*orexample,$"theSlackwaredistributionofLinuxrequiresonlythebGootandrootdiskettestobecreatedusing$"1ffr J= "5-:1LܸIftyÎoudonothavedirectInternetaccess, youcanobtainLinuxviatheLftpmailservice, providedthatyouhave ztheXabilitÎytoexchangee-mailwiththeInternet. SeeApp*bGesuretousebinarymodeforall letransfers(with$"mostUUFTPclients,thecommand\binary"enablesthismoGde).3"SeeSection2.1.4, 0bGelow,forinformationonobtainingtheSlackwaredistributionfromtheInter-$"net.#$"2.1.2MbGettingLinuxfromotheronlinesourcesN$"If?youhaveaccesstoanothercomputernetworksuchasCompuServeorProGdigy*,ztheremaybGea$"means:todownloadtheLinuxsoftwarefromthesesources.hInaddition,@;manybulletinbGoard(BBS)$"systems<carryLinuxsoftware.%A;listofLinuxBBS;sitesisgiveninAppGendixD.%NotallLinux$"distributions areavqailablefromthesecomputernetworks,1however|manyofthem,1espGeciallythe$"vqariousUUCD-ROMdistributions,areonlyavqailableviamailorder.$"2.1.3MbGettingLinuxviamailorderN$"Ifxyoudon'thaveInternetorBBSxaccess,manyLinuxdistributionsareavqailableviamailorderon$"diskette,andthenew lesystemstandardlg(FSSTND).LlgThese[disksareknownto ton1.2M;disks,'althoughtherestofSlackwarewon't.HtIflgyou{ahaveonlya1.2M{W oppy*,youcanstillinstallthebasesystem,downloadotherlgdisksUUyouwantandinstallthemfromyourharddrive.J$"APlgV*arious8applicationsandaddons,>msuchasthemanualpages,>mgroff,ispell8(GNUlgandinternationalversions),term,joe,jove,ghostscript,sc,bc,andthequotalgpatches.$"DlgProgram2development. ,GCC/G++/Ob8jectiveC2Q2.5.8,)make(GNUandBSD),lgbyaccandGNUbison,flex,the4.5.26Clibraries,gdb,kernelsourcefor1.0.9,lgSVGAlib,UUncurses,clisp,f2c,p2c,m4,perl,rcs.$"ElgGNUUUEmacs19.25.$"FlgAUUcollectionofFAQsandotherdoGcumentation.$"IlgInfo.pagesforGNUsoftware.SDoGcumentation.forvqariousprogramsreadablebylginfoUUorEmacs.$"NlgNetworking.ETCP/IP*,UUCP,mailx,dip,deliver,elm,pine,smail,cnews,nn,lgtin,UUtrn.$"OOPlgOb8jectOrientedProgramming.(b{$"$"2.1.DistributionsTofLin9ux%N39KP덍$"XlgTheUUbaseXF*ree862.1.1system,withlibXpm,fvwm1.20,andxlockadded.J$"XAPlgX,applications: X11,ghostscript,blibgr13,seyon,workman,xfilemanager,xv lg3.01,UUGNUchessandxboard,xfm1.2,ghostview,andvqariousXgames.$"XDlgX11UUprogramdevelopment.qX11UUlibraries,serverlinkkit,PEXsuppGort.$"XVlgXviewb3.2release5.XViewlibraries,andtheOpGenLookvirtualandnon-virtuallgwindowUUmanagers.$"IVlgInterviewsUUlibraries,include les,andthedocandidrawapps.$"OIlgParcPlace'sOb8jectBuilder2.0andObjectInterfaceLibrary4.0,generouslymadelgavqailableforLinuxdevelopGersaccordingtothetermsinthe"copying"noticefoundlginzthesedirectories.Notethattheseonlyworkwithlibc-4.4.4,NbutanewversionlgmayUUbGereleasedoncegcc2.5.9isavqailable.$"TlgTheUUTU>'ExXandLffUJaTU>EXtextformattingsystems.N3"Y*ou/mustgetthe\A"/diskset;ٍ$"2.1.4.2P7GettingTSlac9kwarefromtheInternet$"TheS&SlackwarereleaseofLinuxmaybGefoundonanynumbGerofFTPsitesworldwide.q AppGendixC$"listsv^severaloftheLinuxFTPv%sites;wesuggestthatyoutryto ndthesoftwareontheFTPv%sitenear-$"estByou,$ytoreducenettrac.]lHowever,$ytwoofthema8jorLinuxFTP3archivesaresunsite.unc.edu$"andUUtsx-11.mit.edu.ؼ3"TheUUSlackwarereleasemaybGefoundatleastonthefollowingsites:03"="sunsite.unc.edu:/pub/Linux/distributions/slackwareL΍3"="tsx-11.mit.edu:/pub/linux/packages/slackware3"="ftp.cdrom.com:/pub/linux/slackware3"ftp.cdrom.comUUisSlackware'sUUhomesite. >ٍ$"2.1.4.2.1 Do9wnloadingthe les Y*oukshoulddownloadthefollowing lesusingFTP*.Besure $"toUUusebinarymoGdewhentransferring.qAppendixCcontainsacompletetutorialonusingFTP*.3"="The>PvqariousREADME> les,vaswellasSLACKWAREEff&fǫFAQ.Besuretoreadthese lesbGeforeattempting="toUUinstallthesoftware,UUtogetanyupGdatesorchangestothisdoGcument.L΍3"="AcbGootdiskvimage.S+Thisisa lethatyouwillwritetoa oppytocreatetheSlackwarebGoot="disk.ɭIfryouhavea1.44megabytebGootr oppy(3.5"),yloGokinthedirectorybootdsks.144.ɭIf="youUUhavea1.2megabytebGoot oppy(5.25"),lookinthedirectorybootdsks.12.q="Y*ouUUneedoneofthefollowingbGootdiskUU les.(a(b{$"$"2.1.DistributionsTofLin9ux%N40KP덍Hb{S"bare.gz.ThisisabGoot oppythathasonlyIDEeharddrivedrivers.(NoSCSI,CD- S"ROM,AornetworkingsuppGort.)UsethisifyouonlyhaveanIDEharddrivecontrollerS"andUUaren'tgoingtobGeinstallingoverUUthenetworkUUorfromCD-ROM.Hb{S"cdu31a.gz.qContainsUUIDE,SCSI,andtheSonyCDU31A/33Adriver.Hb{S"mitsumi.gz.qContainsUUIDE,SCSI,andtheMitsumiCD-ROMdriver.Hb{S"modern.gz.m&AnGsexpGerimentalbootdiskwithanewerkernel,J:andalldriversexceptthose S"forUUnetworkcardsandtheSony535CD-ROM.Hb{S"net.gz.qContainsUUIDEandnetworkdrivers.Hb{S"sbpcd.gz.qContainsUUIDE,SCSI,andSoundBlasterPro/PanasonicCD-ROMdrivers.Hb{S"scsi.gz.qContainsUUIDE,SCSI,andSCSICD-ROMdrivers.Hb{S"scsinet.gz.qContainsUUIDE,SCSI,SCSICD-ROM,andnetworkdrivers.Hb{S"sony535.gz.qContainsUUIDE,SCSI,andSony535/531CD-ROMdrivers.Hb{S"xt.gz.qContainsUUIDEandXTharddrivedrivers.="Y*ouneedonlyoneoftheabGovebootdiskimages, 'dependingonthehardwarethatyouhavein="yourUUsystem.="The+issuehereisthatsomehardwaredriverscon ictwitheachotherinstrangeways,a and="instead ofattemptingtodebughardwareproblemsonyoursystemit'seasiertouseabGoot=" oppyUUimagewithonlycertaindriversenabled.qMostusersshouldtryscsi.gzorbare.gz.3"="A[roGotdisk[image.KThisisa lethatyouwillwritetoa oppytocreatetheSlackwareinstal-="lation disk.YAswiththebGootdisk image,Zlookinrootdsks.144orrootdsks.12dependingon="theUUtypGeofboot oppydrivethatyouhave.="Y*ouUUneedoneofthefollowing les:Hb{S"color144.gz.The8menu-basedcolorinstallationdiskfor1.44megabytedrives.MostS"usersUUshouldusethisroGotdisk.Hb{S"umsds144.gz. Aއversionުofthecolor144diskforinstallingwiththeUMSDOS lesys-S"tem,which=allowsyoutoinstallLinuxontoadirectoryofanMS-DOS' lesystem.s~ThisS"installationmethoGdisnotdiscussedindetailhere,butitwillpreventyoufromhavingtoS"repartitionUUyourdrive.qMoreonthislater.Hb{S"tty144.gz.*The&vterminal-basedinstallationdiskfor1.44megabytedrives.*IfS"color144.gzUUdoGesn'tworkforyou,trytty144.gzinstead.Hb{S"colrlite.gz.qTheUUmenu-basedcolorinstallationdiskfor1.2megabytedrives.Hb{S"umsds12.gz.XA version ofthecolrlitediskforinstallingwiththeUMSDOS lesystem.S"SeeUUthedescriptionofumsds144.gz,abGove.Hb{S"tty12.gz.,Theterminal-basedinstallationdiskfor1.2megabytedrives.,UsethisroGotdiskS"ifUUyouhavea1.2megabytebGootUU oppyandcolrlite.gzdoGesn'tworkforyou.="Again,KyouI(needonlyoneoftheabGoveroGotdiskimages,Kdependingonthetypeofboot oppy="driveUUthatyouhave.)@(b{$"$"2.1.DistributionsTofLin9ux%N41KP덍3"="GZIP.EXE.4$ThisisanMS-DOS4executableofthegzipcompressionprogramusedtocompress ="thedbGootandrootdisk les(the.gzextensiononthe lenamesindicatesthis).?Thiscanbe="foundUUintheinstalldirectory*.3"="RAWRITE.EXE.ThisisanMS-DOSÙprogramthatwillwritethecontentsofa le(suchas="the bGootandrootdiskimages)directlytoa oppy*,Qvwithoutregardtoformat.Youwilluse="RAWRITE.EXEQtoocreatethebGootoandroGot oppies.J%Thiscanbefoundintheinstalldirectory="asUUwell.="Y*oudonlyneedRAWRITE.EXE0andGZIP.EXEifyouplantocreatethebGootdandroGot oppiesfrom="anMS-DOSsystem.IfyouhaveaccesstoaUNIXworkstationwitha oppydriveinstead,="youacancreatethe oppiesfromthere,usingtheddcommand.Seethemanpageforddand="askUUyourloGcalUNIXadministratorsforassistance.3"="Theh lesinthedirectoriesslakware/a1,dslakware/a2,andhslakware/a3.5These lesmakeup="the\A"disksetoftheSlackwaredistribution.Theyarerequired.Later,youwillcopythese=" lestoMS-DOS oppiesforinstallation(or,! youcaninstallfromyourharddrive).[Therefore,="when2youdownloadthese les,keeptheminseparatedirectories;!don'tmixthea1 leswith="theUUa2 les,andsoon.="Besurethatyougetthe leswithoutpGeriodsinthe lenamesaswell.PThatis,HwithinFTP*,="useUUthecommand\mget?*"insteadof\mget*.*".3"="The[# lesinthedirectoriesap1,\ap2,etc.,depGending[#onwhatdisksetsyouareinstalling.2F*or="example,K*ifyouareinstallingthe\X"diskseries,getthe lesinthedirectoriesx1through="x5.kAsBwiththe\A"Bdiskset,FQabGove,bGeBsuretokeepthe lesinseparatedirectorieswhenyou="downloadUUthem. 򍍑$"2.1.4.3P7GettingTSlac9kwareonCD-ROMN$"SlackwareisalsoavqailableonCD-ROM.MostSlackwareCD-ROMssimplycontainacopyofthe$" lesastheyappGearontheFTParchivesites,asdescribedabove.FTherefore,ifyouhaveaSlackware$"CD-ROM,UUyouhaveallofthe lesthatyouneed.ؼ3"Y*ous(willhaves(tocreateabGoots(androGot oppyfromthe lesontheCD-ROM.SeeSec-$"tionUU2.1.4.2.1,abGove,UUforadiscussionontheavqailablebootandrootdiskimages.3"First, rdecide9whichbGoot9androGotdiskimagesyouwilluse.ShTheyshouldallbGeontheCD-ROM.$"Below,UUwewilldescribGehowtocreatethese oppies. 򍍑$"2.1.4.4P7InstallationTmethoQdsN$"Slackware uprovidesseveraldi erentmeansofinstallingthesoftware.`'ThemostpGopularisinstalling$"fromcanMS-DOScpartitiononyourharddrive;janotheristoinstallfromasetofMS-DOSc oppies$"createdUUfromthedisksetsthatyoudownloaded.3"IfqyouhaveSlackwareonaCD-ROM,youcaninstallthe lesdirectlyfromthere.E&TheSlackware$"Proܸdistribution,fromMorseT*elecommunications,allowsܸyoutoinstallSlackwaresothatmany les*(b{$"$"2.1.DistributionsTofLin9uxlj42KP덑$"are?accesseddirectlyontheCD-ROM.Thiscansaveagreatdealofspaceonyourharddrive,Cwith $"theUUtradeo thatrunningcertainapplicationswillbGeslower. Thisisdiscussed="inUUSection2.2.4,bGelow.0[q2.="BoQottheLin9uxinstallationmedia.mWEachHdistributionofLinuxhassomekindofinstalla-="tionmedia|usuallya\bGoot oppy"|whichisusedtoinstallthesoftware.8BoGotingthismedia="willeitherpresentyouwithsomekindofinstallationprogram,Awhichwillstepyouthrough="theUULinuxinstallation,orallowyoutoinstallthesoftwarebyhand.0[q3.="CreateLin9uxpartitions.Z&AfterqrepartitioningtoalloGcatespaceforLinux,youqcreateLinux="partitions;onthatemptyspace.i>ThisisaccomplishedwiththeLinuxfdiskprogram,@covered="inUUSection2.3.3.0[q4.="CreateR lesystemsandsw9apspace.KAtthispGoint,tyouwillcreateoneormore lesystems,="usedtostore les,%onthenewly-createdpartitions.]Inaddition,ifyouplantouseswapspace,="you+willcreatetheswapspaceononeofyourLinuxpartitions.4ThisiscoveredinSections2.3.4="andUU2.3.5.0[q5.="Installthesoft9wareonthenew lesystems.pFinally*,jqyouf8willinstalltheLinuxsoftware="onWyournewly-created lesystems.yAfterthis,it'ssmoGothsailing|ifallgoeswell.yThisis="covered#inSection2.3.6.\Later,"inSection2.5,wedescribGewhattodoifanythinggoGeswrong.ؼ3"Many1cdistributionsofLinuxprovideaninstallationprogramwhichwillstepyouthroughthe$"installation?proGcess,andautomateoneormoreoftheabove?stepsforyou.FKeepinmindthroughout$"thiszchapterthatanynumbGeroftheabovezstepsmaybeautomatedforyou,dependingonthe$"distribution.ؼ3"ThePSlackwaredistributionofLinux,QcoveredinthisbGook,Qonlyrequiresyoutorepartitionyour$"drive,UUusingfdisk,andusethesetupprogramtoaccomplishtheothersteps.-㩠(b{$"$"2.2.PreparingTtoInstallLin9uxű45KP덑3"ImpQortan9tehint:_While!preparingtoinstallLinux,thebGestadvicethatwecangiveistotake $"notesduringtheentireproGcedure.{W*ritedowneverythingthatyoudo,everythingthatyoutypGe,$"andpeverythingthatyouseethatmightbGeoutoftheordinary*.H{Theideahereissimple:3if(orwhen!)$"youf4runintotrouble,kyouwanttobGeabletoretraceyourstepsand ndoutwhatwentwrong.$"InstallingbNLinuxisn'tdicult,ebuttherearemanydetailstoremembGer.Y*ouwanttohavearecord$"ofallofthesedetailssothatyoucanexpGerimentwithothermethoGdsifsomethinggoeswrong.IAlso,$"keepingYanotebGookYofyourLinuxinstallationexpGerienceisusefulwhenyouwanttoaskotherpGeople$"foryhelp,forexample,whenpGostingamessagetooneoftheLinux-relatedUSENETegroups.\4Y*our$"notebGookUUisalsosomethingthatyou'llwanttoshowtoyourgrandchildrensomeday*.^4#$"2.2.2MbRepartitioningconceptsN$"Ingeneral,Hvharddrivesaredividedintop}'artitions,Hvwhereasinglepartitionisdevotedtoasingle$"opGeratingsystem.tF*orexample,Pononeharddrive,youmayhaveseveralseparatepartitions|one$"devotedUUto,say*,MS-DOS,anothertoOS/2,andanothertoLinux.ؼ3"IfHyoualreadyhaveothersoftwareinstalledonyoursystem,K[youmayneedtoresizethoseparti-$"tionskinordertofreeupspaceforLinux. Y*ouwillthencreateoneormoreLinuxpartitionsonthe$"resulting`NfreespaceforstoringtheLinuxsoftwareandswapspace. W*ecallthisproGcessr}'epartitioning.3"Many!MS-DOS systemsutilizeasinglepartitioninhabitingtheentiredrive.|+T*oMS-DOS,this$"partition&isknownasC:.b=Ifyouhavemorethanonepartition,0 MS-DOS&namesthemD:,E:,andso$"on.qInUUaway*,UUeachpartitionactslikeaseparateharddrive.3"Onthe rstsectorofthediskisamasterbQootrecordalongwithapartitiontable.:ThebGoot$"record(asthenameimplies)isusedtobGootthesystem.VThepartitiontablecontainsinformation$"abGoutUUthelocationsandsizesofyourpartitions.3"Therearethreekindsofpartitions:ƺprimary,jmextended,andlogical. q4Ofthese,jmprimary$"partitionsӞareusedmostoften.However,0bGecauseӞofalimitinthesizeofthepartitiontable,you$"canUUonlyhaveUUfourprimarypartitionsonanygivendrive.3"TheDwayaroundthisfour-partitionlimitistouseanextendedpartition.lQAnextendedpartition$"doGesn'tholdanydatabyitself;Ginstead,Kitactsasa\container"forlogicalpartitions.V|Therefore,$"you]couldcreateoneextendedpartition,coveringtheentiredrive,andwithinitcreatemanylogical$"partitions.qHowever,UUyoumayhaveonlyoneextendedpartitionpGerdrive.#$"2.2.3MbLinuxpartitionrequirementsN$"Beforeijweexplainhowtorepartitionyourdrives,youneedtohaveanideaofhowmuchspaceyouwill$"bGeUUallocatingforLinux.qW*ewillbediscussinghowtocreatethesepartitionslater,inSection2.3.3.3"OnQUNIXsystems, lesarestoredona lesystem,whichisessentiallyasectionoftheharddrive$"(or`wothermedium,qsuchasCD-ROM`9ordiskette)formattedtohold les. (Each lesystemisassoGciated$"with86aspGeci cpartofthedirectorytree;Aforexample,> onmanysystems,thereisa lesystemforall$"X-ffr J= "5-:4LܸTheCauthorshamefullyadmitsthathekÎeptanoteb5whichisinmostcases$"easierUUtomanagethanseveral lesystemsandpartitions.3"However,&you maycreatemultiple lesystemsforLinuxifyouwish|forexample,&youmaywant$"toYuseseparate lesystemsfor/usrand/home.0ThosereaderswithUNIX3systemadministration$"expGerienceiwillknowhowtousemultiple lesystemscreatively*.InChapter4wediscusstheuseof$"multipleUUpartitionsand lesystems.3"Why]usemorethanone lesystem?Themostcommonlystatedreasonissafety;aif,O_forsome$"reason,:one ofyour lesystemsisdamaged,theotherswill(usually)bGeunharmed.Ontheother$"hand,ifUyoustoreallofyour lesontheroGot lesystem,andforsomereasonthe lesystemis$"damaged,SthenSyoumayloseallofyour lesinonefellswoGop.q8Thisis,Showever,ratherSuncommon;$"ifUUyoubackupthesystemregularlyyoushouldbGequitesafe.^53"Anothern_reasontousemultiple lesystemsistodivvyupstoragebGetweenmultipleharddrives.$"IfKyouhave,*say*,40Kmegabytesfreeononeharddrive,*and50megabytesfreeonanother,*youmight$"wanttocreatea40-megabyteroGot lesystemonthe rstdriveanda50-megabyte/usr lesystem$"onPtheother.pCurrentlyitisnotpGossibleforasingle lesystemtospanmultipledrives;Qifyourfree$"hard{drivestorageisfragmentedbGetweendrivesyouwillneedtousemultiple lesystemstoutilize$"itUUall.3"Inrsummary*,yLinuxrequiresatleastonepartition,fortheroGot lesystem.Ifyouwishtocreate$"multiple[ lesystems,youwillneedaseparatepartitionforeachadditional lesystem.Somedistri-$"butions SofLinuxautomaticallycreatepartitionsand lesystemsforyou,8soyoumaynotneedto$"worryUUabGouttheseissuesatall.3"Another[issuetoconsiderwhenplanningyourpartitionsisswapspace.Ifyouwishtouseswap$"space{withLinux,you{havetwooptions.WThe rstistouseaswap le;whichexistsononeofyour$"Linuxɷ lesystems.C=Y*ouwillcreatetheswap leforuseasvirtualRAMɓafteryouinstallthesoftware.$"The/secondoptionistocreateaswap\p}'artition,fRanindividualpartitiontobGeusedonlyasswap$"space.qMostUUpGeopleuseaswappartitioninsteadofaswap le.3"A)singleSswap leorpartitionmaybGeupto16megabytesinsize.:qIfyouwishtousemorethan16$"megabyteswofswap,youcancreatemultipleswappartitionsor les|uptoeightinall.JF*orexample,$"ifUUyouneed32megabytesofswap,youcancreatetwo16-megabyteswappartitions.3"SettingUUupaswappartitioniscoveredinSection2.3.4,andsettingupaswap leinChapter4.3"Therefore,UinĈgeneral,youwillcreateatleasttwopartitionsforLinux:P.oneforuseastheroGot$" lesystem,)SandStheotherforuseasswapspace._qThereare,ofcourse,manyvqariationsontheabGove,$"butthisistheminimalsetup.Y*ouarenotrequiredtouseswapspacewithLinux,butifyouhave$"X-ffr .S "5-:5LܸThedauthorusesasingle200-megabÎyte lesystemforallofhisLinux les,andhasn'thadanyproblems(sofar)./p(b{$"$"2.2.PreparingTtoInstallLin9uxű47KP덑$"lessUUthan16megabytesofphysicalRAMitisstronglysuggestedthatyoudo.ؼ3"OfGcourse,1023-cylinderrangeforyourLinuxroGot lesystem.$"Linuxocanstilluse0partitionswithcylindersnumbGeredover1023,vThowever,youomaynotbGeableto$"b}'oothLinuxfromsuchapartition.jxThisadvicemayseempremature,'butitisimpGortanttoknow$"whileUUplanningyourdrivelayout.3"IfyouabsolutelymustuseapartitionwithcylindersnumbGeredover1023foryourLinuxroGot$" lesystem,*youcanalwaysbGootLinuxfrom oppy*._Thisisnotsobad,*actually|itonlytakesafew$"secondsUUlongertobGootUUthanfromtheharddrive.qAtUUanyrate,it'salwaysanoption.#$"2.2.4MbRepartitioningyourdrivesN$"Insthissection,we'lldescribGehowtoresizeyourcurrentpartitions(ifany)tomakespaceforLinux.&If$"youareinstallingLinuxona\clean"harddrive,,youcanskipthissectionandproGceedtoSection2.3,$"bGelow.3"Theusualwaytoresizeanexistingpartitionistodeleteit(thusdestroyingallofthedataon$"thatpartition)andrecreateit.L\Beforerepartitioningyourdrives,b}'ackup,yoursystem.L\Afterresizing$"theVRpartitions,Vyoucanreinstallyouroriginalsoftwarefromthebackup.tHowever,Vthereareseveral$"programsavqailableforMS-DOSwhichareabletoresizepartitionsnondestructively*.BOneofthese$"isUUknownas\FIPS",andcanbGefoundonmanyLinuxFTPsites.3"Also,keepinmindthatbGecauseyou'llbGeshrinkingyouroriginalpartitions,youmaynothave$"spacetoreinstalleverything.8Inthiscase,youneedtodeleteenoughunwantedsoftwaretoallow$"theUUrestto tonthesmallerpartitions.3"The3programusedtorepartitionisknownasfdisk.i`EachopGeratingsystemhasitsownana-$"logue~ofthisprogram;5forexample,underMS-DOS,itisinvoked~withtheFDISKXcommand.1CY*ou$"should consultyourdoGcumentationforwhateveropGeratingsystemsyouarecurrentlyrunningfor$"information onrepartitioning.XHere,we'lldiscusshowtoresizepartitionsforMS-DOS usingFDISK,0(b{$"$"2.2.PreparingTtoInstallLin9uxű48KP덑$"butUUthisinformationshouldbGeeasilyextrapolatedtootheroperatingsystems.ؼ3"Ple}'ase consultLPthedoGcumentationforyourcurrentopGeratingsystemsbeforerepartitioningyour $"drive.pWThisQsectionismeanttobGeageneraloverviewoftheproGcess;Rutherearemanysubtletiesthat$"wemdonotcoverhere.Y*oucanloseallofthesoftwareonyoursystemifyoudonotrepartitionthe$"driveUUcorrectly*.3"Awarning:,DonotmoGdifyorcreatepartitionsforanyotheropGeratingsystems(includingLinux)$"usingՁFDISK`underMS-DOS.Y*oushouldonlymoGdifypartitionsforaparticularoperatingsystem$"withtheversionoffdiskincludedwiththatopGeratingsystem;Zforexample,youwillcreateLinux$"partitions)?usingaversionoffdiskforLinux.Later,^9inSection2.3.3,wedescribGehowtocreate$"LinuxUUpartitions,butfornowweareconcernedwithresizingyourcurrentones.3"Let'ssaythatyouhaveasingleharddriveonyoursystem,currentlydevotedentirelytoMS-$"DOS.ZHence,[yourdriveconsistsofasingleMS-DOSZpartition,[commonlyknownas\C:".Because$"thiswrepartitioningmethoGdwilldestroythedataonthatpartition,-youneedtocreateabGootable$"MS-DOSY\systemYdisk"whichcontainseverythingnecessarytorunFDISKYandrestorethesoftware$"fromUUbackupaftertherepartitioningiscomplete.3"Inmanycases,youcanusetheMS-DOSinstallationdisksforthispurpGose.FVHowever,ifyouneed$"toUUcreateyourownsystemdisk,formata oppywiththecommand ፑ="FORMAT/sA: ⍑$"Copy7ontothis oppyallofthenecessaryMS-DOS7xutilities(usuallymostofthesoftwareinthe$"directoryS\DOS8onyourdrive),aswellastheprogramsFORMAT.COM8andFDISK.EXE.Y*oushouldnow$"bGeUUabletobootthis oppy*,andrunthecommand="FDISKC: ⍑$"toUUstartupFDISK.ؼ3"UseBdofFDISKB'shouldbGeself-explanatory*,}butconsulttheMS-DOSdoGcumentationfordetails.$"WhenyyoustartFDISK,usethemenuoptiontodisplaythepartitiontable,ºandwritedown> the$"information5displayedthere.TItisimpGortanttokeeparecordofyouroriginalsetupincaseyouwant$"toUUbackoutoftheLinuxinstallation.3"T*o|odeleteanexistingpartition,5choGosetheFDISK|emenuoption\Delete?anMS-DOSPartition$"or?LogicalDOSDrive".f#SpGecify2jthetypeofpartitionthatyouwishtodelete(primary*,9eextended,$"orUUlogical)andthenumbGerUUofthepartition.qV*erifyallofthewarnings.PoGof!3"T*ocreateanew(smaller)partitionforMS-DOS,justchoGosetheFDISKӃoption\Create?an$"MS-DOS?PartitionorLogicalDOSDrive".2SpGecifyyythetypeofpartition(primary*,extended,or$"logical), andthesizeofthepartitiontocreate(spGeci edinmegabytes).YsFDISKshouldcreatethe$"partitionUUandyou'rereadytoroll.3"Afterߥyou'redoneusingFDISK,youshouldexittheprogramandreformatanynewpartitions.$"F*or*example,3F*orexample,ifyourdrivehas683cylinders,16heads,andlg32UUsectorspGertrack,enterLgramdiskhd=683,16,32J$"tmc8xx=hmemaddri,hirqilgSpGecifyaddressandIRQtforBIOS-lessF*utureDomainTMC-8xxSCSIcontroller.lgF*orUUexample,gramdisktmc8xx=0xca000,5lgNote thatthe0xpre xmustbGeusedforallvqaluesgiveninhexadecimal.ThisislgtrueUUforallofthefollowingoptions.J$"st0x=hmemaddri,hirqilgSpGecifyUUaddressandIRQforBIOS-lessSeagateST02controller.$"t128=hmemaddri,hirqilgSpGecifyUUaddressandIRQforBIOS-lessT*rantorT128Bcontroller.lgncr5380=hpGorti,hirqi,hdmai@Specifyport,@IRQ,andDMAchannelforgenericlgNCR5380UUcontroller.3B(b{$"$"2.3.InstallingTtheLin9uxsoftware51KP덍$"aha152x=hpGorti,hirqi,hscsiffidi,1 lgSpGecifyoport,vIRQ,andSCSIoIDforBIOS-lessAIC-6260controllers.ThisincludeslgAdaptecUU1510,152x,andSoundblaster-SCSIcontrollers.N3"F*orUUeachofthese,youmustenterramdiskfollowedbytheparameterthatyouwishtouse.ؼ3"IfkyouhavequestionsabGouttheseboot-timeoptions,pleasereadtheLinuxSCSIHOWTO,which$"shouldbGeavqailableonanyLinuxFTP`archivesite(orfromwhereveryouobtainedthisbGook),Ias$"well astheLinuxCD-ROM%HOWTO. ThesedoGcumentsdescribGehardwarecompatibilityinmuch$"moreUUdetail.#$"2.3.2MbDrivesandpartitionsunderLinux$"Many֏distributionsrequireyoutocreateLinuxpartitionsbyhandusingthefdiskprogram.GOthers$"may>automaticallycreatepartitionsforyou.SEitherway*, Cyoushouldknowthefollowinginformation$"abGoutUULinuxpartitionsanddevicenames.ؼ3"Drives andpartitionsunderLinuxaregivendi erentnamesthantheircounterpartsunderother$"opGerating'systems.UnderMS-DOS, oppydrivesarereferredtoasA:andB:,\Jwhileharddrive$"partitionsUUarenamedC:,D:,andsoon.qUnderLinux,thenamingconventionisquitedi erent.3"Devicedriv9ers,@foundinthedirectory/dev,areusedtocommunicatewithdevicesonyour$"systemk(suchasharddrives,ΰmice,andksoon). F*orexample,ΰifyouhaveamouseonyoursystem,$"youyBaccessitthroughthedriver/dev/mouse.ݏFloppydrives,>harddrives,>andindividualpartitions$"are@allgivenindividualdevicedriversoftheirown.։Don'tworryabGoutthedevicedriverinterface$"fornow;!itisimpGortantonlytounderstandhowthevqariousdevicesarenamedinordertousethem.3"T*ableUU2.1liststhenamesofthesevqariousdevicedrivers.3"AwfewږnotesabGoutthistable.HNotethat/dev/fd0correspondstothe rst oppydrive(A:under$"MS-DOS)UUand/dev/fd1correspGondstothesecond oppy(B:).3"Also,^SCSI)hard)drivesarenameddi erentlythanotherdrives.IDE,MFM,andRLL)drives$"arelPaccessedthroughthedevices/dev/hda,r/dev/hdb,andlPsoon.Theindividualpartitionsonthe$"driveFg/dev/hdaare/dev/hda1,Ic/dev/hda2,andFgsoon.lHowever,IcSCSIFcdrivesarenamed/dev/sda,$"/dev/sdb,UUetc.,withpartitionnamessuchas/dev/sda1and/dev/sda2.3"Here's|anexample.Let'ssaythatyouhaveasingleIDE{harddrive,with3primarypartitions.$"The{ rsttwo{aresetasideforMS-DOS,andthethirdisanextendedpartitionwhichcontainstwo$"logicalUUpartitions,bGothforusebyLinux.qThedevicesreferringtothesepartitionswouldbGe:)-9"o cmr9FirstTMS-DOSpartition(C:)ߨ/dev/hda1 <9"SecondTMS-DOSpartition(D:)ߨ/dev/hda29"ExtendedTpartitionߨ/dev/hda39"FirstTLin9uxlogicalpartitionߨ/dev/hda59"SecondTLin9uxlogicalpartitionߨ/dev/hda6063"NoteHKthat/dev/hda4isskippGed;Litcorrespondstothefourthprimarypartition,Jwhichwedon't$"haveUUinthisexample.qLogicalpartitionsarenamedconsecutivelystartingwith/dev/hda5.4LΠ(b{$"$"2.3.InstallingTtheLin9uxsoftware52Kޔ占Z,<ps0ff (Device{Name)zff FirstT opp9y(A:){/dev/fd0 <SecondT opp9y(B:){/dev/fd1FirstTharddriv9e(entiredrive){/dev/hdaFirstTharddriv9e,primarypartition1{/dev/hda1FirstTharddriv9e,primarypartition2{/dev/hda2FirstTharddriv9e,primarypartition3{/dev/hda3FirstTharddriv9e,primarypartition4{/dev/hda4FirstTharddriv9e,logicalpartition1{/dev/hda5FirstTharddriv9e,logicalpartition2{/dev/hda6...SecondTharddriv9e(entiredrive){/dev/hdbSecondTharddriv9e,primarypartition1{/dev/hdb1...FirstTSCSIharddriv9e(entiredrive){/dev/sdaFirstTSCSIharddriv9e,primarypartition1{/dev/sda1...SecondTSCSIharddriv9e(entiredrive){/dev/sdbSecondTSCSIharddriv9e,primarypartition1{/dev/sdb1...xT*ableUU2.1:qLinuxpartitionnames$"2.3.3MbCreatingLinuxpartitionsN$"NowHyouarereadytocreateLinuxpartitionswiththefdiskcommand.AsdescribGedinSection2.2.3, $"inڛgeneralyouwillneedtocreateatleastonepartitionfortheLinuxsoftwareitself,andanother$"partitionUUforswapspace.ؼ3"AfterUUbGootingtheinstallationmedia,runfdiskbytypingؼ="fdiskhMdriv9ei$"where hdriveiistheLinuxdevicenameofthedriveyouplantoaddpartitionsto(seeT*able2.1). $"F*or5instance,nifyouwanttorunfdiskonthe rstSCSI5diskinyoursystem,nusethecommand$"fdisk?/dev/sda.q/dev/hdaUU(the rstIDEdrive)isthedefaultifyoudon'tspGecifyone.3"IfUUyouarecreatingLinuxpartitionsonmorethanonedrive,runfdiskonceforeachdrive.卑="#fdiskN=32M&8Q="Command(mforhelp):$"In)aswellasthetypGeofpartition.F*orexample,>)ifyouhavethelgSlackwareQ lesonanMS-DOSpartition,"enterthenameofthepartition(suchlgas/dev/hda1)andselectMS-DOS?FATWasthetypGe.cY*ouwillthenbeaskedwhatlgdirectoryythe lesmaybGefoundunderonthispartition.2F*orexample,ifyouhavelgtheDžSlackware lesstoredunderthedirectoryC:\SLACKaonyourMS-DOSapartition,lgenterLg/slacklgastheloGcation.YNotethatyoushoulduseforwardslashes,notbackslashes,inthe lgpathname.lgIf3youareinstallingfromCD-ROM,youwillbGeaskedthetypGeofCD-ROM3devicelgthat:youareusing,saswellaswhatdirectoryontheCD-ROM the lesmaybGefoundlgin.5ManyCD-ROMshavethe lescontainedwithinthedirectory/slakware,butlgthisUUdepGendsontherelease.lgIfyouareinstallingSlackwareProfessional,^9twodirectoriesareusedontheCD-lgROM.&slakwareisusedforthestandardsystemwhichwillinstallthe lesdirectlylgtoAyourharddrive.IslackproisusedfortheCD-ROM-basedsystemwheremanylg lesareaccesseddirectlyfromtheCD-ROM.Thiscansavediskspace,[butaccessinglgmanyQ lesisalsonoticeablyslower.rSeveralotherSlackwarevendorsprovidethelgability%torunthesoftwarefromtheCD-ROMaswell.8However,FYifyouhavethelgdiskspacetospare,werecommendnotrunningSlackwarefromtheCD-ROMitself.lgPerformanceUUisgenerallyslower.lgIfUyouareattemptingaharddriveorCD-ROMinstall,U%SlackwaremayrepGortthatlgtherewisamounterroratthispGoint.gThisisusuallyanindicationthattherewasa$"X-ffr .S "5-:9LܸSlacÎkwareXProfessionalisavÎersionofSlackwareavailablefromMorseTJelecommunications.<e(b{$"$"2.3.InstallingTtheLin9uxsoftware60KP덑lgproblemH accessingtheharddriveorCD-ROM.SeeSection2.5.3formoreinforma- lgtionUUifyouseesuchanerrormessage.J$"Disk?setslgThisˉmenuoptionallowsyoutoselectthedisksetsthatyouwishtoinstall.cY*oulgmustTinstallatleasttheATdiskset.p SimplyusethearrowkeysandspacebartolgselectUUwhichdisksetsyouwishtoinstall.LlgNoteĊthatselectingaparticulardisksetdoGesnotmeanthatallpackqagesonthedisklgsetwillbGeinstalled;youwillbepromptedbeforeinstallingpackqagesonthedisksetlgmarkedUUas\optional"or\recommended."$"InstalllgAtlonglast,thismenuitemwillinstallthesoftwareonyoursystem.bjY*ouwillbGelgpromptedsforthepromptingmethoGd;mostusersshouldselect\normal."F*oreachlgdisksetthatyouselected,the\required"packqageswillbGeinstalled,andyouwilllgbGe promptedwheninstallingthe\optional"and\recommended"packqages.9IfyoulgareUUinstallingfrom oppyyouwillbGeaskedtoinserteach oppyinsuccession.LlgAs}eachpackqageisinstalledashortdescriptionwillbGeprinted.?UnlessyouhavelgbackgroundinUNIXorLinux,ÿmanyofthesedescriptionswillnotmeanmuchtolgyou.`T*akenoteofwhichpackqagesarebGeinginstalled,1soyouknowwhat'sthere,lgbutUUdon'tworryabGouttryingtojotdowneverythingthat'sprintedonthedisplay*.lgThemostcommonerrorencounteredhereisthata lecannotbGefoundona oppy*,lgoranI/Oerrorwhenattemptingtoreadthe oppy*.Theformerisanindicationlgthat}Wthe lesonyour oppymightbGecorruptedorincomplete;Xthelatterthatthelg oppyjitselfisbad.CAny oppieswhichgivetheseerrorsshouldbGereplaced,/andlgyou,shouldre-installthedisksetcontainingthose oppies.SeeSection2.5.3forlgsuggestions.lgY*ou mayalsohavereaderrorswhenattemptingtoaccessaCD-ROM;bGesurethatlgtheUUCD-ROMisclean,hasno ngerprints,etc.J$"ConfigurelgThis3menuitempGerformssomepost-installationcon gurationofyoursystem.PfThislgisUUcoveredinthefollowingsection.)􍍑$"2.3.7MbCreatingtheb`oot oppyorinstallingLILON$"EveryPdistributionprovidessomemeansofbGootingPyournewLinuxsystemafteryouhaveinstalled$"thesoftware.fYInmanycases,hand.oIfyou'refeelingexceptionallytrustworthy*,Nthough,youM>cangoaheadwiththeautomated$"LILOUUinstallationifitisprovidedwithyourdistribution.3"InUUChapter4,we'llcoverindetailhowtocon gureandinstallLILOforyourparticularsetup.3"If7everythinggoGeswell,=thencongratulations!gY*ouhavejustinstalledLinuxonyoursystem.gGo$"haveUUaDietCokeorsomething|youdeserveit.3"Inncaseyoudidrunintoanytrouble,thenextsectionwilldescribGethemostcommonsticking$"pGointsUUforLinuxinstallations,andhowtogetaroundthem.#$"2.3.8MbAdditionalinstallationpro`ceduresN$"SomedistributionsofLinuxprovideanumbGerofadditionalinstallationprocedures,Mallowingyou$"toncon gurevqarioussoftwarenpackagesnsuchasTCP/IPnnetworking,udtheXWindowSystem,udandso$"on.Ifyouareprovidedwiththesecon gurationoptionsduringinstallation,youmaywishtoread$"aheadinthisbGookformoreinformationonhowtocon gurethissoftware.f(b{$"$"2.5.RunningTIn9toT roubles62KP덑$"old:\V*ulcanNervePinch"|thatis,bypressingff?ԟ  ffctrl-alt-del> ffffff?ԎG8Hinunison.^10]Y*oushouldn'tsimply $"switchNo thepGower,either.]vAswithmostUNIXNOsystems,Linuxcachesdiskwritesinmemory*.$"Therefore,.if$yousuddenlyrebGoot$thesystemwithoutshuttingdown\cleanly",.youcancorruptthe$"dataUUonyourdrives,causinguntolddamage.ؼ3"Theeasiestwaytoshutdownthesystemiswiththeshutdowncommand.3Asanexample,to$"shutdownUUandrebGootUUthesystemimmediately*,usethefollowingcommandasroot:ؼ="#shutdownN<{rnow$"ThisnwillcleanlyrebGootnyoursystem.D%ThemanpageforshutdowndescribGestheothercommand-line $"argumentsUUthatareavqailable.^113"Note,gqhowever,that0manyLinuxdistributionsdonotprovidetheshutdowncommandonthe$"installation media. Thismeansthatthe rsttimeyourebGoot yoursystemafterinstallation,6you$"maytneedtousetheff?ԟ  ffctrl-alt-del> ffffff?ԎGcombinationafterall.v$Thereafter,,{youshouldalwaysusethe$"shutdownUUcommand.3"Afteryouhaveachancetoexploreandusethesystem,)thereareseveralcon gurationchores$"that9youshouldundertake.MThe rstistocreateauseraccountforyourself(and,?optionally*,for9any$"otherusersthatmighthaveaccesstothesystem).6OCreatinguseraccountsisdescribGedinSection4.4.$"Usually*,allFthatyouhavetodoisloginasroot,andruntheadduser(sometimesuseradd)program.$"ThisUUwillleadyouthroughseveralpromptstocreateanewuseraccount.3"Ifyoucreatedmorethanone lesystemforLinux,orifyou'reusingaswappartition,youmay$"needtoeditthe le/etc/fstabinorderforthose lesystemstobGeavqailableautomaticallyafter$"rebGooting.(F*orexample,'ifyou'reusingaseparate lesystemfor/usr,andnoneofthe lesthat$"should'bGein/usrappeartobepresent,you'maysimplyneedtomountthat lesystem.)McSection4.8$"describGes*Gthisprocedure.NotethattheSlackware*GdistributionofLinuxautomaticallycon gures$"yourUU lesystemsandswapspaceatinstallationtime,sothisusuallyisn'tnecessary*.($"2.5IRunningIn=toTrouble׍$"Almost}everyonerunsintosomekindofsnagorhangupwhenattemptingtoinstallLinuxthe rst$"time.MostZqofthetime,[theproblemiscausedbyasimplemisunderstanding.Sometimes,[however,$"itUUcanbGesomethingmoreserious,suchasanoversightbyoneofthedevelopGers,orabug.3"ThiscsectionwilldescribGesomeofthemostcommoninstallationproblems,andhowtosolve$"them.IfbyourinstallationappGearstobesuccessful,hbutyoureceivedunexpGectederrormessages$"duringUUtheinstallation,thesearedescribGedhereaswell.$"X-ffr w-:10LܸOn&3mostLinÎuxsystems,:jhowever,ff?ԡ ffctrl-alt-del> ffffff?ԎEqwill&3causethesystemtoshutdowngracefullyJ,:jasifyouhad usedXtheLshutdowncommand. yw-:11LܸUseXthecommandLman@shutdowntoseethemanÎualpageforLshutdown.?ݦ(b{$"$"2.5.RunningTIn9toT roubles63KP덍$"2.5.1MbProblemswithb`ootingtheinstallationmediaN$"WhenZattemptingtobGootZtheinstallationmediaforthe rsttime,\youmayencounteranumbGerof $"problems.aThese$arelistedbGelow.NotethatthefollowingproblemsarenotWrelatedtobGooting$your$"newly-installedUULinuxsystem.qSeeSection2.5.4forinformationonthesekindsofpitfalls.ؼ3"="Flopp9yTormediaerrorwhenattemptingtobQoot.="ThemostpGopularcauseforthiskindofproblemisacorruptboot oppy*.uEitherthe oppy="isyphysicallydamaged,Binwhichcaseyoushouldre-createthediskwithabr}'andnew oppy*,="orkthedataonthe oppyisbad,.inwhichcaseyoushouldverifythatyoudownloadedand="transferred9thedatatothe oppycorrectly*.]Inmanycases,#simplyre-creatingthebGoot9 oppy="willUUsolveyourproblems.qRetraceyourstepsandtryagain.="IfyoureceivedyourbGoot oppyfromamailordervendororsomeotherdistributor,insteadof="downloadingEandcreatingityourself,HcontactthedistributorandaskforanewbGootE oppy|="butUUonlyafterverifyingthatthisisindeedtheproblem.3"="SystemT\hangs"duringbQootTorafterbQooting.="AftertheinstallationmediabGoots,cyouwillseeanumbGerofmessagesfromthekernelitself,="indicatingiwhichdevicesweredetectedandcon gured.#MAfterthis,youwillusuallybGepresented="withbaloginprompt,allowingyoutoproGceedwithinstallation(somedistributionsinsteaddrop="yourightintoaninstallationprogramofsomekind)./.ThesystemmayappGearto\hang"during="severalofthesesteps.zDuringallofthesesteps,.RbGepatient;Yloadingsoftwarefrom oppyis="veryslow.Inmanycases,thesystemhasnothungatall,butismerelytakingalongtime.="V*erifythatthereisnodriveorsystemactivityforatleastseveralminutesbGeforeassuming="thatUUthesystemishung.F[q1.S"AfterbGootingfromtheLILO{prompt,thesystemmustloadthekernelimagefrom oppy*.S"This}maytakeseveralseconds;youwillknowthatthingsaregoingwellifthe oppydriveS"lightUUisstillon.F[q2.S"WhilethekernelbGoots,hSCSIdevicesmustbGeprobedfor.ZIfyoudonothaveanySCSIS"devicesinstalled,+thesystemwill\hang"forupto15secondswhiletheSCSIeprobGeS"continues;UUthisusuallyoGccursafterthelineelp$ffŽfinit: s,lp1exists(0),usingpollingdriverS"appGearsUUonyourscreen.F[q3.S"AfterLthekernelis nishedbGooting,controlListransferredtothesystembGootupL lesonS"the' oppy*.bFinally,\you'willbGepresentedwithaloginprompt,\orbGedroppedintoanS"installationUUprogram.qIfyouarepresentedwithaloginpromptsuchaseLinuxlogin:S"youshouldthenlogin(usuallyasrootorinstall|thisvqarieswitheachdistribution).S"Aftergenteringtheusername,thesystemmaypausefor20secondsormorewhiletheS"installationprogramorshellisbGeingloadedfrom oppy*.eAgain,%the oppydrivelightS"shouldUUbGeon.qDon'tassumethatthesystemishung.@'(b{$"$"2.5.RunningTIn9toT roubles64KP덑="AnyoftheabGoveitemsmaybGethesourceofyourproblem.However,ˮitispGossiblethatthe ="system+actuallymay\hang"whilebGooting,!which+canbGeduetoseveralcauses.JFirstofall,="youױmaynothaveenoughavqailableRAM׏tobGoottheinstallationmedia.(Seethefollowing="itemUUforinformationondisablingtheramdisktofreeupmemory*.)$="Thecauseofmanysystemhangsishardwareincompatibility*.Section1.8inthelastchapter="presentedjBanoverviewofsuppGortedhardwareunderLinux.#lEvenifyourhardwareissuppGorted,="youqmayrunintoproblemswithincompatiblehardwarecon gurationswhicharecausingthe="systemUUtohang.qSeeSection2.5.2,bGelow,foradiscussionofhardwareincompatibilities.63"="SystemrepQortsoutofmemoryerrorswhileattemptingtobootorinstallthe="soft9ware.="ThisEAitemdealswiththeamountofRAMDthatyouhaveavqailable.Onsystemswith4megabytes="of|RAM|\orless,}youmayrunintotroublebGooting|theinstallationmediaorinstallingthe="softwareHitself.IThisisbGecausemanydistributionsusea\ramdisk",Dwhichisa lesystem="loaded2directlyintoRAM,foropGerationswhileusingtheinstallationmedia.[Theentireimage="of3theinstallationbGoot3 oppy*,:forexample,maybGeloadedintoaramdisk,:whichmayrequire="moreUUthanamegabyteofRAM.="ThesolutiontothisproblemistodisabletheramdiskoptionwhenbGootingtheinstallme-="dia.Eachreleasehasadi erentproGcedurefordoingthis;rontheSLSrelease,C]forexample,="you%typGe\floppy"attheLILO%promptwhenbootingthea1disk.Seeyourdistribution's="doGcumentationUUfordetails.="Y*ou!maynotseean\outofmemory"errorwhenattemptingtobGoot!orinstallthesoftware;="instead,thesystemmayunexpGectedlyhang,orfailtobGoot.]Ifyoursystemhangs,andnone="ofUUtheexplanationsintheprevioussectionseemtobGethecause,trydisablingtheramdisk.="KeepinmindthatLinuxitselfrequiresatleast2megabytesofRAMtorunatall;"some="distributionsUUofLinuxrequire4megabytesormore.63"="ThesystemrepQortsanerrorsuc9has\permission?denied"or\filenotfound"="whileTbQooting.="ThisisanindicationthatyourinstallationbGootupmediaiscorrupt.kIfyouattempttobGoot="fromdtheinstallationmedia(andyou'resurethatyou'redoingeverythingcorrectly),youshould="notťseeanyerrorssuchasthis.¸ContactthedistributorofyourLinuxsoftwareand ndout="abGouttheproblem,andperhapsobtainanothercopyofthebootmediaifnecessary*.Ifyou="downloaded thebGootup diskyourself,9tryre-creatingthebGootup disk,andseeifthissolves="yourUUproblem.63"="TheTsystemrepQortstheerror\VFS:?Unabletomountroot"Twhenbooting.="This'YerrormessagemeansthattheroGot lesystem(foundonthebootmediaitself),0couldnot="bGecfound.[!Thismeansthateitheryourbootmediaiscorruptinsomeway*,orcthatyouarenot="bGootingUUthesystemcorrectly*.="F*orىexample,manyCD-ROMgdistributionsrequirethatyouhavetheCD-ROMginthedrive="whenbGooting.Q/AlsobesurethattheCD-ROMrdriveison,andcheckforanyactivity*.Q/It'salso="pGossibleVthatthesystemisnotlocatingyourCD-ROM9driveatbGootVtime;seeSection2.5.2="forUUmoreinformation.A~(b{$"$"2.5.RunningTIn9toT roubles65KP덑="IfY3you'resurethatyouarebGootingY3thesystemcorrectly*,Z*thenyourbGootupY3mediamayindeed ="bGejcorrupt.SThisisaveryuncommonproblem, fsotryothersolutionsbeforeattemptingtouse="anotherUUbGoot oppyortape.-$"2.5.2MbHardwareproblemsN$"ThegmostcommonformofproblemwhenattemptingtoinstalloruseLinuxisanincompatibility$"with9Mhardware.hoEvenifallofyourhardwareissuppGortedbyLinux,>amiscon gurationorhardware$"con ictcansometimescausestrangeresults|yourdevicesmaynotbGedetectedatboottime,~orthe$"systemUUmayhang.ؼ3"ItPisimpGortanttoisolatethesehardwareproblemsifyoususpGectthattheymaybGethesourceof$"yourztrouble.+InthefollowingsectionswewilldescribGesomecommonhardwareproblemsandhow$"toUUresolvethem. 򍍑$"2.5.2.1P7IsolatingThardw9areproblems$"IfyouexpGerienceaproblemthatyoubGelievetobGehardware-related,&the rstthingthatyoushould$"toBdoisattempttoisolatetheproblem.kThismeanseliminatingallpGossiblevqariablesand(usually)$"takingUUthesystemapart,piece-by-piece,untiltheo endingpieceofhardwareisisolated.ؼ3"Thisisnotasfrighteningasitmaysound./?Basically*,youshouldremoveallnonessentialhardware$"fromCyoursystem,candthendeterminewhichdeviceisactuallycausingthetrouble|pGossiblyby$"reinsertingJ1eachdevice,Lloneatatime.nThismeansthatyoushouldremoveallhardwareotherthan$"the oppyandvideocontrollers,andofcoursethekeybGoard.6EveninnoGcent-lookingdevicessuch$"as,:mousecontrollerscanwreakunknownhavoGconyourpGeaceofmindunlessyouconsiderthem$"nonessential.3"F*or>example,let'ssaythatthesystemhangsduringtheEthernetbGoarddetectionsequenceat$"bGoot#time. 2Y*oumighthypGothesizethatthereisacon ictorproblemwiththeEthernetboardin$"yourmachine.Thequickandeasywayto ndoutistopulltheEthernetbGoard,Eandtrybooting$"again.`IfeverythinggoGeswell,thenyouknowthateither(a)theEthernetbGoardisnotsupported$"by;Linux(seeSection1.8foralistofcompatiblebGoards),@or(b)thereisanaddressorIRQ;con ict$"withUUthebGoard.3"\Address?orIRQcon ict?"lWhatonearthdoGesthatmean?Alldevicesinyourmachineuse$"anBIRQ,orinterruptr}'equestline,FDtoBtellthesystemthattheyneedsomethingdoneontheirbGehalf.$"Y*oucanthinkoftheIRQhasacordthatthedevicetugswhenitneedsthesystemtotakecareof$"someSpGendingrequest.xIfmorethanonedeviceistuggingonthesamecord,-thekernelwon'tbGe$"ableUUtodeteminewhichdeviceitneedstoservice.qInstantmayhem.3"Therefore,bGezsurethatallofyourinstalleddevicesareusinguniqueIRQalines.5Ingeneralthe$"IRQfor)adevicecanbGesetbyjumpGersonthecard; seethedocumentationfortheparticulardevice$"forjdetails.#SomedevicesdonotrequiretheuseofanIRQjatall,butitissuggestedthatyoucon gure$"themUUtouseoneifpGossible(theSeagateST01andST02SCSIcontrollersbeinggoodexamples).B 3(b{$"$"2.5.RunningTIn9toT roubles66KP덑3"InBsomecases,FQthekernelprovidedonyourinstallationmediaiscon guredtouseacertainIRQ $"for{certaindevices.:F*orexample,oonsomedistributionsofLinux,thekernelisprecon guredto$"useIRQ5fortheTMC-950SCSIcontroller,theMitsumiCD-ROMcontroller,andthebusmouse$"driver.Ifyouwanttousetwoormoreofthesedevices,byou'llneedto rstinstallLinuxwithonly$"oneofthesedevicesenabled,thenrecompilethekernelinordertochangethedefaultIRQforone$"ofUUthem.q(SeeChapter4forinformationonrecompilingthekernel.)ؼ3"AnotherRareawherehardwarecon ictscanariseiswithDMAR(directmemoryaccess)channels,$"I/Oaddresses, andSsharedmemoryaddresses.AllofthesetermsdescribGemechanismsthrough$"whichthesysteminterfaceswithhardwaredevices."SomeEthernetbGoards,forexample,usea$"sharedmemoryaddressaswellasanIRQtointerfacewiththesystem.HIfanyoftheseareincon ict$"withotherdevices,3thenthesystemmaybGehaveunexpGectedly*.Youshouldbeabletochangethe$"DMAychannel,@I/OorsharedmemoryaddressesforyourvqariousdeviceswithjumpGersettings.$"(Unfortunately*,UUsomedevicesdon'tallowyoutochangethesesettings.)3"The:doGcumentationforyourvqarioushardwaredevicesshouldspGecifytheIRQ,DMAchannel,$"I/Oaddress,orsharedmemoryaddressthatthedevicesuse,andhowtocon gurethem.AgAgain,$"theѮsimplewayѮtogetaroundtheseproblemsisjusttotempGorarilydisablethecon ictingdevices$"untilUUyouhavetimetodeterminethecauseoftheproblem.3"T*ableI2.2isalistofIRQIandDMAchannelsusedbyvqarious\standard"devicesfoundonmost$"systems.[~Almostxallsystemswillhavexsomeofthesedevices,soyoushouldavoidsettingtheIRQgor$"DMAUUofotherdevicesincon ictwiththesevqalues.N% @QffW(Device~I/OTaddress;IR9QPDMA)zffWttyS0T(COM1)~3f8;4Pn/a <ttyS1T(COM2)~2f8;3Pn/attyS2T(COM3)~3e8;4Pn/attyS3T(COM4)~2e8;3Pn/alp0T(LPT1)~378T-37f;7Pn/alp1T(LPT2)~278T-27f;5Pn/afd0,Tfd1( oppies1and2)~3f0T-3f7;6P2fd2,Tfd3( oppies3and4)~370T-377;10P3H;T*ableUU2.2:qCommondevicesettings%퍍$"2.5.2.2P7ProblemsTrecognizingharddriv9eorcontrollerN$"WhenUULinuxbGoots,UUyoushouldseeaseriesofmessagesonyourscreensuchas:\="Console: s,colourEGA+80x25,8virtualconsoles="Serialdriverversion3.96withnoserialoptionsenabled="tty00at0x03f8(irq=4)isa16450="tty03at0x02e8(irq=3)isa16550A="lp$ffŽfinit: s,lp1exists(0),usingpollingdriver=":::CR(b{$"$"2.5.RunningTIn9toT roubles67KP덑$"Here,Dthekernelisdetectingthevqarioushardwaredevicespresentonyoursystem.*jAtsomepGoint, $"youUUshouldseethelineؼ="Partitioncheck:$"followedUUbyalistofrecognizedpartitions,forexample:="Partitioncheck:="hda: s,hda1hda2="hdb: s,hdb1hdb2hdb3$"If,KforI1somereason,yourdrivesorpartitionsarenotrecognized,KthenyouwillnotbGeabletoaccess$"themUUinanyway*.ؼ3"ThereUUareseveralthingsthatcancausethistohappGen:3"="HardL;driv9eorcontrollernotsuppQorted.Ifyouareusingaharddrivecontroller(IDE,="SCSI,j orotherwise)thatisnotsuppGortedbyLinux,thekernelwillnotrecognizeyourpartitions="atUUbGoottime.3"="Driv9eorcontrollerimpropQerlycon gured..Even ifyourcontrollerissuppGortedbyLinux,="itgmaynotbGecon guredcorrectly*.(ThisisparticularlyaproblemforSCSIgcontrollers;qRmost="non-SCSIUUcontrollersshouldwork newithoutanyadditionalcon guration).="RefertothedoGcumentationforyourharddriveand/orcontrollerforinformationonsolving="thesekindsofproblems.MInparticular,manyharddriveswillneedtohaveajumpGersetifthey="aretobGeusedasa\slave"drive(forexample,Oasthesecondharddrive).JTheacidtestforthis="kindLofconditionistobGootLupMS-DOS,orsomeotheropGeratingsystem,knowntoworkwith="your!driveandcontroller.+IfyoucanaccessthedriveandcontrollerfromanotheropGerating="system,UUthenitisnotaproblemwithyourhardwarecon guration.="SeewSection2.5.2.1,abGove,forwinformationonresolvingpGossibledevicecon icts,andSec-="tionUU2.5.2.3,bGelow,forinformationoncon guringSCSIdevices.3"="Con9trollerJpropQerlycon gured,Rbutnotdetected.SSome^BIOS-lessSCSI^?controllers="requiretheusertospGecifyinformationaboutthecontrolleratboottime.Section2.5.2.3,="bGelow,UUdescribeshowtoforcehardwaredetectionforthesecontrollers.3"="Harddriv9egeometrynotrecognized.; Somesystems,suchastheIBMPS/V*aluePoint,="douknotstoreharddrivegeometryinformationintheCMOSucmemory*,}pwhereLinuxexpGectsto=" ndŬit.Also,certainSCSIŏcontrollersneedtobGetoldwhereto nddrivegeometryinorder="forUULinuxtorecognizethelayoutofyourdrive.="MostdistributionsprovideabGootupoptiontospGecifythedrivegeometry*.Ingeneral,rwhen="bGootingttheinstallationmedia,|youcanspGecifythedrivegeometryattheLILOtbGoottprompt="withUUacommandsuchas:S"boot: s,linuxNparagraph)orifthereisapGermissionsproblemwiththeinstallationsoftware.KF*or>ex-="ample,E`someAcdistributionsofLinuxhavebGeenknowntohavebugsintheinstallationsoftware="itself.UJThese+areusually xedveryrapidly*,!andarequiteinfrequent.UJIfyoususpGectthatthe="distributionsoftwarecontainsbugs,andyou'resurethatyouhavenotdoneanythingwrong,="contactUUthemaintainerofthedistributiontorepGortthebug.ؼ3"IfNyouhaveotherstrangeerrorswheninstallingLinux(espGeciallyifyoudownloadedthesoftware$"yourself),CpbGesurethatyouactuallyobtainedallofthenecessary leswhendownloading. F*or$"example,UUsomepGeopleusetheFTPcommandؼ="mget*.*$"whenVdownloadingtheLinuxsoftwareviaFTP*.Thiswilldownloadonlythose lesthatcontain $"a \."intheir lenames;|cifthereareany leswithoutthe\.",K6youwillmissthem.Thecorrect$"commandUUtouseinthiscaseisؼ="mget*3"ThebGestadviceistoretraceyourstepswhensomethinggoeswrong.vY*oumaythinkthatyou $"have2doneeverythingcorrectly*,lwheninfactyouforgotasmallbutimpGortantstepsomewherealong$"theway*.Inmanycases,justattemptingtore-downloadorre-installtheLinuxsoftwarecansolve$"theUUproblem.qDon'tbGeatyourheadagainstthewallanylongerthanyouhaveto!ؼ3"Also,if/LinuxunexpGectedlyhangsduringinstallation,theremaybGeahardwareproblemofsome$"kind.qSeeUUSection2.5.2forhints.#$"2.5.4MbProblemsafterinstallingLinuxN$"Y*ou've*spGentanentireafternoGoninstallingLinux.lFInordertomakespaceforit,(_youwipGedyour$"MS-DOS'Wand'bOS/2partitions,0andtearfullydeletedyourcopiesofSimCityandWingCommander.$"Y*ouܜrebGootthesystem,andnothinghappens.IOr,evenworse,somethinghappGens,butit'snotwhat$"shouldUUhappGen.qWhatdoyoudo?GVܠ(b{$"$"2.5.RunningTIn9toT roubles71KP덑3"In/Section2.5.1,&wecoveredsomeofthemostcommonproblemsthatcanoGccurwhenbooting $"the Linuxinstallationmedia|manyofthoseproblemsmayapplyhere.Inaddition,9youmaybGe$"victimUUtooneofthefollowingmaladies. $"2.5.4.1P7ProblemsTbQootingLin9uxfrom oppyN$"Ifyouareusinga oppytobGootLinux,,youmayneedtospGecifythelocationofyourLinuxroGot$"partitionZatbGootZtime.ThisisespGeciallytrueifyouareusingtheoriginalinstallation oppyitself,$"andUUnotacustombGootUU oppycreatedduringinstallation.ؼ3"WhileMlbGootingthe oppy*,rholddownffl  ffshift ffffffl'orff$  ffctrlX ffffff$.Z ThisshouldpresentyouwithabGoot$"menu;)pressߟff  fftab,„ ffffffLtoseealistofavqailableoptions.eF*orexample,Amanydistributionsallowyouto$"typGe="boot: s,linuxNIn="orderUUtobGootUULinuxfromtheharddrive,youwillneedtoinstallLILO(seeChapter4).$="Ontheotherhand,?xifyoudid.installLILO,andanotheropGeratingsystembootsinsteadof="Linux,>then9VyouhaveLILO9Ocon guredtobGootthatotheroperatingsystembydefault.hrWhile="thelJsystemisbGooting,rholdlJdownffl  ffshift ffffffl%ENorff$  ffctrlX ffffff$n,andpressff  fftab,„ ffffff"atthebGootlJprompt.This="shouldpresentyouwithalistofpGossibleoperatingsystemstoboot;zTselecttheappropriate="optionUU(usuallyjust\linux")tobGootUULinux.="If4youwishtoselectLinuxasthedefaultopGeratingsystemtoboot,:youwillneedtore-install="LILO.UUSeeChapter4.="It>alsomaybGepossiblethatyouattemptedtoinstallLILO,buttheinstallationprocedure="failedUUinsomeway*.qSeeUUthepreviousitem. `$"2.5.4.3P7ProblemsTlogginginN$"AfterUUbGootingLinux,youshouldbGepresentedwithaloginprompt,likeso:x="linuxlogin:$"AtthispGoint,feitherthedistribution'sdoGcumentationorthesystemitselfwilltellyouwhattodo. $"F*orsmanydistributions,;yousimplyloginasroot,;withnopassword.S"OtherpGossibleusernamesto$"tryUUareguestortest.ؼ3"MostBnewly-installedLinuxsystemsshouldnotrequireapasswordfortheinitiallogin.NHowever,$"if!youareaskedtoenterapassword,_theremaybGeaproblem.K First,_tryusingapasswordequivqalent$"toUUtheusername;thatis,ifyouarelogginginasroot,use\root"asthepassword.3"IfXyousimplycan'tlogin,theremaybGeaproblem.gFirst,consultyourdistribution'sdoGcumen-$"tation;~theusernameandpasswordtousemaybGeburiedintheresomewhere.Theusernameand$"passwordGmayhavebGeengiventoyouduringtheinstallationproGcedure,IortheymaybGeprintedon$"theUUloginbanner.3"One[causeofthismaybGeaproblemwithinstallingtheLinuxloginandinitialization les.NIfthis$"isnthecase,youmayneedtoreinstall(atleastpartsof)theLinuxsoftware,orbGootnyourinstallation$"mediaUUandattemptto xtheproblembyhand|seeChapter4forhints.Is(b{$"$"2.5.RunningTIn9toT roubles73KP덍$"2.5.4.4P7ProblemsTusingthesystemN$"If3loginissuccessful,kyoushouldbGepresentedwithashellprompt(suchas\#"or\$")andcan $"happilyYfroamaroundyoursystem.}However,Zjtherearesomeinitialproblemswithusingthesystem$"thatUUsometimescreepup.ؼ3"Themostcommoninitialcon gurationproblemisincorrect leordirectorypGermissions.This$"canUUcausetheerrormessageؼ="Shell-init: s,permissiondenied$"tobGeprintedafterloggingin(infact,&Hanytimeyouseethemessage\permission?denied"youcan $"bGeUUfairlycertainthatitisaproblemwith lepermissions).3"Inbmanycases,%it'sasimplematterofusingthechmodcommandto xthepGermissionsofthe$"appropriate lesordirectories.F*orexample,5somedistributionsofLinuxonceusedthe(incorrect)$" leUUmoGde0644fortherootdirectory(/).qThe xwastoissuethecommandؼ="#chmodN<755/$"asdroot.@However,hinordertoissuethiscommand,youneededtobGootfromtheinstallationmedia $"andUUmountyourLinuxroGot lesystembyhand|ahairytaskformostnewcomers.3"Asyouusethesystem,`youmayrunintoplaceswhere leanddirectorypGermissionsareincorrect,$"orcJsoftwaredoGesnotworkascon gured.W*elcometotheworldofLinux!Whilemostdistributions$"areqquitetrouble-free,8veryfewofthemarepGerfect.W*edon'twanttocoverallofthoseproblems$"here.gInstead,throughoutthebGookwehelpyoutosolvemanyofthesecon gurationproblemsby$"teaching[nyouhowto ndthemand xthemyourself.InChapter1wediscussedthisphilosophyin$"someUUdetail.qInChapter4,wegivehintsfor xingmanyofthesecommoncon gurationproblems.J(b{K$"KChapterF3;]ڍ$"ILin4ux TutorialAƍ$"3.1IIn=trouduction׍$"New(usersofUNIX(andLinuxmaybGeabitintimidatedbythesizeandapparentcomplexityofthe $"system(bGeforethem.McTherearemanygoodbooksonusingUNIX outthere,foralllevelsofexpertise$"fromҲnovicetoexpGert.However, noneofthesebGooksҲcovers, speci cally*,anҲintroductiontousing$"Linux.<*While|95%ofusingLinuxisexactlylikeusingotherUNIXSsystems,ԧthemoststraightforward$"way.EtogetgoingonyournewsystemiswithatutorialtailoredforLinux.dHereinissuchatutorial.ؼ3"ThisdvchapterdoGesnotgointoalargeamountofdetailorcovermanyadvqancedtopics.)Instead,$"itisintendedtogetthenewLinuxuserrunning,ҺonbGothfeet,sothatheorshemaythenreada$"morebgeneralbGookbaboutUNIXbandunderstandthebasicdi erencesbetweenotherUNIXbsystems$"andUULinux.3"V*ery)littleisassumedhere,_ exceptpGerhapssomefamiliaritywithpersonalcomputersystems,$"andMS-DOS.However,evenifyou'renotanMS-DOSPuser,youshouldbGeabletounderstand$"everything*here.GAt rstglance,UNIXloGoksalotlikeMS-DOS(afterall,partsofMS-DOSwere$"moGdeledX8ontheCP/MX7operatingsystem,XwhichinturnwasmoGdeledonUNIX).However,Xonlythe$"verysupGer cialfeaturesofUNIXresembleMS-DOSinanyway*.9Evenifyou'recompletelynewto$"theUUPCworld,thistutorialshouldbGeofhelp.3"And,dcbGefore.-webegin:#wDonP't[fb}'eafraidtoexperiment.OThe.-systemwon'tbiteyou.OY*oucan't$"destroyDanythingbyworkingonthesystem.^UNIX5hassomeamountofsecuritybuiltin,&toprevent$"\normal"2Zusers(therolewhichyouwillnowassume)fromdamaging leswhichareessentialtothe$"system.JEvenso,theabsoluteworstthingthatcanhappGenisthatyou'lldeleteallofyour les|and$"you'llUUhavetogobackandre-installthesystem.qSo,atthispGoint,youhavenothingtolose.(]$"3.2IBasicUNIXConcepts׍$"UNIXisamultitasking,1multiuseropGeratingsystem.CThismeansthattherecanbemanypeople$"usinghonecomputeratthesametime,runningmanydi erentapplications.(Thisdi ersfromMS-74Ki(b{$"$"3.2.BasicTUNIXConceptsa75KP덑$"DOS,ZwhereonlyonepGersoncanusethesystematanyonetime.)EUnderUNIX,foruserstoidentify $"themselvestothesystem,dtheymustlogCin,dwhichentailstwosteps:EEnteringyourloginCname$"(thenamewhichthesystemidenti esyouas),Yandenteringyourpassw9ord,YwhichisyourpGersonal$"secretkeytologgingintoyouraccount.G\Becauseonlyyouknowyourpassword,nooneelsecanlogin$"toUUthesystemunderyourusername.ؼ3"On~traditionalUNIXsystems,0thesystemadministratorwillassignyouausernameandan$"initial$passwordwhenyouaregivenanaccountonthesystem.DHowever,.bGecauseyouarethesystem$"administrator,*you$mustsetupyourownaccountbGeforeyoucanlogin|seeSection3.2.1,*bGelow.$"F*orUUthefollowingdiscussions,we'llusetheimaginaryusername\larry".3"Inaddition,jeachUNIXsystemhasahostnameassignedtoit.Itisthishostnamethatgives$"yourmachineaname,'givesitcharacterandcharm.jThehostnameisusedtoidentifyindividual$"machinesonanetwork,/butevenifyourmachineisn'tnetworked,/itshouldhaveahostname.>9In$"Sectionk4.10.2we'llcoversettingyoursystem'shostname.XF*orourexamples,bGelow,theksystem's$"hostnameUUis\mousehouse".#`$"3.2.1MbCreatinganaccountN$"Beforeyoucanusethesystem,Byoumustsetupauseraccountforyourself.ThisisbGecauseit's$"usuallynotagoGodideatousetherootaccountfornormaluse./\TherootaccountshouldbGereserved$"forUUrunningprivilegedcommandsandformaintainingthesystem,asdiscussedinSection4.1.3"Inordertocreateanaccountforyourself,Hyouneedtologinasrootandusetheuseraddor$"adduserUUcommand.qSeeSection4.4forinformationonthisproGcedure.#`$"3.2.2MbLogginginN$"AtUUlogintime,you'llseeapromptresemblingthefollowingonyourscreen:z]="mousehouselogin:z^3"Here,xenter\yourusername,xandpresstheff#&P  ffReturn"Y ffffff#&P'key*.Ourhero,xlarry,wouldtypGethefollowing:="mousehouselogin: s,larry ="Password:3"Now,#enteryourpassword.],Itwon'tbGeechoGedtothescreenwhenyoulogin,#sotypGecarefully*.],If$"youUUmistypGeyourpassword,you'llseethemessage=="Loginincorrect$"andUUyou'llhavetotryagain.ؼ3"Once?youhavecorrectlyenteredtheusernameandpassword,youareociallyloggedintothe $"system,UUandarefreetoroam.Le(b{$"$"3.2.BasicTUNIXConceptsa76KP덍$"3.2.3MbVirtualconsolesN$"Thesystem'sconsoleisthemonitorandkeybGoardconnecteddirectlytothesystem.(Because $"UNIXisamultiuseropGeratingsystem,youmayhaveotherterminalsconnectedtoserialpGortson$"your҅system,butthesewouldnotbGetheconsole.)F-Linux,likesomeotherversionsofUNIX,provides$"accessXtovirtual1consoles(orVC's),whichXallowyoutohavemorethanoneloginsessionfrom$"yourUUconsoleatatime.ؼ3"T*odemonstratethis,ǒlogintoyoursystem(asdemonstratedabGove).Now,ǒpressff#&P  ffalt-F2"Y ffffff#&P& .Y*ou$"should seethelogin:Wpromptagain.`IY*ou'reloGokingatthesecondvirtualconsole|youloggedinto$"theF rst.FT*oswitchbacktothe rstVC,pressff#&P  ffalt-F1"Y ffffff#&P'm>.FV;oila!qY*ou'rebacktoyour rstlogin$"session.3"A+newly-installed+Linuxsystemprobablyallowsyoutoaccessthe rstfourVC's,3usingff#&P  ffalt-F1"Y ffffff#&P$"throughff#&P  ffalt-F4"Y ffffff#&P'C.ʃHowever,OitispGossibletoenableupto12VC's|oneforeachfunctionkeyon$"your0keybGoard.jYAsyoucansee,useofVC'scanbGeverypGowerful|youcanbGeworkingonseveral$"di erentUUVC'satonce.3"WhiletheuseofVC'sissomewhatlimiting(afterall,ҜyoucanonlybGelookingatoneVCtata$"time),TitTshouldgiveyouafeelforUNIX'smultiusercapabilities.qWhileyou'reworkingonVCT#1,$"youUUcanswitchovertoVC#2andstartworkingonsomethingelse.#$"3.2.4MbShellsandcommandsN$"F*ormostofyourexplorationsintheworldofUNIX,you'llbGetalkingtothesystemthroughthe$"useofashell. Ashellisjustaprogramwhichtakesuserinput(e.g.,[commandswhichyoutypGe)$"andXtranslatesthemintoinstructions.ThiscanbGecomparedtotheCOMMAND.COM4programunder$"MS-DOS,8whichdoGesessentiallythesamething.h=TheshellisjustoneinterfacetoUNIX.Thereare$"many:pGossibleinterfaces|suchastheXWindowSystem,whichletsyouruncommandsbyusing$"theUUmouseandkeybGoardinconjunction.3"As~soGonasyoulogin, thesystemstartstheshell,andyoucantypGecommandstoit.CHere'sa$"quickUUexample.qHere,Larrylogsin,andisleftsittingattheshellprompt.ؼ="mousehouselogin: s,larry="Password: s,larry'sN"32fd >"32fd >"32fd d32fduo]feu32fd >"32fd >"32fd >"32fd >" 32fd [ 32fdlo]fel32fd l/32fd l@32fd lQ32fd lb32fd ls32fd l32fd "32fd]3fe"32fd "32fd "32fd l32fd l32fd l32fd 32fdl32fd '/x㍑Kbinx㍑KdevMKetcx㍑Khomeɀ"larry'"samx㍑Klib.8KproGciKtmp'Kusrjz"X386!x㍑z"bin1'z"emacsCMz"etcSz"g++-includeex㍑z"includevx㍑z"libx㍑z"loGcalx㍒bin'emacsMetcx㍒lib'z"manۀz"spGool'z"srcx㍒linuxiz"tmpFigureUU3.1:qAtypical(abridged)Unixdirectorytree.$"3.2.10T"ReferringtohomedirectoriesN$"Under bGothtcshandbash,^1yourhomedirectorycanbereferredtousingthetildecharacter(\~"). $"F*orUUexample,thecommandؼ="/home/larry#moreN<~/papers/history- nal$"isUUequivqalentto="/home/larry#moreNThesyntaxisverystraightforward.="/home/larry/foo#mvNthethecommandmightbGeaninternalshellcommand,$"oryanalias(asdiscussedinSection3.2.4),inwhichcaseitwouldnothaveamanpageofitsown.$"Oneexampleiscd,(whichisashellinternalcommand.r'TheshellactuallyproGcessesthecd|there$"isUUnoseparateprogramwhichcontainsthiscommand.($"3.4ISummaryofBasicCommands׍$"ThisUsectionintroGducessomeofthemostusefulbasiccommandsonaUNIX:system,includingthose$"coveredUUinthelastsection.3"Note֋thatoptionsusuallybGeginwitha\-",andinmostcasesmultipleone-letteroptionsmaybGe$"combinedsusingasingle\-".qF*orexample,{insteadofusingthecommandls?-l-F,sitisadequate$"toUUusels?-lF.3"Insteadoflistingalloftheoptionsavqailableforeachofthesecommands,Xwe'llonlytalkabGout$"those8BwhichareusefulorimpGortantatthistime.Infact,pmostofthesecommandshavealarge$"numbGerofoptions(mostofwhichyou'llneveruse).LY*oucanusemantoseethemanualpagesfor$"eachUUcommand,whichlistalloftheavqailableoptions.3"AlsokWnotethatmanyofthesecommandstakealistof lesordirectoriesasarguments,pdenoted$"byX\h le1i:::h leNi".{{F*orexample,`thecpcommandtakesasargumentsalistof lestocopy*,$"followedbythedestination leordirectory*.\Whencopyingmorethanone le,!thedestinationmust$"bGeUUadirectory*.W(b{$"$"3.4.SummaryTofBasicCommands87KP덍$"cdlgChangeUUthecurrentworkingdirectory*. lgSyntax:qcd?hdirectoryilghdirectoryiSisthedirectorytochangeto.qG(\."refersStothecurrentdirectory*,T"\.."lgtheUUparentdirectory*.)lgExample:qcd?../fooUUsetsthecurrentdirectoryto../foo.J$"lslgDisplaysUUinformationabGoutthenamed lesanddirectories.lgSyntax:qls?h le1ih le2i:::Lh leNilgWhereh le1ithroughh leNiarethe lenamesordirectoriestolist.;Options: TherelgaremoreoptionsthanyouwanttothinkabGout.!7Themostcommonlyusedare-Flg(usedVtodisplaysomeinformationabGoutthetypGeofthe le),and-l(givesa\long"lglisting!8including lesize,T1owner,pGermissions,and!8soon.qThiswillbecovered!8inlgdetailUUlater.)lgExample: }ls?-lF/home/larryYwilldisplaythecontentsofthedirectorylg/home/larry.$"cplgCopiesUU le(s)toanother leordirectory*.lgSyntax:qcp?h le1ih le2i:::Lh leNihdestinationilgWhereCRh le1ithroughh leNiarethe lestocopy*,Fandhdestinationiisthedestina-lgtionUU leordirectory*.lgExample:qcp?../frogjoeUUcopiesthe le../frogtothe leordirectoryjoe.$"mvlgMoves1 le(s)toanother leordirectory*. [ThiscommanddoGestheequivqalentofalgcopyfollowedbythedeletionoftheoriginal.ZThiscanbGeusedtorename les,aslginUUtheMS-DOScommandRENAME.lgSyntax:qmv?h le1ih le2i:::Lh leNihdestinationilgWherexh le1ithroughh leNiarethe lestomove,andxhdestinationiisthedesti-lgnationUU leordirectory*.lgExample:qmv?../frogjoeUUmovesthe le../frogtothe leordirectoryjoe.$"rmlgDeletesP les.p:Notethatwhen lesaredeletedunderUNIX,theyareunrecoverablelg(unlikeUUMS-DOS,whereyoucanusually\undelete"the le).lgSyntax:qrm?h le1ih le2i:::Lh leNilgWhereUUh le1ithroughh leNiarethe lenamestodelete.lgOptions:q-iUUwillpromptforcon rmationbGeforedeletingthe le.lgExample:rm?-i/home/larry/joe/home/larry/frogrrdeletesthe lesjoeandlgfrogUUin/home/larry.$"mkdirlgCreatesUUnewdirectories.lgSyntax:qmkdir?hdir1ihdir2i:::LhdirNilgWhereUUhdir1ithroughhdirNiarethedirectoriestocreate.lgExample:bmkdir?/home/larry/test "createsthedirectorytestunderlg/home/larry.$"rmdirlgThiscommanddeletesemptydirectories.ZPWhenusingrmdir,yourcurrentworkinglgdirectoryUUmustnotbGewithinthedirectorytobedeleted.X X(b{$"$"3.5.ExploringTtheFileSystem<88KP덑lgSyntax:qrmdir?hdir1ihdir2i:::LhdirNi lgWhereUUhdir1ithroughhdirNiarethedirectoriestodelete.lgExample:Frmdir?/home/larry/papersTdeletesthedirectory/home/larry/papers,lgifUUitisempty*.J$"manlgDisplaysthemanualpageforthegivencommandorresource(thatis,anysystemlgutilityhwhichisn'tacommand,suchasalibraryfunction.)0xSyntax:man?hcommandilgWhereUUhcommandiisthenameofthecommandorresourcetogethelpon.lgExample:qman?lsUUgiveshelponthelscommand.$"morelgDisplaysUUthecontentsofthenamed les,onescreenfulatatime.lgSyntax:qmore?h le1ih le2i:::Lh leNilgWhereUUh le1ithroughh leNiarethe lestodisplay*.lgExample:qmore?papers/history-finalUUdisplaysthe lepapers/history-final.$"catlgOciallyusedtoconcatenate les,WcatisalsousedtodisplaytheentirecontentslgofUUa leatonce.lgSyntax:qcat?h le1ih le2i:::Lh leNilgWhereUUh le1ithroughh leNiarethe lestodisplay*.lgExample:qcat?letters/from-mdwUUdisplaysthe leletters/from-mdw.$"echolgSimplyUUechoGesthegivenarguments.lgSyntax:qecho?harg1iharg2i:::LhargNilgWhereUUharg1ithroughhargNiaretheargumentstoecho.lgExample:qecho?"Helloworld"UUdisplaysthestring\Hello?world".$"greplgDisplayUUallofthelinesinthenamed le(s)matchingthegivenpattern.lgSyntax:qgrep?hpatternih le1ih le2i:::Lh leNilgWhere?hpatterniisaregularexpressionpattern,DAandh le1ithroughh leNiarethelg lesUUtosearch.lgExample:tgrep?loomer/etc/hostsVwilldisplayalllinesinthe le/etc/hostslgwhichUUcontainthepattern\loomer".16ލ$"3.5IExploringtheFileSystem׍$"The leXsystemisthecollectionof lesandthehierarchyofdirectoriesonyoursystem.MIpromised$"bGeforeUUtoescortyouaroundthe lesystemandthetimehascome.ؼ3"Y*ouhavetheskillsandtheknowledgetomakesenseoutofwhatI'msaying,&andyouhavea$"roadmap.q(ReferUUtoFigure3.2.8onpage80).3"First,changeVtotheroGotdirectory(cd?/),anddoanls?-F.Y*ou'llprobablyseethesedirectories^2|s:$"bin,UUdev,etc,home,install,lib,mnt,proc,root,tmp,user,usr,andvar.$"Jffr J= "5-:2LܸYJoumaÎyseeothers, andyoumightnotseeallofthem. Don'tworryJ. EveryreleaseofLinuxdi ersinsome zrespawhilehda1referstothe rstp}'artitionon/dev/hda.v-sgThe1devicenamesbGeginningwithsdareSCSIdrives.RIfyouhaveaSCSIhardgdrive,Minsteadofaccessingitthrough/dev/hda,youwouldaccess/dev/sda.gSCSIUUtapGesareaccessedviastdevices,andSCSICD-ROMviasrdevices.v-sgTheBzdevicenamesbGeginningwithlpaccessparallelports.k~/dev/lp0referstog\LPT1"UUintheMS-DOSworld.v-sg/dev/nullisusedasa\blackhole"|anydatasenttothisdeviceisgonegforever.WhyBisthisuseful?W*ell,Խifyouwantedtosuppresstheoutputofagcommand6appGearingonyourscreen,ˣyoucouldsendthatoutputto/dev/null.gW*e'llUUtalkmoreabGoutthislater.Z9(b{$"$"3.5.ExploringTtheFileSystem<90KP덍v-sgThedevicenamesbGeginningwith/dev/ttyrefertothe\virtualconsoles" gonJyoursystem(accessedviabypressingff#&P  ffalt-F1"Y ffffff#&P(,$ff#&P  ffalt-F2"Y ffffff#&P)JV,$andsoon).g/dev/tty1UUreferstothe rstVC,/dev/tty2referstothesecond,andsoon.v-sgThe[devicenamesbGeginningwith/dev/ptyare\pseudo-terminals".Theygareusedtoprovidea\terminal"toremoteloginsessions. F*orexample,ifgyourpmachineisonanetwork,incomingtelnetloginswoulduseoneoftheg/dev/ptyUUdevices.J$"/etclg/etcvcontainsanumbGerofmiscellaneoussystemcon guration les.`Theseincludelg/etc/passwdw(theuserdatabase),'/etc/rc(thesysteminitializationscript),andlgsoUUon.J$"/sbinlgsbin?zisusedforstoringessentialsystembinaries,CtobGeusedbythesystemadmin-lgistrator.$"/homelg/homezcontainsuser'shomedirectories.MF*orexample,7/home/larryisthehomelgdirectory&fortheuser\larry".bCOnanewly-installedsystem,0theremaynotbGeanylgusersUUinthisdirectory*.$"/liblg/libl3containssharedlibraryimages.`Thesel3 lescontaincoGdewhichmanypro-lggrams\>shareincommon.Insteadofeachprogramcontainingitsowncopyoftheselgshareduroutines,theyareallstoredinonecommonplace,in/lib.ThismakeslgexecutableUU lessmaller,andsavesUUspaceonyoursystem.$"/proclg/procU"isa\virtual lesystem",U,the lesinwhicharestoredinmemory*,notonthelgdrive.ATheyrefertothevqariousproQcessesrunningonthesystem,andallowyoutolggetinformationabGoutwhatprogramsandprocessesarerunningatanygiventime.lgW*e'llUUgointomoredetailinSection3.11.1.$"/tmplgMany5programshaveaneedtogeneratesomeinformationandstoreitinatempGo-lgraryUU le.qThecanonicalloGcationforthese lesisin/tmp.$"/usrlg/usrisaveryimpGortantdirectory*.F{ItcontainsanumbGerofsubdirectorieswhichlgin):turncontainsomeofthemostimpGortantandusefulprogramsandcon gurationlg lesUUusedonthesystem.LlgThevqariousdirectoriesdescribGedaboveareessentialforthesystemtooperate,(butlgmostofthethingsfoundin/usrareoptionalforthesystem.However,itisthoselgoptionalthingswhichmakethesystemusefulandinteresting.EWithout/usr,you'dlgmoreorlesshaveabGoringsystem,#onlywithprogramslikecpandls.,/usrcontainslgmostofthelargersoftwarepackqagesandthecon guration leswhichaccompanylgthem.$"/usr/X386lg/usr/X386JcontainsTheXJpWindowSystem,ifyouinstalledit.QTheXJpWindowlgSystemisalarge,pGowerfulgraphicalenvironmentwhichprovidesalargenumbGeroflggraphicalutilitiesandprograms,pdisplayedin\windows"onyourscreen.Ifyou'relgatԨallfamiliarwiththeMicrosoftWindowsorMacintoshenvironments,eXWindows[G(b{$"$"3.5.ExploringTtheFileSystem<91KP덑lgwill*vloGokveryfamiliar.)The/usr/X386directorycontainsalloftheXWindows lgexecutables,con guration les,andsuppGort les.'ExX(adoGcumentformattingsys-lgtem)UUandEmacs(alargeandpGowerfulUUeditor),ifyouinstalledthem.$"/usr/manlgThisdirectorycontainstheactualmanpages.TherearetwosubGdirectoriesforlgevery&manpage\section"(usethecommandman?manfordetails).F*orexample,lg/usr/man/man19containsthesource(thatis,rtheunformattedoriginal)formanpageslginUUsection1,and/usr/man/cat1containstheformattedmanpagesforsection1.$"/usr/srclg/usr/srcZcontainsthesourcecoGde(theuncompiledprogram)forvqariousprogramslgonyoursystem.9ThemostimpGortantthinghereis/usr/src/linux,`whichcontainslgtheUUsourcecoGdefortheLinuxkernel.$"/varlg/var8Choldsdirectoriesthatoftenchangeinsizeortendtogrow.Manyofthoselgdirectoriesusedtoresidein/usr,4butsincewearetryingtokeepitrelativelylgunchangeable,+the!UdirectoriesthatchangeoftenhavebGeenmovedto/var.`rSomeof\V(b{$"$"3.6.T9ypQesTofshellsBxu92KP덑lgthoseUUdirectoriesare:J$"/var/admlg/var/admKcontainsvqarious lesofinteresttothesystemadministrator,MspGeci cally lgsystemlogs,,whichrecordanyerrorsorproblemswiththesystem.rOther leslgrecord loginstothesystem,zaswellasfailedloginattempts.ThiswillbGecoveredlginUUChapter4.$"/var/spoollg/var/spoolcontains leswhicharetobGe\spooled"toanotherprogram. eF*orlgexample,ifyourmachineisconnectedtoanetwork,incomingmailwillbGestoredlginb/var/spool/mail,Nuntilyoureaditordeleteit.OutgoingorincomingnewslgarticlesUUmaybGefoundin/var/spool/news,andsoon.16ލ$"3.6IT=ypuesofshells׍$"AsIhavementionedtoGomanytimesbGefore,UNIXisamultitasking,multiuseropGeratingsystem.$"Multitaskingisvery3useful,ێandonceyougetusedtoit,you'lluseitallofthetime.Beforelong,$"you'llhbGeabletorunprogramsinthe\background",lswitchbGetweenmultipletasks,land\pipGeline"$"programsUUtogethertoachieveUUcomplicatedresultswithasinglecommand.ؼ3"Many!ofthefeatureswe'llbGecoveringinthissectionarefeaturesprovidedbytheshellitself.$"BecarefulnottoconfuseUNIXޫ(theactualopGeratingsystem)withtheshell|theshellisjustan$"interfaceOtotheunderlyingsystem.oTheshellprovidesagreatdealoffunctionalityontopofUNIX$"itself.3"Theshellisnotonlyaninterpreterforyourinteractivecommands,whichyoutypGeattheprompt.$"ItisalsoapGowerfulprogramminglanguage,.dwhichallowsyoutowriteshellscripts,.dto\batch"$"severalV^shellcommandstogetherina le.tMS-DOSVuserswillrecognizethesimilarityto\batch$" les".NgUse4ofshellscriptsisaverypGowerfultoGol,nwhichwillallowyoutoautomateandexpandyour$"usageUUofUNIX.SeeSection3.13.1formoreinformation.3"ThereuareseveraltypGesofshellsintheUNIXtworld.Thetwoma8jortypGesarethe\Bourne$"shell"andthe\Coshell".}YTheBourneshellusesacommandsyntaxliketheoriginalshellonearly$"UNIXUsystems,;suchuasSystemIGII.uThenameoftheBourneshellonmostUNIXsystemsis/bin/sh$"(whereͫshstandsfor\shell").DTheC͉shell(nottobGeconfusedwithseashell)usesadi erentsyntax,$"somewhatUUliketheprogramminglanguageC,andonmostUNIXsystemsisnamed/bin/csh.3"UnderLinux,thereareseveralvqariationsoftheseshellsavqailable.V Thetwomostcommonlyused$"areltheBourneAgainShell,ror\Bash"(/bin/bash),andTcsh(/bin/tcsh).Bashisaformofthe$"Bourne eshellwithmanyoftheadvqancedfeaturesfoundintheC 7shell.BecauseBashsuppGortsa$"supGersetoftheBourneshellsyntax, anyshellscriptswritteninthestandardBourneshellshould$"workxwithBash.UNIX)commandsgetinputfromwhatisknownasstandardtinputandsendtheiroutputto$"standardRoutput‰(oftenabbreviatedas\stdin"and\stdout").dY*ourshellsetsthingsupsothat$"standardUUinputisyourkeybGoard,andstandardoutputisthescreen.3"Here'stanexampleusingthecommandcat.$Normally*,;catreadsdatafromallofthe lenames$"givenUUonthecommandlineandsendsthisdatadirectlytostdout.qTherefore,usingthecommand4;="/home/larry/papers#catN"symbGol.eCHere'showit$"works.t="/home/larry/papers#sortN<>shopping-list="bananas="carrots="apples="ff#&P  ffctrl-D"Y ffffff#&P="/home/larry/papers#$"As youcansee,xtheresultofthesortcommandisn'tdisplayed,xinsteadit'ssavedtothe le$"shopping-list.qLet'sUUloGokatthis le.t="/home/larry/papers#catN le-list="/home/larry/papers#sortN<-r le-list="notes="masters-thesis="history-final="english-list="/home/larry/papers#lǍ$"Here,wesavedtheoutputoflsina le,andthenransort?-ronthat le.nHButthisisunwieldy$"andUUcausesustouseatempGorary letosaveUUthedatafromls.ؼ3"The6IsolutionistousepipQelining.gnPipGeliningisanotherfeatureoftheshellwhichallowsyouto$"connectastringofcommandsina\pipGe",)wherethestdoutofthe rstcommandissentdirectlyto$"the4Cstdinofthesecondcommand,:andsoon.fHere,wewishtosendthestdoutoflstothestdinof$"sort.qTheUU\|"symbGolisusedtocreateapipe:="/home/larry/papers#lsN99KP덍$"3.8.4MbNon-destructiveredirectionN$"UsingUU\>"toredirectoutputtoa leisdestructive:qinotherwords,thecommandؼ="/home/larry/papers#lsN<> le-list$"overwritesGthecontentsGofthe lefile-list.If,Cinstead,youGredirectwiththesymbGol\>>",Cthe $"outputUUwillbGeappendedtothenamed le,insteadofoverwritingUUit.="/home/larry/papers#lsN<>> le-list$"willUUappGendtheoutputofthelscommandtofile-list.ؼ3"JustbkeepinmindthatredirectionandusingpipGesarefeaturesprovidedbytheshell|theshell$"providesqthishandysyntaxusing\>"and\>>"and\|".2Ithasnothingtodowiththecommands$"themselves,UUbuttheshell.($"3.9IFileP=ermissions$"3.9.1MbConceptsof lep`ermissionsN$"BecausektherearemultipleusersonaUNIXksystem,qdinordertoprotectindividualuser's lesfrom$"tampGering|byotherusers,UNIX|providesamechanismknownas leLpQermissions.)Thismechanism$"allows) lesanddirectoriestobGe\owned"byaparticularuser.2dAsanexample,2bGecauseLarrycreated$"theUU lesinhishomedirectory*,Larryownsthose les,andhasaccesstothem.3"UNIXalsoallows lestobGesharedbetweenusersandgroupsofusers.iIfLarrysodesired,he$"couldcuto accesstohis les,suchthatnootherusercouldaccessthem.:?However,onmostsystems$"theUUdefaultistoallowotheruserstoreadyour les,butnotmoGdifyordeletetheminanyway*.3"Asi"explainedabGove,neveryi" leisownedbyaparticularuser..However,n lesarealsoownedbya$"particularGgroup,΄whichisasystem-de nedgroupofusers.Everyuserisplacedintoatleastone$"group4Fwhenthatuseriscreated.fHowever,:the4Fsystemadministratormayalsogranttheuseraccess$"toUUmorethanonegroup.3"Groups areusuallyde nedbythetypGeofuserswhichaccessthemachine.5F*orexample,ona$"universityUNIXsystem,usersmaybGeplacedintothegroupsstudent,staff,facultyorguest.$"Thereqarealsoafewsystem-de nedgroups(suchasbinandadmin)whichareusedbythesystem$"itselfUUtocontrolaccesstoresources|veryrarelydoactualusersbGelongtothesesystemgroups.3"Permissionsfallintothreemaindivisions: read,`write,andexecute.6ThesepGermissionsmaybGe$"grantedBtothreeclassesofusers:theownerofthe le,~thegrouptowhichthe lebGelongs,~andto$"allUUusers,regardlessofgroup.3"Read !pGermissionallowsausertoreadthecontentsofthe le,,orinthecaseofdirectories,tolist$"thecontentsofthedirectory(usingls).CW*ritepGermissionallowstheusertowritetoandmoGdifythe$" le.F*orødirectories,QwritepGermissionallowstheusertocreatenew lesordelete leswithinthatd(b{$"$"3.9.FileTP9ermissions5=100KP덑$"directory*.Finally,d?executeaCpGermissionallowstheusertorunthe leasaprogramorshellscript(if $"the0 lehappGenstobeaprogramorshellscript,8thatis).eF*ordirectories,havingexecutepGermission$"allowsUUtheusertocdintothedirectoryinquestion."X$"3.9.2MbInterpreting lep`ermissionsN$"Let'sloGokatanexampletodemonstrate lepermissions.GPUsingthelscommandwiththe-loption$"willUUdisplaya\long"listingofthe le,including lepGermissions.="/home/larry/foo#lsN<-lstu Ds="-rw-r--r--,1larryXusers*F505Mar1319:05stuffhJ="/home/larry/foo#:3"The rst eldprintedinthelistingrepresentsthe lepGermissions.Thethird eldistheowner$"ofthe le(larry),andthefourth eldisthegrouptowhichthe lebGelongs(users).Obviously*,$"theUUlast eldisthenameofthe le(stuff),andwe'llcovertheother eldslater.ؼ3"This`) leisownedbylarry,bandbGelongstothegroupusers.DLet'slookatthe lepermissions.$"Thestring-rw-r--r--lists, inorder,thepGermissionsgrantedtothe le'sowner, the le'sgroup,$"andUUeverybGodyelse.3"Theo rstcharacterofthepGermissionsstring(\-")representsthetypGeof le.Ao\-"justmeans$"thatthisisaregular le(asoppGosedtoadirectoryordevicedriver).THThenextthreeletters(\rw-")$"representjthepGermissionsgrantedtothe le'sowner,larry.X$The\r"standsfor\read"andthe\w"$"standsUUfor\write".qThus,larryhasreadandwritepGermissiontothe lestuff.3"As_,wementioned,bGesidesreadandwritepermission,thereisalso\execute"permission|$"represented^byan\x".However,Nthereisa\-"hereinplaceofthe\x",soLarrydoGesn'thave$"executedpGermissiononthis le..Thisis ne,(the lestuffisn'taprogramofanykind.Ofcourse,$"bGecauseLarryownsthe le,*MhemaygranthimselfexecutepGermissionforthe leifhesodesires.$"ThisUUwillbGecoveredUUshortly*.3"The*nextthreecharacters,_r--,represent*thegroup'spGermissionsonthe le.FThegroupwhich$"owns0this leisusers.LBecauseonlyan\r"appGearshere,gLanyuserwhichbGelongstothegroup$"usersUUmayreadthis le.3"Theqlastthreecharacters,)lalsor--,representthepGermissionsgrantedtoeveryotheruseronthe$"system (otherthantheownerofthe leandthoseinthegroupusers).\`Again,!bGecauseonlyan\r"$"isUUpresent,otherusersmayreadthe le,butnotwritetoitorexecuteit.3"HereUUaresomeotherexamplesofgrouppGermissions.N$"-rwxr-xr-xlgThe_ownerofthe lemayread,]write,and_executethe le.H Usersinthe le'sgroup,lgandUUallotherusers,mayreadandexecutethe le.J$"-rw-------lgThe$cownerofthe lemayreadandwritethe le.awNootherusercanaccessthe le.$"-rwxrwxrwxlgAllUUusersmayread,write,andexecutethe le.e(b{$"$"3.9.FileTP9ermissions5=101KP덍$"3.9.3MbDep`endenciesN$"ItYfisimpGortanttonotethatthepermissionsgrantedtoa lealsodependonthepermissionsofthe $"directory inwhichthe leisloGcated.F*orexample,7evenifa leissetto-rwxrwxrwx,7otherusers$"cannot Uaccessthe leunlesstheyhave Ureadandexecuteaccesstothedirectoryinwhichthe le$"is,(loGcated.@F*orexample,aifLarrywanted,(torestrictaccesstoallofhis les,hecouldsimplyset$"thebpGermissionsonhishomedirectory/home/larryto-rwx------.Inthisway*,enobotheruserhas$"access]tohisdirectory*,)\andall lesanddirectorieswithinit._uLarrydoGesn'tneedtoworryaboutthe$"individualUUpGermissionsoneachofhis les.ؼ3"Inotherwords,$toaccessa leatall,youmusthaveexecuteaccesstoalldirectoriesalongthe$" le'sUUpathname,andread(orexecute)accesstothe leitself.3"Usually*,7users onaUNIX systemareveryopGenwiththeir les.aTheusualsetofpermissions$"givento lesis-rw-r--r--,whichwillallowotheruserstoreadthe le,butnotchangeitinany$"way*.~TheusualsetofpGermissionsgiventodirectoriesis-rwxr-xr-x,Qwhichwillallowotherusers$"toUUloGokthroughyourdirectories,butnotcreateordelete leswithinthem.3"However,IsmanyFzuserswishtokeepotherusersoutoftheir les.lSettingthepGermissionsofa le$"to~-rw-------willnotallowanyotherusertoaccessthe le.Likewise,settingthepGermissionsof$"aUUdirectoryto-rwx------willkeepotherusersoutofthedirectoryinquestion."Ė$"3.9.4MbChangingp`ermissionsN$"ThecommandchmodisusedtosetthepGermissionsona le.>GOnlytheownerofa lemaychange$"theUUpGermissionsonthat le.qThesyntaxofchmodis:6|="chmodfa,u,g,ogf+,-gfr,w,xghM lenamesi6{3"Brie y*,`wyou^=supplyoneormoreofall,user,group,orother.ThenyouspGecifywhetheryouare$"adding%rights(+)ortakingthemaway(-).Finally*,YyouspGecifyoneormoreofread,Ywrite,and$"execute.qSomeUUexamplesoflegalcommandsare:倍$"chmod?a+rstufflgGivesUUallusersreadaccesstothe le.J$"chmod?+rstufflgSameUUasabGove|ifUUnoneofa,u,g,oroisspeci ed,aisassumed.$"chmod?og-xstufflgRemoveUUexecutepGermissionfromusersotherthantheowner.$"chmod?u+rwxstufflgAllowUUtheownerofthe letoread,write,andexecutethe le.$"chmod?o-rwxstufflgRemoveread,write,andexecutepGermissionfromusersotherthantheownerandlgusersUUinthe le'sgroup.f3(b{$"$"3.10.ManagingT lelinks"Q102KP덍$"3.10R"yManaging lelinks׍$"Linksiallowyoutogiveasingle lemultiplenames. Filesareactuallyidenti edtothesystem $"bytheirinoQdeCn9umber,͊whichisjusttheunique lesystemidenti erforthe le^3|s.EAfdirectoryis$"actuallyalistingofinoGdenumberswiththeircorresponding lenames.\Each lenameinadirectory$"isUUalinktoaparticularinoGde.#$"3.10.1T"HardlinksN$"Thelncommandisusedtocreatemultiplelinksforone le. F*orexample,let'ssaythatyouhave$"theUU lefooinadirectory*.qUsingls?-i,wecanloGokattheinodenumberUUforthis le.ؼ="#lsN<-ifoo="22192foo="#$"Here,ther lefoohasaninoGdenumberrof22192inthe lesystem.W*ecancreateanotherlinkto$"foo,UUnamedbar:="#lnN+Ifyoumakechangestofoo,ythosechanges$"willUUbGemadetobaraswell.qF*orallpurposes,fooandbararethesame le.ؼ3"Theselinksareknownashar}'dlinksdbGecausetheydirectlycreatealinktoaninode.0Notethatyou$"canbonlyhard-link lesonthesame lesystem;^symbGoliclinks(seebelow)don'thavethisrestriction.3"When9youdeletea lewithrm,youareactuallyonlydeletingonelinktoa le.:tIfyouusethe$"commandؼ="#rmNfoo="-rw-r--r--,1rootroot/?12Aug s,516:50foo="#3"ThepGermissionbitsonasymboliclinkarenotused(theyalwaysappearasrwxrwxrwx)./dev/null&="/home/larry#$"Sure^enough,thereitis.Y*oucouldalsousethepscommandasdemonstratedabGove^tocheck^on$"theUUstatusofthejob.ؼ3"T*oterminatethejob,#usethecommandkill.aThiscommandtakeseitherajobnumbGerora$"proGcessUUIDnumberUUasanargument.qThiswasjobnumbGer1,sousingthecommand="/home/larry#kilxlN<%1$"will.killthejob.dWhenidentifyingthejobwiththejobnumbGer,5youmustpre xthenumbGerwitha$"pGercentUU(\%")character.ؼ3"NowUUthatwe'vekilledthejob,wecanusejobsagaintocheckonit:卑="/home/larry#jobs=="[1]+ s,TerminatedB&4yes>/dev/null="/home/larry#kƠ(b{$"$"3.11.JobTCon9trolE׸107KP덑$"TheUUjobisinfactdead,andifweusethejobscommandagainnothingshouldbGeprinted.ؼ3"Y*ou`canalsokillthejobusingtheproGcessIDI(PID)number, which`isprintedalongwiththejob $"IDUUwhenyoustartthejob.qInourexample,theproGcessIDis164,sothecommandؼ="/home/larry#kilxlN<164$"isUUequivqalentto="/home/larry#kilxlN<%1$"Y*ouUUdon'tneedtousethe\%"whenreferringtoajobbyitsproGcessID.#$"3.11.4T"StoppingandrestartingjobsN$"There/dev/nulxl$"Again,UUbGecauseyesisrunningintheforeground,youshouldn'tgetyourshellpromptback.3"Now,6instead=ofinterruptingthejobwithff#&P  ffctrl-C"Y ffffff#&P',6we'llsusp}'endthejob.~SuspGendingajob $"doGesn'tkillit:Qitonlytemporarilystopsthejobuntilyourestartit.\T*odothis,"tyouhitthesuspGend$"key*,UUwhichisusuallyff#&P  ffctrl-Z"Y ffffff#&P&{.ؼ="/home/larry#yesN<>/dev/nulxl="ff#&P  ffctrl-Z"Y ffffff#&P="[1]+ s,StoppedPRyes>/dev/null="/home/larry#$"WhilethejobissuspGended, it'ssimplynotrunning.)NoCPUtimeisusedforthejob.However,$"youcanrestartthejob,whichwillcausethejobtorunagainasifnothingeverhappGened.cItwill$"continueUUtorunwhereitlefto .ؼ3"T*oUUrestartthejobintheforeground,usethecommandfg(for\foreground").="/home/larry#fg="yes>/dev/null$"The:shellprintsthenameofthecommandagainsoyou'reawareofwhichjobyoujustputintothe$"foreground.Stop}Sthejobagain,Rwithff#&P  ffctrl-Z"Y ffffff#&P&.Thistime,Rusethecommandbgtoputthejobinto$"thenbackground.uThiswillcausethecommandtorunjustasifyoustartedthecommandwith\&"$"asUUinthelastsection.lS(b{$"$"3.11.JobTCon9trolE׸108KP덑="/home/larry#bg ="[1]+yes>/dev/null&="/home/larry#$"Andbwehaveourpromptback."jobsshouldrepGortthatyesisindeedrunning,f&andwecankillthe$"jobUUwithkillaswedidbGefore.ؼ3"Howcanwestopthejobagain?:Usingff#&P  ffctrl-Z"Y ffffff#&P(Rwon'twork,bGecausethejobisinthebackground.$"They!answeristoputthejobintheforeground,withfg,andthenstopit.+Asitturnsoutyoucan$"useUUfgoneitherstoppGedjobsorjobsinthebackground.3"Thereisabigdi erencebGetweenajobinthebackgroundandajobwhichisstoppGed.PA}stopped$"job!isnotrunning|it'snotusinganyCPU!time,,3andit'snotdoinganywork(thejobstilloGccupies$"system#memory*,-althoughitmaybGeswappGedouttodisk).aA"jobinthebackgroundisrunning,-and$"using6memory*,nCaswellascompletingsometaskwhileyoudootherwork.However,nCajobinthe$"backgroundomaytrytodisplaytextontoyourterminal,unwhichcanbGeannoyingifyou'retryingto$"workUUonsomethingelse.qF*orexample,ifyouusedthecommand="/home/larry#yesN<&$"without|redirectingstdoutto/dev/null,astreamofy'swouldbGeprintedtoyourscreen,without $"anyRwayofinterruptingit(youcan'tuseff#&P  ffctrl-C"Y ffffff#&P)ˬtointerruptjobsinthebackground).pInorderto$"stopRtheendlessy's,&you'dhavetousethefgcommand,&tobringthejobtotheforeground,and$"thenUUuseff#&P  ffctrl-C"Y ffffff#&P)tokillit.3"AnotherBKnote.knThefgandbgcommandsnormallyforegroundorbackgroundthejobwhichwas$"lastbstoppGed(indicatedbya\+"nexttothejobnumbGerwhenyouusethecommandjobs).Ifyou$"arerunningmultiplejobsatonce,youcanforegroundorbackgroundaspGeci cjobbygivingthejob$"IDUUasanargumenttofgorbg,asin="/home/larry#fgN<%2$"(toUUforegroundjobnumbGerUU2),or="/home/larry#bgN<%3$"(toUUbackgroundjobnumbGer3).qY*oucan'tuseprocessIDnumbersUUwithfgorbg.3"F*urthermore,UUusingthejobnumbGerUUalone,asin="/home/larry#%2$"isUUequivqalentto="/home/larry#fgN<%23"JusthremembGerthatusingjobcontrolisafeatureoftheshell.Thecommandsfg,mbgandjobs $"are|internaltotheshell.OIfforsomereasonyouuseashellwhichdoGesnotsupportjobcontrol,don't$"expGectUUto ndthesecommandsavqailable.m(b{$"$"3.12.UsingTtheviEditorn109KP덑3"Inuaddition,|therearesomeaspGectsofjobcontrolwhichdi erbGetweenBashandTcsh.Infact, $"some+shellsdon'tprovidejobcontrolatall|however,mostshellsavqailableforLinuxsuppGortjob$"control.($"3.12R"yUsingtheN@(towritethe leandquitvi),Bor\q!"j(toquitviwithoutsavingchanges).jLastlinemoGdeisn*(b{$"$"3.12.UsingTtheviEditorn110KP덑$"generallyusedforvicommandswhicharelongerthanonecharacter. MInlastlinemoGde, youenter $"aUUsingle-linecommandandpressffl o offenter offffffl%dtoexecuteit.#$"3.12.2T"Starting1߆T cmtt12viN$"Thef]bGestwayf]tounderstandtheseconceptsistoactually reupviandedita le.Intheexample$"\screens"bGelow,)we'reonlygoingtoshowafewlinesoftext,)asifthescreenwasonlysixlineshigh$"(insteadUUoftwenty-four).ؼ3"TheUUsyntaxforviisؼ="vihM lenamei$"whereUUh lenameiisthenameofthe lethatyouwishtoedit.3"StartUUupvibytyping="/home/larry#viN="JffaW}lW}lffցJځI~fe =~~~~~"test"[Newfile]`嶄W}lffffffa?3"TheUUcolumnof\~"charactersindicatesthatyouaretheendofthe le.#$"3.12.3T"InsertingtextN$"Y*ouaarenowincommandmoGde;ginordertoinserttextintothe le,dpressff b  ffi ffffff bI(whichwillplaceyou $"intoUUinsertmoGde),andbegintyping.8j="ئhffaJ30J30ff&h&gNowisthetimeforallgoodmentocometotheaidoftheparty.fe =~~~~~`嶄J30ffffffa9{3"Whileinsertingtext,youmaytypGeasmanylinesasyouwish(pressingff#&P o offreturn"Y offffff#&P*aftereach,of$"course),UUandyoumaycorrectmistakesusingthebackspacekey*.3"T*oUUendinsertmoGde,andreturntocommandmode,press ff ffesc,„ ffffffN.o;F(b{$"$"3.12.UsingTtheviEditorn111KP덑3"WhileincommandmoGde,*youcanusethearrowkeystomovearoundthe le._Here,*bGecausewe $"onlyNBhaveonelineoftext,Otryingtousetheup-ordown-arrowkeyswillprobablycausevitobGeep$"atUUyou.ؼ3"There[areseveralwaystoinserttext,otherthanusingtheicommand.F*orexample,thea$"commandinsertstextbGeginningafterXthecurrentcursorposition,insteadofonthecurrentcursor$"pGosition.F*or example,:usetheleftarrowkeytomovethecursorbGetweenthewords\goGod" and$"\men".5ꦍ="ئhffaJ30J30ff&h&gNowisthetimeforallgoodfementocometotheaidoftheparty. =~~~~~`嶄J30ffffffa8 $"PressUU ff b ffa ffffff b۷,UUtostartinsertmoGde,type\wo",andthenhit ff ffesc,„ ffffff8toreturntocommandmode.9Q ="ئhffaJ30J30ff&h&gNowisthetimeforallgoodwomfeentocometotheaidoftheparty. =~~~~~`嶄J30ffffffa8\m3"T*oÆbGegininsertingtextatthelinebelowthecurrentone,usetheocommand.A-F*orexample,press$" ff b ffo ffffff b2FandUUtypGeanotherlineortwo:="ئhffaJ30J30ff&h&gNowisthetimeforallgoodwomentocometotheaidoftheparty. =Afterwards,we'llgooutforpizzaandbeer.fe~~~~`嶄J30ffffffa8ꦍ3"JustȬremembGerthatatanytimeyou'reeitherincommandmoGde(wherecommandssuchasi,$"a,orXoarevqalid),orininsertmoGde(whereyou'reinsertingtext,followedXby ff ffesc,„ ffffff4toreturnto$"commandmoGde),morlastlinemode(whereyou'reenteringextendedcommands,masdiscussedbGelow).#$"3.12.4T"DeletingtextN$"F*romcommandmoGde,thexcommanddeletesthecharacterunderthecursor.Ifyoupress ff b ffx ffffff b ve$"times,UUyou'llendupwith:pD:(b{$"$"3.12.UsingTtheviEditorn112K鍍="ئhffaJ30J30ff&h&gNowisthetimeforallgoodwomentocometotheaidoftheparty. =Afterwards,we'llgooutforpizzaandfe~~~~`嶄J30ffffffa8⍑$"NowUUpress ff b ffa ffffff b۷,insertsometext,followedby ff ffesc,„ ffffffN:9-㍍="ئhffaJ30J30ff&h&gNowisthetimeforallgoodwomentocometotheaidoftheparty. =Afterwards,we'llgooutforpizzaandDietCoke.fe~~~~`嶄J30ffffffa:-⍑3"Y*ou%candeleteentirelinesusingthecommanddd(thatis,Ypressff b  ffd ffffff btwiceinarow).Ifyour $"cursorUUisonthesecondline,andyoutypGedd,7D="ئhffaJ30J30ff&h&gNfeowisthetimeforallgoodwomentocometotheaidoftheparty. =~~~~~`嶄J30ffffffa89D3"T*o=deletethewordwhichthecursorison,usethedwcommand.R~Placethecursorontheword$"\goGod",UUandtypGedw.="ئhffaJ30J30ff&h&gNowisthetimeforallwfe s,omentocometotheaidoftheparty. =~~~~~`嶄J30ffffffaGu$"3.12.5T"ChangingtextN$"Y*oucanreplacesectionsoftextusingtheRicommand.=Placethecursoronthe rstletterin\party",$"pressUUff b  ffR ffffff b۷,UUandtypGetheword\hungry".9-㍍="ئhffaJ30J30ff&h&gNowisthetimeforallwomentocometotheaidofthehungry.fe =~~~~~`嶄J30ffffffaqN(b{$"$"3.12.UsingTtheviEditorn113KP덑$"Using`R`toedittextismuch`liketheiandacommands,bbutR`overwritestext,binsteadofinserting $"it.ؼ3"The rcommandreplacesthesinglecharacterunderthecursor.XF*orexample,movethecursorto$"theUUbGeginningoftheword\Now",andtypGerfollowedbyC,you'llhave:7m="ئhffaJ30J30ff&h&gCfeowisthetimeforallwomentocometotheaidofthehungry. =~~~~~`嶄J30ffffffa8\m3"The&\~"commandchangesthecaseoftheletterunderthecursorfromuppGer-tolower-case,0and$"viseversa,qF*orexample,ifyouplacethecursoronthe\o"in\Cow",qabGove,andrepGeatedlypress$"ff b  ff~ ffffff b/,UUyou'llendupwith:9Q ="ئhffaJ30J30ff&h&gCOWISTHETIMEFORALLWOMENTOCOMETOTHEAIDOFTHEHUNGRY.fe =~~~~~`嶄J30ffffffaG0$"3.12.6T"MovingcommandsN$"Y*ousalreadyknowhowtousethearrowkeystomovearoundthedoGcument.h Inaddition,youcan$"usetheh,1j,k,andlcommandstomovethecursorleft,1down,up,andright,respGectively*.This$"comesUUinhandywhen(forsomereason)yourarrowkeysaren'tworkingcorrectly*.3"ThezwcommandmoveszthecursortothebGeginningofthenextword; othebmovesittothe$"bGeginningUUofthepreviousword.3"TheE0(that'sazero)commandmovesEthecursortothebGeginningofthecurrentline,Handthe$$"commandUUmovesittotheendoftheline.3"When/editinglarge les,7you'llwanttomoveforwardsorbackwardsthroughthe leascreenfulat$"aRtime.pPressingff#&P  ffctrl-F"Y ffffff#&P)vmovesRthecursoronescreenfulforward,Randff#&P  ffctrl-B"Y ffffff#&PmovesRitascreenful$"back.3"Inordertomovethecursortotheendofthe le, typGeG.Y*oucanalsomovetoanarbitraryline;$"forb&example,eZtypingthecommand10Gb#wouldmovethecursortoline10inthe le.:T*omovetothe$"bGeginningUUofthe le,use1G.3"Y*ou&6cancouplemovingcommandswithothercommands,Znsuchasdeletion.kF*orexample,Znthe$"commandXMd$willdeleteeverythingfromthecursortotheendoftheline;YdGXLwilldeleteeverything$"fromUUthecursortotheendofthe le,andsoon.rW(b{$"$"3.12.UsingTtheviEditorn114KP덍$"3.12.7T"Saving lesandquittingviN$"T*oYquitviwithoutmakingchangestothe le,Zusethecommand:q!.~WhenyoutypGethe\:",Zthe $"cursorUUwillmoveUUtothelastlineonthescreen;you'llbGeinlastlinemode.<="aMffaXfXfffMLCOWISTHETIMEFORALLWOMENTOCOMETOTHEAIDOFTHEHUNGRY. =~~~~~:fe`嶄Xfffffffa<$"InLlastlinemoGde,certainextendedcommandsareavqailable.XOneofthemisq!,whichquitsvi$"withoutsaving. 7Thecommand:wqsavesthe leandthenexitsvi. 7ThecommandZZC(from$"commandJmoGde,withoutthe\:").isequivqalentto:wq.ERemembGerthatyoumustpressffl o offenter offffffl$ Nafter$"aUUcommandenteredinlastlinemoGde.ؼ3"T*oUUsavethe lewithoutquittingvi,justuse:w."w?$"3.12.8T"Editinganother le$"T*oweditanother le,rusethe:ecommand.Forexample,rtostopeditingtest,andeditthe lefoo$"instead,UUusethecommand<="aMffaXfXfffMLCOWISTHETIMEFORALLWOMENTOCOMETOTHEAIDOFTHEHUNGRY. =~~~~~:efoofe`嶄Xfffffffa<$"IfUUyouuse:ewithoutsavingthe le rst,you'llgettheerrormessage7="ffa@@ff Nowritesincelastchange(":edit!"overrides)`嶄@ffffffa$"whichsimplymeansthatvidoGesn'twanttoeditanother leuntilyousavethe rstone.LAtthis $"pGoint,UUyoucanuse:wtosavetheoriginal le,andthenuse:e,oryoucanusethecommand="aMffaXfXfffMLCOWISTHETIMEFORALLWOMENTOCOMETOTHEAIDOFTHEHUNGRY. =~~~~~:e! s,foofe`嶄Xfffffffa<$"TheUU\!"qtellsvithatyoureallymeanit|editthenew lewithoutsavingchangestothe rst.sd (b{$"$"3.12.UsingTtheviEditorn115KP덍$"3.12.9T"Includingother lesN$"If.youusethe:rcommand,e-youcanincludethecontentsofanother leinthecurrent le.5F*or $"example,UUthecommand`=":rfoo.txt$"wouldUUinsertthecontentsofthe lefoo.txtinthetextatthecurrentcursorloGcation.#$"3.12.10ZRunningshellcommands$"Y*ou\canalsorunshellcommandsfromwithinvi.EThe:r!commandworkslike:r,]butinstead $"ofsreadinga le,:itinsertstheoutputofthegivencommandintothebu eratthecurrentcursor$"loGcation.qF*orUUexample,ifyouusethecommand`=":r! s,ls-F$"you'llUUendupwith7="ئhffaJ30J30ff&h&gCOWISTHETIMEFORALLWOMENTOCOMETOTHEAIDOFTHEHUNGRY. =letters/misc/papers/Yfe~~`嶄J30ffffffa8N3"Y*ou\canalso\shellout"ofvi,inotherwords,runacommandfromwithinvi,andreturnto $"theUUeditorwhenyou'redone.qF*orexample,ifyouusethecommand=":! s,ls-F$"the-\ls?-F-RcommandwillbGeexecuted,5[andtheresultsdisplayed-\onthescreen,butnotinsertedinto$"theUU lewhichyou'reediting.qIfyouusethecommand=":shell$"viwillstartaninstanceoftheshell,allowingyoutotempGorarilyputvi\onhold"whileyouexecute$"otherUUcommands.qJustlogoutoftheshell(usingtheexitcommand)toreturntovi.#$"3.12.11ZGettinghelpN$"vi\doGesn'tprovidemuchinthewayofinteractivehelp(mostUNIXIprogramsdon't),butyoucan$"alwaysreadthemanpageforvi.Fviisavisualfront-endtotheexeditor;itisexwhichhandles$"many-ofthelast-linemoGdecommandsinvi.dVSo,5inadditiontoreadingthemanpageforvi,seeex$"asUUwell.tmȠ(b{$"$"3.13.CustomizingTy9ourEnvironmentF116KP덍$"3.13R"yCustomizingy=ourEnvironment׍$"TheU{shellprovidesmanymechanismstocustomizeyourworkenvironment.r:Aswe'vementioned $"bGefore,XtheWyshellismorethanacommandinterpreter|itisalsoapowerfulWyprogramminglanguage.$"Whilewritingshellscriptsisanextensivesub8ject,we'dliketointroGduceyoutosomeoftheways$"thatUUyoucansimplifyyourworkonaUNIXsystembyusingtheseadvqancedfeaturesoftheshell.ؼ3"As *wehavementionedbGefore,di erentshellsusedi erentsyntaxeswhenexecutingshellscripts.$"F*or0)example,fTcshusesaC-likesyntax,fwhileBourneshellsuseanothertypGeofsyntax.CInthis$"section,3*we*won'tbGerunningintomanyofthedi erencesbGetweenthetwo,3*butwewillassumethat$"shellUUscriptsareexecutedusingtheBourneshellsyntax.#$"3.13.1T"ShellscriptsN$"Let's[saythatyouuseaseriesofcommandsoften,Zandwouldliketoshortentheamountofrequired$"typingUUbygroupingallofthemtogetherintoasingle\command".qF*orexample,thecommandsؼ="/home/larry#catNbook="/home/larry#wcN<-lbook="/home/larry#lpNsetthepromptbacktoourusual(whichcontainsthecurrentworkingdirectoryfollowedbya$"\#"UUsymbGol),="Yourcommand,please: s,PS1=\\w#"="/home/larry#$"TheUUbashmanpagedescribGesthesyntaxusedforsettingtheprompt. 򍍑$"3.13.2.1UTheTPATHen9vironmentTv\rariableN$"Whenyouusethelscommand,howdoGestheshell ndthelsexecutableitself?EInfact,lsisfound$"in/bin/lsonmostsystems.MTheshellusestheenvironmentvqariablePATHtoloGcateexecutable les$"forUUcommandswhichyoutypGe.ؼ3"F*orUUexample,yourPATHvqariablemaybGesetto:="/bin:/usr/bin:/usr/local/bin:.$"This=#isalistofdirectoriesfortheshelltosearch,Aeach=#directoryseparatedbya\:".iWhenyouuse$"theUUcommandls,theshell rstloGoksfor/bin/ls,then/usr/bin/ls,andsoon.ؼ3"Note>/thatthePATH=hasnothingtodowith ndingregular les.,TF*orexample,xeifyouusethe$"command="/home/larry#cpNthemselves.FilepGermissionsonthesystemarearrangedsuchthatnormalusersaren'tallowed$"to} deleteormoGdify lesindirectoriessharedbyallusers(suchas/binand/usr/bin.(Mostusers$"alsoqprotecttheirown leswiththeappropriate lepGermissionssothatotheruserscan'taccessor$"moGdifyUUthose les.3"Therearenosuchrestrictionsonroot. Theuserrootcanread,moGdify*,ordeleteany leonq121z(b{$"$"4.1.4AbQoutTRoot,Hats,andtheF eelingofP9ower_122KP덑$"thesystem,&pchangepGermissionsandownershipsonany le,&pandrunspGecialprograms,suchasthose $"whichpartitionthedriveorcreate lesystems.OThebasicideaisthatthepGersonorpersonswhorun$"andtakecareofthesystemlogsinasrootwheneveritisnecessarytopGerformtasksthatcannot$"bGe-3executedasanormaluser.dfBecauserootcandoanything,5:itiseasytomakemistakesthathave$"catastrophicUUconsequenceswhenloggedinusingthisaccount.ؼ3"F*orexample,*asanormaluser,ifyouinadvertentlyattempttodeleteallofthe lesin/etc,*the$"systemgwillnotpGermityoutodoso.However,lCwhenloggedinasroot,thesystemwon'tcomplain$"atlall. Itisveryeasytotrashyoursystemwhenusingroot. ThebGestwaytopreventaccidentsis$"to:Rۍ3"="Sit6WonyourhandsbGeforeyoupressff#&P o offreturn"Y offffff#&P+onacommandwhichmaycausedamage.F*or="example,9if you'reabGouttocleanoutadirectory*,bGeforehittingff#&P o offreturn"Y offffff#&P'1,re-readtheentire="commandUUandmakesurethatitiscorrect.k$3"="Don'tgetaccustomedtousingroot./Themorecomfortableyouareintheroleoftheroot="user,the{morelikelyyouaretoconfuseyourprivilegeswiththoseofanormaluser.P9F*or="example,youȼmightthinkIthatyou'reloggedinaslarry,whenyou'rereallyloggedinasroot.3"="Useadi erentpromptfortherootaccount.:Y*oushouldchangeroot's.bashrcor.login=" letosettheshellprompttosomethingotherthanyourregularuserprompt.kF*orexample,="many pGeopleusethecharacter\$"inpromptsforregularusers,-andreservethecharacter\#"="forUUtherootuserprompt.3"="Only loginasrootwhenabsolutelynecessary*.YXAnd,assoGonasyou're nishedwithyourwork="asDroot,Gylogout.lThelessyouusetherootaccount,Gythelesslikelyyou'llbGetododamageon="yourUUsystem.Rۍ$"Ofcourse,NthereisabreedofUNIXhackersouttherewhouserootforvirtuallyeverything.But$"everyoneofthemhas,'atsomepGoint,'madeasillymistakeasrootandtrashedthesystem.The$"general&ruleis,0?untilyou'refamiliarwiththelackofrestrictionsonroot,0?andarecomfortableusing$"theUUsystemwithoutsuchrestrictions,loginasrootsparingly*.ؼ3"Of@qcourse,Deveryonemakesmistakes.jLinusT*orvqaldshimselfonceaccidentallydeletedtheentire$"kernelupdirectorytreeonhissystem.'&Hoursofworkwerelostforever.'&F*ortunately,7however,bGecauseupof$"hisfknowledgeofthe lesystemcoGde,hewasabletorebGootfthesystemandreconstructthedirectory$"treeUUbyhandondisk.3"Put~anotherway*, Cif~youpictureusingtherootaccountaswearingaspGecialmagichatthatgives$"youlotsofpGower,@sothatyoucan,@bywavingyourhand,@destroyentirecities,@itisagoGodideatobGe$"aץbitcarefulabGoutwhatyoudowithyourhands.GSinceitiseasytomoveyourhandinadestructive$"way7byaccident,pitisnotagoGodideatowearthemagichatwhenitisnotneeded,pdespitethe$"wonderfulUUfeeling."$"4.1.2MbAbusingthesystemN$"AlongwiththefeelingofpGowercomesthetendencytodoharm.Thisisoneofthegreyareasof$"UNIXOsystem{administration,(buteveryone{goGesthroughitatsomepointintime.m9Mostusersof{6(b{$"$"4.1.4AbQoutTRoot,Hats,andtheF eelingofP9ower_123KP덑$"UNIX.systemsYneverhavetheabilitytowieldthispGower|onuniversityandbusinessUNIX.systems, $"only(thehighly-paidandhighly-quali edsystemadministratorseverloginasroot.OInfact,atmany$"such>institutions,8therootpasswordisahighlyguardedsecret:itistreatedastheHolyGrailof$"the#institution.0AlargeamountofhubbubismadeabGoutlogginginasroot;itisportrayed#asa$"wiseUUandfearsomepGower,UUgivenonlytoanexclusivecabal.ؼ3"Thist~kindofattitudetowardst~therootaccountis,|Hquitesimply*,thekindofthingwhichbreeds$"malice\andcontempt.PtBecauserootisso u ed-up,Zwhensomeusershavetheir rstoppGortunityto$"loginnasroot(eitheronaLinuxsystemorelsewhere),t+thetendencyistouseroot'sprivilegesina$"harmfulmanner.TWIhaveknownso-called\systemadministrators"whoreadotheruser'smail,delete$"user'sUU leswithoutwarning,andgenerallybGehavelikechildrenwhengivensuchapGowerful\toy".3"Because[roothassuchprivilegeonthesystem,ittakesacertainamountofmaturityandself-$"controlqtousetheaccountasitwasintended|torunthesystem.ThereisanunspGokencoGdeof$"honor~ZwhichexistsbGetweenthesystemadministratorandtheusersonthesystem.Howwould$"youǟfeelifyoursystemadministratorwasreadingyoure-mailorloGokingoveryour les?ȥThereis$"stillnostronglegalprecedentforelectronicprivqacyontime-sharingcomputersystems.OnUNIX$"systems,<=the5rootuserhastheabilitytoforegoallsecurityandprivqacymechanismsonthesystem.$"ItbisimpGortantthatthesystemadministratordevelopatrustingrelationshipwiththeusersonthe$"system.qIUUcan'tstressthatenough.#$"4.1.3MbDealingwithusersN$"UNIXsecurityisratherlaxbydesign.SSecurityonthesystemwasanafterthought|thesystemwas$"originally?developGedinanenvironmentwhereusersintrudingupGonotheruserswassimplyunheard$"of.|Because7ofthis,pevenwithsecuritymeasures,pthereisstilltheabilityfornormaluserstodo$"harm.3"System administratorscantaketwostanceswhendealingwithabusiveusers:LtheycanbGeeither$"paranoid`ortrusting.Theparanoidsystemadministratorusuallycausesmoreharmthanheorshe$"prevents.=UOneofmyfavoritesayingsis,v\NeverattributetomaliceanythingwhichcanbGeattributed$"towmstupidity*."Putanotherway*,mostusersdon'thavetheabilityorknowledgetodorealharmon$"theq1system.[90%ofthetime,x(whenauseriscausingtroubleonthesystem(by*,forinstance, lling$"upi]theuserpartitionwithlarge les,n_orrunningmultipleinstancesofalargeprogram),theuseris$"simplysunawarethatwhatheorsheisdoingisaproblem.4"IMhavecomedownonuserswhowere$"causingUUagreatdealoftrouble,buttheyweresimplyactingoutofignorance|notmalice.3"WhenyoudealwithuserswhoarecausingpGotentialtrouble,Jdon'tbGeaccusative.Theoldrule$"of3\innoGcentuntilprovenguilty"stillholds.NgItisbGesttosimplytalktotheuser,mandquestionabout$"theOtrouble,insteadofcausingaconfrontation.BThelastthingyouwanttodoisbGeontheuser'sbad$"side.%dThiswillraisealotofsuspicionabGoutyou|thesystemadministrator|runningthesystem$"correctly*.aIf%kauserbGelievesthatyoudistrustordislikethem,/theymightaccuseyouofdeleting les$"orYbreachingprivqacyonthesystem. ThisiscertainlynotthekindofpGositionthatyouwanttobGe$"in.3"If!dyoudo ndthatauserhasbGeenattemptingto\crack"thesystem,+orwasintentionallydoing$"harmOtothesystem, don'treturnthemaliciousbGehaviorwithmaliceofyourown.Instead, simply|B(b{$"$"4.2.4BoQotingTtheSystemO124KP덑$"provide%awarning|butbGe exible.SbInmanycases, byoumaycatchauser\intheact"ofdoingharm $"tothesystem|givethemawarning.RT*ellthemnottoletithappGenagain.However, ifyoudovcatch$"themܩcausingharmagain,~bGeabsolutelysurethatitisintentional.I܇can'tܩevenbGegintodescribe$"thenumbGerofcaseswhereitappearedasthoughauserwascausingtrouble, -wheninfactitwas$"eitherUUanaccidentorafaultofmyown.#$"4.1.4MbSettingtherulesN$"TheubGestwayutorunasystemisnotwithaniron st.OThatmaybehowyourunthemilitary*,}but$"UNIXyPwasyZnotdesignedforsuchdiscipline.Itmakessensetolaydownasimpleand exiblesetof$"guidelinesforusers|butremembGer,thefewerrulesyouhave,thelesschancethereisofbreaking$"them.QdEvenifyourrulesforusingthesystemarepGerfectlyreasonableandclear,userswillalways$"attimesbreaktheseruleswithoutintendingto.yThisisespGeciallytrueinthecaseofnewUNIX$"users,whoarejustlearningtheropGesofthesystem.8It'snotpatentlyobvious,forexample,that$"youshouldn'tdownloadagigabyteof lesandmailthemtoeveryoneonthesystem./Usersneed$"helpUUunderstandingtherules,andwhytheyarethere.ؼ3"IfyoudospGecifyusageguidelinesforyoursystem,makesurethatthereasonbGehindaparticular$"guideline ismadeclear.Y_Ifyoudon't,thenuserswill ndallsortsofcreativewaystogetaroundthe$"rule,UUandnotknowthattheyareinfactbreakingit.$"4.1.5MbWhatitallmeansN$"W*eucan'ttellyouhowtorunyoursystemtothelastdetail.(MostofthephilosophydepGendson$"howuyou'reusingthesystem.^'Ifyouhavemanyusers,"}thingsaremuchdi erentthanifyouonly$"have&Cafewusers,/orifyou'retheonlyuseronthesystem.bHowever,/it'salwaysagoGod&Cidea|inany$"situation|toUUunderstandwhatbGeingthesystemadministratorreallymeans.ؼ3"BeingthesystemadministratordoGesn'tmakeyouaUNIXwizard.Therearemanysystem$"adminsouttherewhoknowverylittleabGoutUNIX.Likewise,}therearemany\normal"usersout$"therewhoknowmoreabGoutUNIXthananysystemadministratorcould.5Also,bGeingthesystem$"administrator҇doGesnotallowyoutousemaliceagainstyourusers.]JustbGecausethesystemgives$"youUUtheprivilegetomesswithuser lesdoGesnotmeanthatyouhaveanyrighttodoso.3"Lastly*,\KbGeingZthesystemadministratorisreallynotabigdeal.|Itdoesn'tmatterifyoursystem$"is$alittle386oraCraysupGercomputer.4Runningthesystemisthesame,regardless.Knowingthe$"rootipasswordisn'tgoingtoearnyoumoneyorfame.R#Itwillallowyoutomaintainthesystem, eand$"keepUUitrunning.qThat'sit.($"4.2O_BouotingtheSystem׍$"ThereUUareseveralwaystobGootUUthesystem,eitherfrom oppyorfromtheharddrive.}H(b{$"$"4.2.4BoQotingTtheSystemO125KP덍$"4.2.1MbUsingab`oot oppyN$"Many+pGeoplebootLinuxusinga\boot oppy"whichcontainsacopyoftheLinuxkernel.This $"kernel thastheLinuxroGotpartitioncodedintoit,;soitwillknowwheretoloGokontheharddrivefor$"thee*roGot lesystem.F(Therdevcommandcanbeusedtosettherootpartitioninthekernelimage;$"seeUUbGelow.)qThisisthetypGeof oppycreatedbySlackwareduringinstallation,forexample.ؼ3"T*o_EcreateyourownbGoot_E oppy*,a rstloGcatethekernelimageonyourharddisk.ItshouldbGein$"theUU le/Imageor/etc/Image.qSomeinstallationsusethe le/vmlinuxforthekernel.3"Y*oulmayinsteadhaveacompressedkernel.$2Al[compressedkerneluncompressesitselfintomemory$"atbGoottime,andtakesupmuchlessspaceontheharddrive.<}Ifyouhaveacompressedkernel,it$"mayUUbGefoundinthe le/zImageor/etc/zImage.3"Once`youknowwherethekernelis,csettheroGotdeviceinthekernelimagetothenameofyour$"LinuxUUroGotpartitionwiththerdevcommand.qTheformatofthecommandisؼ="rdevhMk9ernel-nameihMroAot-devicei$"wherephkernel-nameiisthenameofthekernelimage,#andhroGot-deviceiisthenameoftheLinux $"roGotDpartition.lFF*orexample,H tosettherootdeviceinthekernel/etc/Imageto/dev/hda2,H usethe$"commandؼ="#rdevN ffffff?ԎEʾwillbGetrappedandcauseashutdown;5konothersystems,$"however,²using the\V*ulcannervepinch"willrebGoot thesystemimmediatelyandmaycausedisaster.($"4.4IManagingUsers׍$"Whetherornotyouhavemanyusersonyoursystem,׮it'simpGortanttounderstandtheaspGectsof$"usermanagementunderLinux.KEvenifyou'retheonlyuser,{youshouldpresumablyhaveaseparate$"accountUUforyourself(anaccountotherthanroottodomostofyourwork).3"EachYpGersonusingthesystemshouldhavehisorherownaccount.mItisseldomagoGodYideato$"haveP,severalpGeoplesharethesameaccount.pNotonlyissecurityanissue,Q5butaccountsareusedto$"uniquelyUUidentifyuserstothesystem.qY*ouneedtobGeabletokeeptrackofwhoisdoingwhat. (b{$"$"4.4.ManagingTUsers6uE128KP덍$"4.4.1MbUsermanagementconceptsN$"ThesystemkeepstrackofanumbGerofpiecesofinformationabouteachuser.S7Theyaresummarized $"bGelow.$"usernamelgThe1Xusernameistheuniqueidenti ergiventoeveryuseronthesystem.eExampleslgofOnusernamesarelarry,Pkarl,andOnmdw.oLettersanddigitsmaybGeused,Paswellaslgthecharacters\Eff&fǫ"(underscore)and\."(pGeriod).UsernamesareusuallylimitedlgtoUU8charactersinlength.J$"userTIDlgTheuserID,orUID,isauniquenumbGergiventoeveryuseronthesystem.ThelgsystemUUusuallykeepstrackofinformationbyUID,notusername.$"groupTIDlgTheZgroupID,orGID,istheIDZ@oftheuser'sdefaultgroup.SInSection3.9welgdiscussedgrouppGermissions;Peachuserbelongstooneormoregroupsde nedbylgtheUUsystemadministrator.qMoreabGoutthisbelow.$"passw9ordlgTheQHsystemalsostorestheuser'sencryptedpassword.eThepasswdcommandislgusedUUtosetandchangeuserpasswords.$"fullTnamelgTheuser's\realname"or\fullname"isstoredalongwiththeusername.F*orlgexample,UUtheuserschmojmayhavethename\JoGeSchmo"inreallife.$"homeTdirectorylgThe)phomedirectoryisthedirectoryinwhichtheuserisinitiallyplacedatloginlgtime.Everyusershouldhavehisorherownhomedirectory*,usuallyfoundunderlg/home.$"loginTshelllgTheDquser'sloginshellistheshellwhichisstartedfortheuseratlogintime.ExampleslgareUU/bin/bashand/bin/tcsh.N3"Themail,andsys.\UsersshouldnotbGelongto$"anyeofthesegroups;ltheyareusedforsystem lepGermissions.Instead,usersshouldbelongtoan$"individualIgroupsuchasusers.ӣIfyouwanttobGecute,youcanmaintainseveralgroupsofusers$"suchUUasstudent,staff,andfaculty.3"TheUU le/etc/groupcontainsinformationabGoutgroups.qTheformatofeachlineisؼ="groupname:password:GID:othermembers$"SomeUUexamplegroupsmightbGe:="root:*:0: ="users:*:100:mdw,larry="guest:*:200:="other:*:250:kiwiؼ$"The rstgroup,J root,isaspGecialsystemgroupreservedfortherootaccount.Thenextgroup,$"users,isforregularusers.IthasaGIDof100.Theusersmdwandlarryaregivenaccesstothis$"group. RemembGer2thatin/etc/passwdeachuserwasgivenadefaultGID.However,jusersmay$"bGelongtomorethanonegroup, byaddingtheirusernamestoothergrouplinesin/etc/group.R0The$"groupsUUcommandlistswhatgroupsyouaregivenaccessto.3"The!thirdgroup,guest,is!forguestusers,andotherisfor\other"users.G Theuserkiwiisgiven$"accessUUtothisgroupaswell.3"As6Vyoucansee,JyouneedtoeithercopyittoabGoot oppy(withacom-$"mandsuchas\cp?Image/dev/fd0")orinstallitusingLILOtobGootfromyourharddrive.:See$"SectionUU4.2.2formoreinformation.#$"4.7.2MbUpgradingthelibrariesN$"AsamentionedbGefore,d mostofthesoftwareonthesystemiscompiledtousesharedlibraries,d which$"containUUcommonsubroutinessharedamongdi erentprograms.3"IfUUyouseethemessageؼ="Incompatiblelibraryversion$"when~Dattemptingtorunaprogram,thenyouneedtoupgradetotheversionofthelibrarieswhich $"the programrequires.Librariesareback-compatible;dthatis,aprogramcompiledtouseanolder$"version#ofthelibrariesshouldworkwiththenewversionofthelibrariesinstalled.܀However,W"the$"reverseUUisnottrue.3"TheynewestversionofthelibrariescanbGefoundontheLinuxFTPjsites.]~Onsunsite.unc.edu,$"theyareloGcatedin/pub/Linux/GCC.The\release" lesthereshouldexplainwhat lesyouneed$"to@downloadandhowtoinstallthem.Brie y*,youshouldgetthe lesimage-version.tar.gzand$"inc-version.tar.gzKwhereversionistheversionofthelibrariestoinstall,suchas4.4.1.KTheseare$"gzippGedtar les; theimage lecontainsthelibraryimagestoinstallin/liband/usr/lib.ލThe$"incUU lecontainsinclude lestoinstallin/usr/include3"Therelease-version.tar.gzshouldexplaintheinstallationproGcedureindetail(theexactin-$"structionsHvqaryforeachrelease).mIngeneralyouneedtoinstallthelibrary.aand.sa lesin$"/usr/lib.qTheseUUarethelibrariesusedatcompilationtime.3"InN%addition,Xthesharedlibraryimage les,libc.so.versionareinstalledin/lib.\6Theseare$"the'sharedlibraryimagesloadedatruntimebyprogramsusingthelibraries.\Eachlibraryhasa$"symbGolicUUlinkusingthema8jorversionnumbGerofthelibraryin/lib.3"F*or/example,jthelibclibraryversion4.4.1hasama8jorversionnumbGerof4.VThe lecontaining$"thelibraryislibc.so.4.4.1.r3AsymbGoliclinkofthenamelibc.so.4isalsoin/libpointingto$"this le.Y*ouneedtochangethissymbGoliclinkwhenupgradingthelibraries.F*orexample,when$"upgradingxofromlibc.so.4.4tolibc.so.4.4.1,5youneedtochangethesymbGoliclinktopointto$"theUUnewversion.3"ItaisveryimpGortantthatyouchangethesymbGoliclinkinonestep, #asgivenbGelow.Ifyou ö3$"somehow_deletethesymbGoliclinklibc.so.4,bthenprogramswhichdepGendonthelink(including(b{$"$"4.7.UpgradingTandInstallingNewSoft9ware138KP덑$"basic_utilitieslikelsandcat)willstopworking.:UsethefollowingcommandtoupGdatethesymbGolic $"linkUUlibc.so.4topGointtothe lelibc.so.4.4.1:ؼ="#lnN<-sf/lib/libc.so.4.4.1/lib/libc.so.4$"Y*ouialsoneedtochangethesymbGoliclinklibm.so.versioninthesamemanner.#LIfyouareupgrading$"tot!adi erentversionofthelibrariessubstitutetoappropriate lenamesabGove.+Thelibraryrelease$"noticeUUshouldexplainthedetails.q(SeeSection3.10formoreinformationabGoutsymboliclinks.)#$"4.7.3MbUpgradinggccN$"ThegccCandC++compilerisusedtocompilesoftwareonyoursystem,mostimpGortantlythe$"kernel.4The'newestversionofgccisfoundontheLinuxFTP'sites.4Onsunsite.unc.edu,\mitis$"found`inthedirectory/pub/Linux/GCCK(alongwiththelibraries).dThereshouldbGearelease le$"forUUthegccdistributiondetailingwhat lesyouneedtodownloadandhowtoinstallthem.$"4.7.4MbUpgradingothersoftwareN$"Upgradingothersoftwareisusuallyjustamatterofdownloadingtheappropriate lesandinstalling$"them.MMostJsoftwareforLinuxisdistributedatgzippGedtar les,Mincludingeithersourcesorbinaries$"or'bGoth.b^Ifbinariesarenotincludedintherelease,0Zyoumayneedtocompilethemyourself;6usually*,$"thisUUmeanstypingmakeinthedirectorywherethesourcesareheld.ؼ3"Reading݃theUSENETenewsgroupcomp.os.linux.announceforannouncementsofnewsoftware$"releases7istheeasiestway7to ndoutabGoutnewsoftware.mWhenever7youareloGokingforsoftware$"onwanFTPasite,downloadingthels-lRindex lefromtheFTPsiteandusinggrepto ndthe les$"inquestionistheeasiestwaytoloGcatesoftware.^Ifyouhavearchieavqailabletoyou,itcanbGeof$"assistanceUUaswell^4|s.qSeeAppGendixAformoredetails.3"One}handysourceofLinuxsoftwareistheSlackwaredistributiondiskimages.1Eachdiskcontains$"anumbGerof.tgz leswhicharesimplygzippGedtar les.Insteadofdownloadingthedisks,Cyou$"candownloadthedesired.tgz lesfromtheSlackwaredirectoriesontheFTPsiteandinstallthem$"directly*.pIfyouruntheSlackwaredistribution,ܛthesetupcommandcanbGeusedtoautomatically$"loadUUandinstallacompleteseriesofdisks.3"Again,it'sSusuallynotagoGodSideatoupgradebyreinstallingwiththenewestversionofSlackware,$"or2anotherdistribution.*fIfyoureinstallinthisway*,youwillnodoubtwreckyourcurrentinstallation,$"includingquserdirectoriesandallofyourcustomizedcon guration.%ThebGestwaytoupgradesoftware$"ispiecewise;[[thatis,/ifthereisaprogramthatyouuseoftenthathasanewversion,/upgradeit.$"Otherwise,don'tDbGother.@uRuleofthumb:PIfDitain'tbroke,don't xit.@uIfyourcurrentsoftware$"works,UUthere'snoreasontoupgrade.$"X-ffr J= "5-:4LܸIfyÎoudon'thaveLarchie,youcantelnettoanLarchieserversuchasLarchie.rutgers.edu,loginas\Larchie"and zuseXthecommand\Lhelp"x(b{$"$"4.8.ManagingTFilesystems|139KP덍$"4.8IManagingFilesystems׍$"Anothertaskofthesystemadministratoristakingcareof lesystems.%Mostofthisjobentails $"pGeriodically:checkingthe lesystemsfordamageorcorrupted les;Tmanysystemsautomatically$"checkUUthe lesystemsatbGootUUtime.#$"4.8.1MbMounting lesystemsN$"First,VafewconceptsabGout lesystems.fBeforea lesystemisaccessibletothesystem,itmustbGe$"moun9ted]onsomedirectory*.For]example,_ifyouhavea lesystemona oppy*,_youmustmountit$"undersomedirectory*,%say/mnt,inordertoaccessthe lesonit(seeSection4.6.2).]Aftermounting$"the lesystem,allofthe lesinthe lesystemappGearinthatdirectory*.VAfterunmountingthe$" lesystem,UUthedirectory(inthiscase,/mnt)willbGeempty*.ؼ3"The8(sameistrueof lesystemsontheharddrive.h Thesystemautomaticallymounts lesystems$"onyourharddriveforyouatbGootuptime.R Theso-called\roGot lesystem"ismountedonthe$"directory/.Ifyouhaveaseparate lesystemfor/usr,"forexample,itismountedon/usr.Ifyou$"onlyUUhavearoGot lesystem,all les(includingthosein/usr)existonthat lesystem.3"TheUUcommandmountisusedtomounta lesystem.qThecommandؼ="mount-av$"iszexecutedfromthe le/etc/rc(whichisthesysteminitialization leexecutedatbGootztime;!see $"SectionvR4.10.1).ԾThemount?-avcommandobtainsinformationon lesystemsandmountpGoints$"fromUUthe le/etc/fstab.qAnexamplefstab leappGearsbelow.卑="#device!directoryYtypeoptions =="/dev/hda2!/=lext2defaults="/dev/hda3!/usr/?ext2defaults="/dev/hda4!none/?swapsw="/proc3r/proc*Fprocnoneؼ3"TheUq rst eldisthedevice|thenameofthepartitiontomount.rThesecond eldisthemount $"pGoint. Thekthird eldisthe lesystemtypGe|suchasext2(forext2fs)orminix(forMinix lesys-$"tems).T*ableP4.1liststhevqarious lesystemtypGesavqailableforLinux.^5 +Notallofthese lesystem$"typGesmaybGeavqailableonyoursystem;yourkernelmusthavesuppGortforthemcompiledin.See$"SectionUU4.7forinformationonbuildingthekernel.3"TheUUlast eldofthefstab lecontainsmountoptions|usually*,thisissetto\defaults".3"Asyoucansee,swappartitionsareincludedin/etc/fstabaswell.2Theyhaveamountdirectory$"ofnone,1andtypGeswap.DNTheswapon?-acommand,executedfrom/etc/rcaswell,isusedtoenable$"swappingUUonallswapdeviceslistedin/etc/fstab.$"X-ffr .S "5-:5LܸThisXtableiscurrenÎtasofkernelversion1.1.37.(b{$"$"4.8.ManagingTFilesystems|140KnQs)W=zff5(Filesystem0T9ypAeTname:Commen9t)zff5SecondTExtendedFilesystem0ext2:MostTcommonLin9ux lesystem. <ExtendedTFilesystem0ext:SupAersededTb9yext2.MinixTFilesystem0minix:OriginalTMinix lesystem;rarelyused.XiaTFilesystem0xia:Lik9eText2,butrarelyused.UMSDOSTFilesystem0umsdos:UsedTtoinstallLin9uxonanMS-DOSpartition.MS-DOSTFilesystem0msdos:UsedTtoaccessMS-DOS les./procTFilesystem0proc:Pro9videsTproAcessinformationforps,etc.ISOT9660Filesystem0iso9660:F:ormatTusedb9ymostCD-ROMs.XenixTFilesystem0xenix:UsedTtoaccess lesfromXenix.SystemTVFilesystem0sysv:UsedTtoaccess lesfromSystemVv|rarian9tsforthex86.Coheren9tTFilesystem0coherent:UsedTtoaccess lesfromCoheren9t.HPFSTFilesystem0hpfs:Read-onlyTaccessforHPFSpartitions(DoubleSpace).aT*ableUU4.1:qLinuxFilesystemTypGes^3"Thevfstab lecontainsonespGecialentry|forthe/proc lesystem. a*AsmentionedinSec- $"tion3.11.1,+the/proc lesystemisusedtostoreinformationabGoutsystemprocesses,+avqailable$"memory*,UUandsoon.qIf/procisnotmounted,commandssuchaspswillnotwork.ؼ3"The-mountcommandmayonlybGeusedbyroGot.OThisistoensuresecurityonthesystem;you ö3$"wouldn'twantregularusersmountingandunmounting lesystemsonawhim.CThereareseveral$"softwarepackqagesavqailablewhichallowregularuserstomountandunmount lesystems( oppies$"inUUparticular)withoutcompromisingsystemsecurity*.3"Thenmount?-avcommandactuallymountsall lesystemsotherthantheroGot lesystem(inthe$"table5abGove,;/dev/hda2).g/TheroGot lesystemisautomaticallymountedatbGoottimebythekernel.3"InsteadUUofusingmount?-av,youcanmounta lesystembyhand.qThecommand="#mountN<-text2/dev/hda3/usr$"is.#equivqalenttomountingthe lesystemwiththeentry/dev/hda3inthefstabexample leabGove.3"Ingeneral,youshouldneverhavetomountorunmount lesystemsbyhand.; Themount?-av$"commandin/etc/rctakescareofmountingthe lesystemsatbGoottime.JFilesystemsareautomat-$"icallyUUunmountedbytheshutdownorhaltcommandsbGeforebringingthesystemdown.#r$"4.8.2MbChecking lesystemsN$"ItisusuallyagoGodideatocheckyour lesystemsfordamageorcorrupt leseverynowandthen.$"SomeRsystemsautomaticallycheckRtheir lesystemsatbGootRtime(withtheappropriatecommands$"inUU/etc/rc).3"The5commandusedtocheck5a lesystemdepGendsonthetypeofthe lesysteminquestion.$"F*orext2fs lesystems(themostcommonlyusedtypGe),sthiscommandise2fsck.Forexample,sthe$"command(b{$"$"4.9.UsingTasw9ap le2141KP덑="#e2fsckN<-av/dev/hda2>$"willUUchecktheext2fs lesystemon/dev/hda2andautomaticallycorrectanyerrors.ؼ3"It$!isusuallyagoGod$!ideatounmounta lesystembGeforecheckingit.a`F*orexample,-thecommand=="#umountN$"Thiscommandcreatestheswap leitself.Replacethe\count="withthesizeoftheswap lein$"bloGcks.="#mkswapN$"ThisQTcommandwillinitializetheswap le;Ragain,R!replacethenameandsizeoftheswap lewiththe$"appropriateUUvqalues.="#/etc/sync="#swaponNthingswork.T*oGomuchofthetime,[xasystemadministratorwillpGostadesperatepleaforhelp$"bGeforeP+lookingintotheproblematall.pMostofthetime,Q4you'll ndthat xingproblemsyourselfis$"actuallyUUveryeasy*.qItisthepathtoguruhoGod.3"There:areveryfewcaseswherereinstallingthesystemfromscratchisnecessary*.expGerience,andunderstandtheinformationcontainedintheprevious$"chapters.ؼ3"The@mostimpGortantaspectofLinuxthatdistinguishesitfromotherimplementationsofUNIX$"isitsopGendesignandphilosophy*.RLinuxwasnotdevelopGedbyasmallteamofprogrammersheaded$"by"tamarketingcommitteewithasinglegoalinmind.`ItwasdevelopGedbyanever-increasinggroup$"ofhackers, tputtingwhattheywantedintoahomebrewUNIX|system.+ThetypGesofsoftwareand$"diversityofdesignintheLinuxworldislarge.'uSomepGeopledislikethislackofuniformityand$"conformity|however,UUsomecallitoneofthestrongestqualitiesofLinux.($"5.1ITheXWindo=wSystem׍$"TheXWindowSystemisalargeandpGowerful(andsomewhatcomplex)graphicsenvironmentfor$"UNIX1systems.TheUoriginalXWindowSystemcoGdewasdevelopGedatMIT;commercialvendors$"havesincemadeXtheindustrystandardforUNIXplatforms.VirtuallyeveryUNIXworkstation$"inUUtheworldrunssomevqariantoftheXWindowsystem.3"A_free_pGortoftheMITXWindowSystemversion11, release6(X11R6)for80386/80486/Pentium$"UNIXusystemsuhasbGeendevelopedbyateamofprogrammersoriginallyheadedbyDavidW*exelblat^1|s.$"Therelease,cknownasXF*ree86^2|s,isavqailableforSystemV/386,386BSD,andotherx86UNIX$"implementations,DincludingLinux.dItincludesalloftherequiredbinaries,DsuppGort les,libraries,$"andUUtoGols.3"Con guring\andusingtheXWindowSystemisfarbGeyondthescopGeofthisbook.Y*ouare$"encouragedt3toreadTheXWindowSystem:2AĔUser'sGuide|seet3AppGendixAforinformationonthis$"bGook.6&Inpthissection,8we'llgiveastep-by-stepdescriptionofhowtoinstallandcon gureXF*ree86for$"Linux,butyouwillhaveto llinsomeofthedetailsyourselfbyreadingthedoGcumentationreleased$"X-ffr .S "5-:1LܸDaÎvidXmaybstandardresolution,youcantweakthe$"con guration:toexploitthecapabilitiesofyourvideohardware.hTheideaisthatyouwanttoknow$"thatXF*ree86worksatallonyoursystem,andthatsomethingisn'twrongwithyourinstallation,$"bGeforeUUattemptingthesometimesdiculttaskofsettingupXF*ree86forrealuse.3"InUUadditiontotheinformationlistedhere,youshouldreadthefollowingdoGcumentation:ؼ3"="The KXF*ree86doGcumentationin/usr/X11R6/lib/X11/doc(containedwithinthe="XFree86-3.1-doc,2packqage)._Y*oushouldespGeciallyseethe leREADME.Config,awhichisan="XF*ree86UUcon gurationtutorial.3"="Several@4videochipsetshaveseparateREADME? lesintheabGovedirectory(suchasREADME.Cirrus="andUUREADME.S3).qReadoneoftheseifapplicable.3"="TheUUmanpageforXFree86.3"="TheUUmanpageforXF86Config.3"="TheUUmanpagefortheparticularserverthatyouareusing(suchasXF86Eff&fǫSVGAorXF86Eff&fS3).ؼ3"The|YmainXF*ree86con guration leis/usr/X11R6/lib/X11/XF86Config.This lecontains$"information]onyourmouse,_videocardparameters,andsoon.The leXF86Config.egisprovided$"with"theXF*ree86distributionasanexample.`Copythis letoXF86Configandedititasastarting$"pGoint.ؼ3"The1TXF86Configmanpageexplainstheformatofthis leindetail.eReadthismanpagenow,8if$"youUUhavenotdonesoalready*.3"W*earegoingtopresentasampleXF86Config le,piecebypiece.ZThis lemaynotloGokexactly$"likeUUthesample leincludedintheXF*ree86distribution,butthestructureisthesame.3"NotethattheXF86Config leformatmaychangewitheachversionofXF*ree86;&thisinformation ö3$"isUUonlyvqalidforXF*ree86version3.1.3"Also,$you.shouldnotsimplycopythecon guration lelistedheretoyourownsystemand ö3$"attemptXtouseit.LAttemptingtouseacon guration lewhichdoGesn'tcorrespondtoyourhardware$"could;drivethemonitoratafrequencywhichistoGohighforit;D=therehavebGeenreportsofmonitors$"(espGeciallyu xed-frequencymonitors)beingdamagedordestroyedubyusinganincorrectlycon gured$"XF86Config=" le.aThebGottomlineisthis:MakeabsolutelysurethatyourXF86Config lecorrespGonds$"toUUyourhardwarebGeforeyouattempttouseit. G(b{$"$"5.1.TheTXWindo9wSystemJ153KP덑3"EachhsectionoftheXF86Config leissurroundedbythepairoflinesSection?"hsection- $"namei"::: UOEndSection.qTheUU rstpartoftheXF86Config leisFiles,whichloGokslikethis: ="Section"Files" =PRgbPath"/usr/X11R6/lib/X11/rgb"PFontPathX"/usr/X11R6/lib/X11/fonts/misc/"PFontPathX"/usr/X11R6/lib/X11/fonts/75dpi/"="EndSection$"The-RgbPathlinesetsthepathtotheX11R6RGB-colordatabase,5andeachFontPathlinesetsthe$"path~toadirectorycontainingX11fonts.Ingeneralyoushouldn'thavetomoGdifytheselines;1just$"bGesurethatthereisaFontPathentryforeachfonttypGethatyouhaveinstalled(thatis, foreach$"directoryUUin/usr/X11R6/lib/X11/fonts).ؼ3"The`nextsectionisServerFlags,whichspGeci esseveralglobal agsfortheserver.Ingeneral$"thisUUsectionisempty*.ፑ="Section"ServerFlags"="#Uncommentthistocauseacoredumpatthespotwhereasignalis="#received. s,Thismayleavetheconsoleinanunusablestate,butmay="#provideabetterstacktraceinthecoredumptoaidindebugging="#XNoTrapSignalsz="#Uncommentthistodisabletheserverabortsequence="#XDontZap="EndSection$"Here,UUwehavealllineswithinthesectioncommentedout.ؼ3"TheUUnextsectionisKeyboard.qThisshouldbGefairlyintuitive.="Section"Keyboard"PProtocolX"Standard"PAutoRepeat s,5005PServerNumLock="EndSection$"Other8optionsareavqailableaswell|seetheXF86Config leifyouwishtomoGdifythekeybGoard $"con guration.qTheUUabGoveshouldworkformostsystems.ؼ3"TheUUnextsectionisPointerwhichspGeci esparametersforthemousedevice.="Section"Pointer"zPProtocolX"MouseSystems"PDeviceY"/dev/mouse"="#BaudrateandSampleRateareonlyforsomeLogitechmice="#XBaudRate,9600 V(b{$"$"5.1.TheTXWindo9wSystemJ154KP덑="#XSampleRate150z="#Emulate3Buttonsisanoptionfor2-buttonMicrosoftmice =="#XEmulate3Buttons="#ChordMiddleisanoptionforsome3-buttonLogitechmice="#XChordMiddle="EndSection$"The{onlyoptionsthatyoushouldconcernyourselfwithnowareProtocolandDevice.>:Protocol $"spGeci esthemousepr}'otocolIftheydonot,theserver$"willcomplainwhenyouattempttostartupX(moreonthislater).)jF*oronething, thedotcloGck$"usedbythemoGdeshouldnotbegreaterthanthevqalueusedforBandwidth.#(However,Mfinmany$"casesUUitissafetousemoGdeswithaslightlyhigherbandwidththanyourmonitorcansuppGort.)3"IftheVESAstandardtimingsdonotworkforyou(you'llknowaftertryingtousethemlater)$"thenDqthe lesmodeDB.txtandMonitorsincludespGeci cmodevqaluesformanymonitortypGes.l&Y*ou$"cancreateModeLineentriesfromthevqaluesfoundinthosetwo lesaswell.LBesuretoonlyuse$"vqaluesforthespGeci cmodelofmonitorthatyouhave.MaNotethatmany14and15-inchmonitors$"cannotsuppGorthigherresolutionmodes,Iandoftenresolutionsof1024x768atlowdotclocks.This$"meansthatifyoucan't ndhighresolutionmoGdesforyourmonitorinthese les,thenyourmonitor$"probablyUUdoGesnotsupportthoseresolutionmodes.3"If‡youarecompletelyataloss,andcan't ndworkingModeLinevqaluesforyourmonitor,youcan$"followJtheinstructionsintheVideoModes.doc leincludedintheXF*ree86distributiontogenerate$"ModeLinevqaluesfromthespGeci cationslistedinyourmonitor'smanual.YWhileyourmileagewill$"certainlyPvqarywhenattemptingtogenerateModeLinevaluesbyhand,thisisagoGodPplacetoloGokif$"you0can't ndthevqaluesthatyouneed.TfVideoModes.docalsodescribGestheformatoftheModeLine$"directiveUUandotheraspGectsoftheXF*ree86serveringorydetail. u(b{$"$"5.1.TheTXWindo9wSystem157KP덑3"Lastly*,wif=youdoobtainModeLinevqalueswhicharealmost,wbutnotquite,right,thenitmay $"bGepossibletosimplymodifythevqaluesslightlytoobtainthedesiredresult.*F*orexample,nifwhile$"runningDRXF*ree86theimageonthemonitorisshiftedslightly,Gorseemsto\roll",youcanfollowthe$"instructionscintheVideoModes.doc letotryto xthesevqalues.$Also,fbGesuretocheckctheknobs$"andcontrolsonthemonitoritself!ZInmanycasesitisnecessarytochangethehorizontalorvertical$"sizeofthedisplayafterstartingupXF*ree86inorderfortheimagetobGecenteredandbGeofthe$"appropriateUUsize.qHavingthesecontrolsonthefrontofthemonitorcancertainlymakelifeeasier.ؼ3"Y*ouWshouldn'tusemonitortimingvqaluesorModeLinevaluesformonitorsotherthanthemoGdel ö3$"that1youown.QfIfyouattempttodrivethemonitoratafrequencyforwhichitwasnotdesigned,you$"canUUdamageorevendestroyit.3"TheKnextsectionoftheXF86Config leisDevice,pwhichspGeci esparametersforyourvideo$"card.qHereUUisanexample.="Section"Device" =b?Identifier"#9GXE64"zb?#Nothingyet;wefillinthesevalueslater.="EndSection7捑3"This.sectionde nespropGertiesforaparticularvideocard.Identifierisanarbitrarystring $"describingUUthecard;youwillusethisstringtorefertothecardlater.3"Initially*,youdon'tneedtoincludeanythingintheDevicesection,exceptforIdentifier.Z2This$"is(cbGecausewewillbeusingtheX(,serveritselftoprobeforthepropertiesofthevideocard,]&and$"entering/rthemintotheDevicesectionlater.e&TheXF*ree86serveriscapableofprobingforthevideo$"chipset,UUcloGcks,RAMDAC,andamountofvideoRAMonthebGoard.3"Beforewedothis,#however,weneedto nishwritingtheXF86Config le.Thenextsectionis$"Screen,UUwhichspGeci esthemonitor/videocardcombinationtouseforaparticularserver.ڍA%Section"Screen" =T}Driver"Accel"T}Device"#9GXE64"T}MonitorX"CTX5468NI"T}Subsection"Display"gDepthY16gModesY"1024x768""800x600""640x480"gViewPort,00gVirtualX1024768T}EndSubsectionA%EndSectionϱ3"TheUUDriverlinespGeci estheXserverthatyouwillbGeusing.qThevqaluevaluesforDriverare:7獍3"="Accel:F*ortheXF86Eff&fǫS3,$KXF86Eff&fMach32,XF86Eff&fMach8,XF86Eff&f8514,XF86Eff&fP9000,XF86Eff&fAGX,and ="XF86Eff&fǫW32UUservers; (b{$"$"5.1.TheTXWindo9wSystem158KP덍3"="SVGA:UUF*ortheXF86Eff&fǫSVGAserver;3"="VGA16:qF*orUUtheXF86Eff&fǫVGA16server;3"="VGA2:qF*orUUtheXF86Eff&fǫMonoserver;3"="Mono:qF*orUUthenon-VGAmonoGchromedriversintheXF86Eff&fǫMonoandXF86Eff&fVGA16servers.Ȗ$"Y*ouUUshouldbGesurethat/usr/X11R6/bin/Xisasymboliclinktotheserverthatyouareusing.ؼ3"TheDevicelinespGeci estheIdentifieroftheDevicesectioncorrespondingtothevideocard $"toUUuseforthisserver.qAbGove,UUwecreatedaDevicesectionwiththeline="Identifier"#9GXE64"$"Therefore,UUweuse"#9?GXE64"UUontheDevicelinehere.3"Similarly*,theMonitorlinespGeci esthenameoftheMonitorsectiontobeusedwiththisserver. $"Here,UU"CTX?5468NI"istheIdentifierusedintheMonitorsectiondescribGedabove.3"Subsection?"Display"˞de nesseveralpropGertiesoftheXF*ree86servercorrespGondingtoyour$"monitor/videoXcardcombination.{TheXF86Config ledescribGesalloftheseoptionsindetail;Z]most$"ofUUthemareicingonthecakeandnotnecessarytogetthesystemworking.3"TheUUoptionsthatyoushouldknowabGoutare:ȗ3"="Depth.aDe nes҈thenumbGer҈ofcolorplanes|thenumber҈ofbitsperpixel.aUsually*,Depthis="settto8.XF*ortheVGA16server,|youtwoulduseadepthof4,|andforthemonoGchromeservera="depthof1. IfyouareusinganacceleratedvideocardwithenoughmemorytosuppGortmore="bitsߌpGerpixel,youcansetDepthto16,24,or32.lIfyouhaveproblemswithdepthshigher="thanUU8,setitbackto8andattempttodebugtheproblemlater.3"="Modes.ThisboisthelistofvideomoGdenameswhichhavebGeende nedusingtheModeLine="directiveintheMonitorsection.8IntheabGovesection,weusedModeLinesnamed"1024x768",=""800x600",UUand"640x48"0.qTherefore,weuseaModeslineof+}ModesX"1024x768""800x600""640x480"="TheW rstmoGdelistedonthislinewillbethedefaultwhenXF*ree86startsup.SAfterXFree86is="running,&?youzcanswitchbGetweenthemoGdeslistedhereusingthekeysff$  ffctrlX ffffff$͞-ff  ffalt,„ ffffff-ff1S  ffnumeric+0F ffffff1S="andUUff$  ffctrlX ffffff$y-ff  ffalt,„ ffffff-ff1S  ffnumeric-0F ffffff1S1S. ="ItPmightbGebest,wheninitiallycon guringXF*ree86,touselowerPresolutionvideomoGdes,="such/>as640x480,6whichtendtoworkonmostsystems.eOnceyouhavethebasiccon guration="workingUUyoucanmoGdifyXF86Configtosupporthigherresolutions.3"="Virtual.`Sets"kthevirtualdesktopsize.XF*ree86hastheabilitytouseanyadditionalmemory="on"yourvideocardtoextendthesizeofyourdesktop.lWhenyoumovethemousepGointer="tod&theedgeofthedisplay*,thedesktopwillscroll,bringingtheadditionalspaceintoview.="Therefore,%pevenifyouarerunningatalowervideoresolutionsuchas800x600,%pyoucanset="VirtualDtothetotalresolutionwhichyourvideocardcansuppGort(a1-megabytevideocard (b{$"$"5.1.TheTXWindo9wSystemJ159KP덑="cansuppGort1024x768atadepthof8bitsperpixel;a2-megabytecard1280x1024atdepth ="8,:orz 1024x768atdepth16).Ofcourse,theentireareawillnotbGevisibleatonce,butitcan="stillUUbGeused.D="TheVirtualfeatureisanicewaytoutilizethememoryofyourvideocard, butitisrather="limited._Ifyouwanttouseatruevirtualdesktop,)wesuggestusingfvwm,)orasimilarwindow="manager,Ҧinstead.fvwmcallowsyoutohaveratherlargevirtualdesktops(implementedby="hidingwindows,\andsoforth,insteadofactuallystoringtheentiredesktopinvideomemory="at!,once).LSeethemanpagesforfvwmformoredetailsabGoutthis;mostLinuxsystemsuse="fvwmUUbydefault.t3"="ViewPort.91IfyouareusingtheVirtualoptiondescribGedabove,͆ViewPortsetsthecoordinates="of_theuppGer-left-handcornerofthevirtualdesktopwhenXF*ree86startsup.Virtual?00_is="often_used;@ifthisisunspGeci edthenthedesktopiscenteredonthevirtualdesktopdisplay="(whichUUmaybGeundesirabletoyou).{3"ManyWPotheroptionsforthissectionexist;XMseetheXF86Configmanpageforacompletedescrip-$"tion.qInUUpracticetheseotheroptionsarenotnecessarytogetXF*ree86initiallyworking.#{$"5.1.4MbFillinginvideocardinformationN$"Y*ourXF86Config leisnowreadytogo,Ywiththeexceptionofcompleteinformationonthevideo$"card.3Whatwe'regoingtodoisusetheXservertoprobGefortherestofthisinformation,'and ll$"itUUintoXF86Config.ؼ3"InsteadofprobingforthisinformationwiththeX^server,9theXF86Configvqaluesformany$"cardscJarelistedinthe lesmodeDB.txt,AccelCards,andcJDevices.These lesareallfoundin$"/usr/X11R6/lib/X11/doc.ܥInxaddition,therearevqariousREADMEx lesforcertainchipsets.Y*ou$"shouldOloGokinthese lesforinformationonyourvideocard,Mandusethatinformation(theclock$"vqalues, chipsetTtypGe,andTanyoptions)intheXF86Config le.RIfanyinformationismissing, youcan$"probGeUUforitasdescribedhere.3"Intheseexampleswewilldemonstratecon gurationfora#9GXE64videocard,*whichuses$"theFexits,xtheX> serverwillshutdown.,Y*oucancausetwmtoexitbyusingtheroGotmenus:$"depress$+mousebutton1onthedesktopbackground|thiswilldisplayapGopupmenuwhichwill$"allowUUyoutoExit?Twm.ؼ3"Befsurethatthelastcommandin.xinitrcisstartedwithexec,khandthatitisnotplacedinto$"thebackground(noampGersandontheendoftheline). OtherwisetheXserverwillshutdownas$"soGonUUasithasstartedtheclientsinthe.xinitrc le.3"Alternately*,3you*canexitXbypressingff$  ffctrlX ffffff$N-ff  ffalt,„ ffffff-ff1S  ffbackspace0F ffffff1S5ZofinterestisthebGook>TCP/IPCNetworkA}'dministration,vbby>CraigHunt.Itcontainscomplete $"informationUUonusingandcon guringTCP/IPonUNIXsystems.#$"5.3.1MbHardwareRequirementsN$"Y*ou%canuseLinuxTCP/IP%vwithoutanynetworkinghardwareatall|con guring\loGopback"moGde$"allowsE@youtotalktoyourself.AThisisnecessaryforsomeapplicationsandgameswhichusethe$"\loGopback"UUnetworkdevice.ؼ3"However,ֳifyouwanttouseLinuxwithanEthernetTCP/IPQnetwork,ֳyouneedoneofthe$"followingEthernetcards:3com3c503,3c503/16;NovellNE1000,NE2000;W*esternDigitalWD8003,$"WD8013;UUHewlettPackqardUUHP27245,HP27247,HP27250.3"The&followingclonesarerepGortedtowork:ZWD-80x3clones:LANNET&LEC-45;6[NE2000clones:$"AltaCombGo, mArtisoftLANtasticAE-2,AsanteEtherpak2001/2003,D-LinkEthernetIGI,L*TCE-$"NET/16

aslongastheyperformthecorrectfunctionsandareexecuted$"atٍbGoottimebyinit.nT*oensurethis,youmayneedtoedit/etc/inittabanduncommentlines$"torexecutetheappropriaterc le(s).Intheworstcaseyouwillhavetocreatetherc.inet1and$"rc.inet2UU lesfromscratchandaddentriesforthemto/etc/inittab.3"Aswesaid,$rc.inet1con guresthebasicnetworkinterface.]CThisincludesyourIPandnetwork$"address,andtheroutingtableinformationforyournetwork.TuTheroutingtablesareusedtoroute$"outgoingd(andincoming)networkddatagramstoothermachines.3Onmostsimplecon gurations,$"you|havethreeroutes:6Oneforsendingpacketstoyourownmachine,anotherforsendingpackets$"to 1othermachinesonyournetwork,;(andanotherforsendingpacketstomachinesoutsideofyour$"networkF>(throughthegatewayF>machine).DTwoprogramsareusedtocon guretheseparameters:$"ifconfigUUandroute.qBothoftheseareusuallyfoundin/etc.3"ifconfig}isusedforcon guringthenetwork}deviceinterfacewiththeparametersthatitrequires$"to!function,,:suchastheIP!address,network!mask,broadcastaddressandthelike.`routeisusedto$"createUUandmoGdifyentriesintheroutingtable.3"F*or!mostcon gurations,anrc.inet1 lethatloGokslikethefollowingshouldwork.3*Y*ouwill,$"ofcourse,havetoeditthisforyourownsystem.FDonotxWusethesampleIPsandnetworkaddresses$"listedUUhereforyourownsystem;theycorrespGondtoanactualmachineontheInternet.卑="#!/bin/sh =="#Thisis/etc/rc.d/rc.inet1--ConfiguretheTCP/IPinterfacesz="#First,configuretheloopbackdevice="HOSTNAME=`hostname`="/etc/ifconfiglo127.0.0.1Y#usesdefaultnetmask255.0.0.0="/etc/routeadd127.0.0.1%̰#aroutetopointtotheloopbackdevice="#Next,configuretheethernetdevice.Ifyou'reonlyusingloopbackor="#SLIP,commentouttherestoftheselines.="#Editforyoursetup.="IPADDR="128.253.154.32"*F#REPLACEwithYOURIPaddress="NETMASK="255.255.255.0"*F#REPLACEwithYOURnetmask="NETWORK="128.253.154.0"*F#REPLACEwithYOURnetworkaddress="BROADCAST="128.253.154.255"#REPLACEwithYOURbroadcastaddress,ifyouUO#haveone.Ifnot,leaveblankandeditbelow. 4(b{$"$"5.3.Net9workingTwithTCP/IP170KP덑="GATEWAY="128.253.154.1"*F#REPLACEwithYOURgatewayaddress!z="/etc/ifconfigeth0${IPADDR}netmask${NETMASK}broadcast${BROADCAST}="#Ifyoudon'thaveabroadcastaddress,changetheabovelinetojust: =="#/etc/ifconfigeth0${IPADDR}netmask${NETMASK}="/etc/routeadd${NETWORK}="#Thefollowingisonlynecessaryifyouhaveagateway;thatis,your="#networkisconnectedtotheoutsideworld.="/etc/routeadddefaultgw${GATEWAY}metric1="#EndofEthernetConfigurationӍ3"Again,Yyoumayhavetotweakthis lesomewhattogetittowork.3TheabGoveshouldbGesucient $"forUUthema8jorityofsimplenetworkcon gurations,butcertainlynotall.ؼ3"rc.inet2startsupvqariousserversusedbytheTCP/IPzsuite.}{ThemostimpGortantoftheseis$"inetd.crinetd*UsitsinthebackgroundandlistenstovqariousnetworkpGorts.crWhenamachinetriesto$"makeaconnectiontoacertainpGort(forexample,mtheincomingtelnetport),minetdforkso acopy$"oftheappropriatedaemonforthatpGort(inthecaseofthetelnetport,"inetdstartsin.telnetd).$"Thisissimplerthanrunningmanyseparate,҉standalonedaemons(e.g.,individualcopiesoftelnetd,$"ftpd,UUandsoforth)|inetdstartsupthedaemonsonlywhentheyareneeded.3"syslogd}isthesystemloggingdaemon|itaccumulateslogmessagesfromvqariousapplications$"andstoresthemintolog lesbasedonthecon gurationinformationin/etc/syslogd.conf..routed$"is`aserverusedtomaintaindynamicroutinginformation.Whenyoursystemattemptstosend$"packetstoanothernetwork,itmayrequireadditionalroutingtableentriesinordertodoso.FHrouted$"takesUUcareofmanipulatingtheroutingtablewithouttheneedforuserintervention.3"Our%examplerc.inet2,YbGelow,only%startsupthebareminimumofservers.Therearemany$"otherserversaswell|manyofwhichhavetodowithNFScon guration.Whenattemptingto$"setup[TCP/IPDonyoursystem,&it'susuallybGesttostartwithaminimalcon gurationandaddmore$"complexUUpieces(suchasNFS)whenyouhavethingsworking.3"Note thatinthebGelow le,7weassumethatallofthenetworkdaemonsareheldin/etc.As$"usual,UUeditthisforyourowncon guration.="#!/bin/sh =="#Sample/etc/rc.d/rc.inet2z="#Startsyslogd="if[-f/etc/syslogd]="thenY|/etc/syslogd="fi="#Startinetd Bߠ(b{$"$"5.3.Net9workingTwithTCP/IPRy171KP덑="if[-f/etc/inetd] =="thenY|/etc/inetd="fiz="#Startrouted="if[-f/etc/routed]="thenY|/etc/routed-q="fi="#Done!ؼ3"Among|thevqariousadditionalserversthatyoumaywanttostartinrc.inet2isnamed.'named $"is"anameserver|itisrespGonsiblefortranslating(local)IPaddressestonames,Uandviceversa.4.If$"youndon'thaveanameserverelsewhereonthenetwork,u8orwanttoprovideloGcalmachinenamesto$"otherfmachinesinyourdomain, itmaybGenecessarytorunnamed.$(F*ormostcon gurationsitis$"notvCnecessary*,~however.)ԑnamedcon gurationissomewhatcomplexandrequiresplanning;werefer$"interestedUUreaderstoagoGodUUbookonTCP/IPnetworkadministration. 򍍑$"5.3.2.3P7/etc/hostsN$"/etc/hostsdcontainsalistofIPdaddressesandthehostnamesthattheycorrespGondto.Ingeneral,$"/etc/hostsdonlycontainsentriesforyourloGcalmachine,hlandpGerhapsother\important"machines$"(such?asyournameserverorgateway).Y*ourloGcalnameserverwillprovideaddress-to-namemappings$"forUUothermachinesonthenetwork,transparently*.ؼ3"F*or[example,ifyourmachineisloomer.vpizza.comwiththeIP8address128.253.154.32,your$"/etc/hostsUUwouldloGoklike:卑="127.0.0.1Flocalhost =="128.253.154.32/?loomer.vpizza.comloomerؼ$"IfTyou'reonlyusingloGopback,theonlylinein/etc/hostsshouldbGefor127.0.0.1,withbGoth$"localhostUUandyourhostnameafterit.$"5.3.2.4P7/etc/networksN$"Thea_/etc/networks leliststhenamesandaddressesofyourown,dbandother,networks.Ita_isused$"byUUtheroutecommand,andallowsyoutospGecifyanetworkbyname,shouldyousodesire.ؼ3"Everynetworkyouwishtoaddaroutetousingtheroutecommand(generallycalledfrom$"rc.inet1|seeUUabGove)mustH-haveanentryin/etc/networks.3"AsUUanexample,卑="default0.0.0.0#defaultrouteX-mandatory N(b{$"$"5.3.Net9workingTwithTCP/IPRy172KP덑="loopnet127.0.0.0#loopbacknetwork-mandatory =="mynet128.253.154.0#Modifyforyourownnetworkaddress $"5.3.2.5P7/etc/host.confN$"ThisBN leisusedtospGecifyhowyoursystemwillresolvehostnames.koItshouldcontainthetwolines:R^="orderhosts,bind="multionv6$"Theses@linestelltheresolvelibrariesto rstcheckthe/etc/hosts leforanynamestoloGokup, $"and,thenaskthenameserver(ifoneispresent).LThemultientryallowsyoutohavemultipleIP$"addressesUUforagivenmachinenamein/etc/hosts.$"5.3.2.6P7/etc/resolv.confN$"This]V lecon guresthenameresolver,_WspGecifyingtheaddressofyournameserver(ifany)andyour$"domain˃name.RY*ourdomainnameisyourfully-quali edhostname(ifyou'rearegisteredmachine$"onS+theInternet,forexample),withthehostnamechoppGedo .kHThatis,ifyourfullhostnameis$"loomer.vpizza.com,UUyourdomainnameisjustvpizza.com.ؼ3"F*or example,vifyourmachineisgoober.norelco.com,vandhasanameserverattheaddress$"128.253.154.5,UUyour/etc/resolv.confwouldloGoklike:R^="domainYnorelco.com =="nameserver s,127.253.154.5v6$"Y*ou3canspGecifymorethanonenameserver|each3musthaveanameserverlineofitsownin$"resolv.conf.$"5.3.2.7P7SettingTy9ourhostnameN$"Y*ou8#shouldsetyoursystemhostnamewiththehostnamecommand.0Thisisusuallycalledfrom$"/etc/rc7or/etc/rc.local;x(simplysearchyoursystemrc lestodeterminewhereitisinvoked.$"F*orXpexample,Y6ifyour(full)hostnameisloomer.vpizza.com,edittheappropriaterc letoexecute$"theUUcommand:v5="/bin/hostnameloomer.vpizza.comv6$"NoteUUthatthehostnameexecutablemaynotbGefoundin/binonyoursystem.$"5.3.2.8P7T ryingTitoutN$"Onceyouhaveallofthese lessetup,youshouldbGeabletorebootyournewkernelandattempt$"to"usethenetwork./There"aremanyplaceswherethingscangowrong,soit'sagoGod"ideatotest Xi(b{$"$"5.3.Net9workingTwithTCP/IPRy173KP덑$"individualaspGectsofthenetworkcon guration(e.g.,4it'sprobablynotagoodideatotestyour $"networkUUcon gurationby ringupMosaicoveranetwork-basedXconnection).ؼ3"Y*oucanusethenetstatcommandtodisplayyourroutingtables;thisisusuallythesourceof$"theW8mosttrouble.wpThenetstatmanpagedescribGestheexactsyntaxofthiscommandindetail.In$"order,totestnetwork,connectivity*,4wesuggestusingaclientsuchastelnettoconnecttomachines$"bGothonyourlocalsubnetworkandexternalnetworks.Thiswillhelptonarrowdownthesource$"of{theproblem.9(F*orexample,Jifyou'reunabletoconnecttoloGcalmachines,Jbutcanconnectto$"machinesonothernetworks,Gemorethanlikelythereisaproblemwithyournetmaskandrouting$"tablecon guration).Y*oucanalsoinvoketheroutecommanddirectly(asroot)toplaywiththe$"entriesUUinyourroutingtable.3"Y*ouJshouldalsotestnetworkJconnectivitybyspGecifyingIP!addressesdirectly*,insteadofhost-$"names.qF*orUUexample,ifyouhaveproblemswiththecommands͍="$telnetNactuallayout>ofyournetworkconnections.A&bGook>onTCP/IPnetwork>con guration,yaswell$"asUUthemanpagestoroute,willbGeofuse. 򍍑$"5.3.3.3P7DynamicTIPaddressSLIPconnectionsusingdipN$"IfyourSLIPserveralloGcatesanIPaddressdynamically*,thenyoucertainlydon'tknowyouraddress$"inZadvqance|therefore,youcan'tincludeanentryforitin/etc/hosts.p(Y*oushould,however,$"includeUUanentryforyourhostwiththeloGopbackaddress,127.0.0.1.)3"ManyHSLIP-serversprintyourIP-address(aswellastheserver'saddress)whenyouconnect.NnF*or$"example,UUonetypGeofSLIPserverprintsastringsuchas,ؼ="YourIPaddressis128.253.154.44.="Serveraddressis128.253.154.2.$"dipcancapturethesenumbGersfromtheoutputoftheserverandusethemtocon guretheSLIP$"device.ؼ3"See >Section5.3.3.1,abGove,for >informationoncon guringyourvqariousTCP/IP + lesforusewith$"SLIP*.UUBelow,weexplainhowtocon gurediptoconnecttotheSLIPserver. g(b{$"$"5.3.Net9workingTwithTCP/IP176KP덍$"5.3.4MbUsingdipN$"dipCcansimplifytheproGcessofconnectingtoaSLIP%server,~loggingin,andcon guringtheSLIP $"device.qUnlessUUyouhavealeasedlinerunningtoyourSLIPserver,dipisthewaytogo.ؼ3"T*ousedip,you'llneedtowritea\chatscript"whichcontainsalistofcommandsusedto$"communicate/withtheSLIP.serveratlogintime. Thesecommandscanautomaticallysendyour$"username/passwordUUtotheserver,aswellasgetinformationonyourIPaddressfromtheserver.3"Herehisanexampledipchatscript,&1forusewithadynamicIPYaddressserver.^#F*orstaticservers,$"youwillneedtosetthevqariables$localand$remotetothevaluesofyourloGcalIPջaddressand$"serverUUIPaddress,respGectively*,atthetopofthescript.qSeethedipmanpagefordetails.bҍ="main: =F#SetMaximumTransferUnit.ThisisthemaximumsizeofpacketsF#transmittedontheSLIPdevice.ManySLIPserversuseeither1500orF#1006;checkwithyournetworkadminswhenindoubt.Fget$mtu1500zF#MaketheSLIProutethedefaultrouteonyoursystem.FdefaultF#Setthedesiredserialportandspeed.Fportcua03Fspeed38400F#Resetthemodemandterminalline.Ifthiscausestroubleforyou,F#commentitout.FresetF#Preparefordialing.ReplacethefollowingwithyourF#modeminitializationstring.FsendATT&C1&D2\\N3&Q5%M3%C1N1W1L1S48=7\rFwaitOK2Fif$errlvl!=0gotoerrorF#DialtheSLIPserverFdial2546000Fif$errlvl!=0gotoerrorFwaitCONNECT60Fif$errlvl!=0gotoerrorF#Weareconnected. s,Logintothesystem.="login:Fsleep3Fsend\r\n\r\nF#WaitfortheloginpromptFwaitlogin:10Fif$errlvl!=0gotoerror S(b{$"$"5.3.Net9workingTwithTCP/IPRy177KP덑F#Sendyourusername =FsendUSERNAME\nzF#WaitforpasswordpromptFwaitord:5Fif$errlvl!=0gotoerrorF#Sendpassword.FsendPASSWORD\nF#WaitforSLIPserverreadypromptFwaitannex:30Fif$errlvl!=0gotoerrorF#SendcommandstoSLIPservertoinitateconnection.Fsendslip\nFwaitAnnex30F#GettheremoteIPaddressfromtheSLIPserver.The`get...remote'F#commandreadstextintheformxxx.xxx.xxx.xxx,andassignsitF#tothevariablegivenasthesecondargument(here,$remote).Fget$remoteremoteFif$errlvl!=0gotoerrorFwaitYour30F#GetlocalIPaddressfromSLIPserver,assigntovariable$local.Fget$localremoteFif$errlvl!=0gotoerrorF#FireuptheSLIPconnection="done:FprintCONNECTEDto$remoteat$rmtipFprintGATEWAYaddress$rmtipFprintLOCALaddress$localFmodeSLIPFgotoexit="error:FprintSLIPto$remotefailed.="exit:ؼ3"dip!automaticallyexecutesifconfigandroutecommandsbasedonthevqaluesofthevariables $"$localand$remote.MHere,thosevqariablesareassignedusingtheget::: UOremotecommand,which$"obtainsUUtextfromtheSLIPserverandassignsittothenamedvqariable.ؼ3"IfGtheifconfigandroutecommandsthatdiprunsforyoudon'twork,JDyoucaneitherrunthe$"correctcommandsinashellscriptafterexecutingdip,"RormoGdifythesourcefordipitself.\Running$"dip withthe-voptionwillprintdebugginginformationwhiletheconnectionisbGeingsetup,ywhich (b{$"$"5.4.Net9workingTwithUUCP 178KP덑$"shouldUUhelpyoutodeterminewherethingsmightbGegoingawry*.ؼ3"Now,UUinordertorundipandopGentheSLIPconnection,youcanuseacommandsuchas:ؼ="/etc/dip/dip-v/etc/dip/mychat2>&1$"WhereUUthevqariousdip les,andthechatscript(mychat.dip),arestoredin/etc/dip.3"TheabGovediscussionshouldbGeenoughtogetyouwellonyourwaytotalkingtothenetwork, $"eitherviaEthernetorSLIP*.Again,#westronglysuggestloGokingintoabGookonTCP/IPbnetwork$"con guration,e/espGecially.ifyournetworkhasanyspGecialroutingconsiderations,e/otherthanthose$"mentionedUUhere.($"5.4INet=workingwithUUCP׍$"UUCP(UNIX-to-UNIXCopy) isanoldermechanismusedtotransferinformationbGetweenUNIX$"systems.JUsinghUUCP*,UNIXVsystemsdialeachotherup(usingamoGdem)andtransfermailmes-$"sages,LnewsJarticles, les,andsoon.nandatr}'ansport.cThemaileristheuser-level$"softwareswhichisusedtoactuallycompGoseandreade-mailmessages.Popularmailersincludeelm$"andGmailx.m3ThetranspGortisthelow-levelGsoftwarewhichactuallytakescareofdeliveringthemail,$"eitherbloGcallyorremotely*.Theuserneverseesthetransportsoftware;htheybonlyinteractwiththe$"mailer.However,asthesystemadministrator,itisimpGortanttounderstandtheconceptsbehind$"theUUtranspGortsoftwareUUandhowtocon gureit.3"The+mostpGopulartransportsoftware+forLinuxisSmail.cThissoftwareiseasytocon gure,4 and$"is abletosendbGothlocalandremoteTCP/IP andUUCPe-mail.ThemorepGowerful sendmail$"transpGort:isusedonmostUNIX:isystems,showever,bGecause:ofitscomplicatedsetupmechanism,$"manyUULinuxsystemsdon'tuseit. ؠ(b{$"$"5.6.NewsTandUSENET#J179KP덑3"TheLinuxMailHOWTOgivesmoreinformationontheavqailablemailsoftwareforLinuxand $"howtocon gureitonyoursystem.Ifyouplantosendmailremotely*,you'llneedtounderstand$"eitheryTCP/IPxorUUCP*,depGendingonhowyourmachineisnetworked(seeSections5.3and5.4).$"TheUUUUCPandTCP/IPdoGcumentslistedinAppendixAshouldbeofhelpthere.ؼ3"MostoftheLinuxmailsoftwarecanbGeretrievedviaanonymousFTPͽfromsunsite.unc.edu$"inUUthedirectory/pub/Linux/system/Mail.('$"5.6INewsandUSENET׍$"LinuxMalsoprovidesanumbGeroffacilitiesformanagingelectronicnews.VY*oumaychoGosetosetupa$"loGcalUnewsserveronyoursystem,VwhichwillallowuserstopGost\articles"tovqarious\newsgroups"$"onthesystem::: UOalivelyformofdiscussion.However,>NifyouhaveaccesstoaTCP/IPorUUCP$"network,UUthenyouwillbGeabletoparticipateinUSENET|aworldwidenetworknewsservice.3"There:aretwo:partstothenewssoftware|the:serverandtheclient. $Thenewsserveristhe$"softwarewhichcontrolsthenewsgroupsandhandlesdeliveringarticlestoothermachines(ifyouare$"onanetwork).ZThenewsclient,ornewsr}'eader,isthesoftwarewhichconnectstotheservertoallow$"usersUUtoreadandpGostnews.3"ThereareseveralformsofnewsserversavqailableforLinux.cTheyallfollowthesamebasic$"protoGcols£anddesign.Thetwo£primaryversionsare\C‡News"and\INN".TherearemanytypGes$"ofFnewsreaders,aswell,suchFasrnandtin.Thechoiceofnewsreaderismoreorlessamatterof$"taste;alltnewsreadersshouldworkequallywellwithdi erentversionsoftheserversoftware.$That$"is,UUthenewsreaderisindepGendentoftheserversoftware,andviceversa.3"If@youonlywanttorunnewsloGcally(thatis, znotaspartofUSENET),thenyouwillneedto$"runaserveronyoursystem,@aswellasinstallanewsreaderfortheusers.XTThenewsserverwillstore$"theWarticlesinadirectorysuchas/usr/spool/news,andthenewsreaderwillbGecompiledtolook$"inUUthisdirectoryfornewsarticles.3"However,$ifTyouwishtorunnewsoverthenetwork,$thereareseveraloptionsopGentoyou.HTCP/IP$"network-basedtnewsusesaprotoGcolknownasNNTPt(NetworkNewsT*ransmissionProtoGcol).&NNTP$"allows anewsreadertoreadnewsoverthenetwork,xonaremotemachine.NNTPalsoallowsnews$"servers tosendarticlestoeachotheroverthenetwork|thisisthesoftwareupGonwhichUSENET is$"based.pMostP=businessesanduniversitieshaveoneormoreNNTPP;serverssetuptohandleallofthe$"USENET;newsSforthatsite.EveryothermachineatthesiterunsanNNTP-basednewsreaderto$"read.andpGostnewsover.thenetwork.viatheNNTP.server.dThismeansthatonlytheNNTPserver$"actuallyUUstoresthenewsarticlesondisk.3"HereUUaresomepGossiblescenariosfornewscon guration.33"="Y*ou8runnewsloGcally.hMThatis,>youhavenonetworkconnection,>ornodesiretorunnewsover="the!lnetwork. Inthiscase,TryouneedtorunC!8NewsorINNonyourmachine,Trandinstalla="newsreaderUUtoreadthenewsloGcally*.HЍ3"="Y*ouRhaveaccesstoaTCP/IPnetworkandanNNTPserver.Ifyourorganizationhasan="NNTP0newsPserversetup,NyoucanreadandpGostnewsfromyourLinuxmachinebysimply W(b{$"$"5.6.NewsTandUSENET#J180KP덑="installingz%anNNTP-basednewsreader.6(MostnewsreadersavqailablecanbGecon guredtorun ="loGcallyonedownsideofmostnewsserverandnewsreadersoftwareisthatitmustbGecompiledby$"hand.oMostOofthenewssoftwareOdoGesnotusecon guration les;Qinstead,Qcon gurationoptionsare$"determinedUUatcompiletime.ؼ3"MostQiofthe\standard"newssoftwareQi(avqailableviaanonymousFTPPfromftp.uu.netin$"the[directory/news)willcompileout-of-thebGoxonLinux.@NecessarypatchescanbGefoundon$"sunsite.unc.eduuin/pub/Linux/system/Mail(whichis,incidentally*,alsouwheremailsoftwarefor$"LinuxUUisfound).qOthernewsbinariesforLinuxmaybGefoundinthisdirectoryaswell.3"F*ormoreinformation, HJrefertotheLinuxNewsHOWTOzfromsunsite.unc.eduin$"/pub/Linux/docs/HOWTO.Also, theLDP'sLinuxAmNetworkA}'dministrator'sAmGuidecontainscomplete$"information.{oncon guringnewssoftware.{forLinux.:ThebGook.{Managing[UUCP[{andUsenet,dby$"Tim-O'ReillyandGraceT*oGdino,5isanexcellentguidetosettingupUUCP-andnewssoftware.dAlso$"ofոinterestistheUSENET՗doGcument\HowtobGecomeaUSENET՗site,">avqailablefromftp.uu.net,$"inUUthedirectory/usenet/news.announce.newusers. (b{K$"KAppendixFA;]ڍ$"ISources ofLin4uxInformation:ؼ$"This5IappGendixcontainsinformationonvqarioussourcesofLinuxinformation,mFsuchasonlinedoGc- $"uments,bGooks,andmore.6 ManyofthesedoGcumentsareavqailableeitherinprintedform,orelec-$"tronically@fromtheInternetorBBSsystems.?ManyLinuxdistributionsalsoincludemuchofthis$"doGcumentation>inthedistributionitself,soafteryouhaveinstalledLinuxthese lesmaybGepresent$"onUUyoursystem.($"A.1N?OnlineDoucumen=ts׍$"ThesefdoGcumentsshouldbeavqailableonanyoftheLinuxFTPfarchivesites(seeAppGendixCfora$"list).]If[youdonothavedirectaccesstoFTP*,youmaybGeabletolocatethesedocumentsonother$"onlineUservices(suchasCompuServe,loGcalBBS's,andsoon).+IfyouhaveaccesstoInternetmail,$"youǘcanusetheftpmailservicetoreceivethesedoGcucments.BSeeAppGendixCformoreinformation.ؼ3"Inparticular,fthefollowingdoGcumentsmaybGefoundonsunsite.unc.eduinthedirectory$"/pub/Linux/docs.Many sitesmirrorthisdirectory;chowever,6ifyou'reunabletoloGcateamirror$"siteUUnearyou,thisisagoGodUUonetofallbackon.3"Y*ouOcanalsoaccessLinux lesanddoGcumentationusinggopher.oJustpGointyourgopherclient$"toV&pGort70onsunsite.unc.edu,VZandfollowthemenustotheLinuxarchive.t9ThisisagoGodV&wayto$"browseUULinuxdoGcumentationinteractively*.N$"TheLinuxF;r}'equentlyAskedQuestionsListlgTheLinuxF*requentlyAskedQuestionslist,ɗor\FAQ",isalistofcommonquestionslg(andanswers!)BabGoutLinux.BThisdoGcumentismeanttoprovideageneralsourceoflginformation9abGoutLinux,rcommonproblemsandsolutions,andalistofothersourceslgof%information.3bEverynewLinuxusershouldreadthisdoGcument.3bItisavqailableinalgnumbGerofformats,*jincludingplainASCII,PostScript,*jandLouttypGesetterformat.lgTheUULinuxFAQismaintainedbyIanJackson,ijackson@nyx.cs.du.edu.J$"TheLinuxMET;A-FPAQq181 '(b{$"$"A.1.OnlineTDoQcumen9ts'182KP덑lgTheMET*A-FAQisacollectionof\metaquestions"abGoutLinux;,;thatis,$sourcesof lginformationabGouttheLinuxsystem,.andothergeneraltopics.XLItisagoodstartinglgplacefortheInternetuserwishingto ndmoreinformationabGoutthesystem.'ItlgisUUmaintainedbyMichaelK.Johnson,johnsonm@sunsite.unc.edu.J$"TheLinuxINFO-SHEETlgThe{7LinuxINFO-SHEET{-isatechnicalintroGductiontotheLinuxsystem.mItgiveslgannoverviewofthesystem'sfeaturesandavqailablesoftware,#andalsoprovidesalistlgofYothersourcesofLinuxinformation.eTheformatandcontentissimilarinnaturelgtoUUtheMET*A-FAQ;incidentally*,itisalsomaintainedbyMichaelK.Johnson.$"TheLinuxSoftwar}'eMaplgTheޘLinuxSoftwareMapisalistofmanyapplicationsavqailableforLinux,Xwheretolgget.them,6[whomaintainsthem,andsoforth.dItisfarfromcomplete|tocompilealgcompletelistofLinuxsoftwarewouldbGenearlyimpossible.+However,itdoesincludelgmanySofthemostpGopularLinuxsoftwarepackqages.Ifyoucan't ndaparticularlgapplicationotosuityourneeds,6theLSMZisagoGodoplacetostart.kItismaintainedlgbyUULarsWirzenius,lars.wirzenius@helsinki.fi.$"TheLinuxHOWTOIndexlgThe#LinuxHOWTOsareacollectionof\howto"doGcuments,WYeachdescribinginlgdetail$acertainaspGectoftheLinuxsystem.L3TheyaremaintainedbyMattW*elsh,lgmdw@sunsite.unc.edu.TheHOWTOIndexliststheHOWTOdoGcumentswhichlgareUUavqailable(severalofwhicharelistedbGelow).$"TheLinuxInstallationHOWTOlgTheOLinuxInstallationHOWTOOdescribGeshowtoobtainandinstalladistributionlgofUULinux,similartotheinformationpresentedinChapter2.$"TheLinuxDistributionHOWTOlgThisdoGcumentisalistofLinuxdistributionsavqailableviamailorderandanony-lgmous&FTP*.ItalsoincludesinformationonotherLinux-relatedgoGodies&andservices.lgAppGendix!BcontainsalistofLinuxvendors,TmanyofwhicharelistedintheDis-lgtributionHOWTO.$"TheLinuxXF;r}'ee86HOWTOlgThisNdoGcumentdescribeshowtoinstallandcon guretheXWindowSystemsoft-lgwareUUforLinux.qSeethesection\5.1"formoreabGouttheXWindowSystem.$"TheLinuxMail,News,andUUCPHOWTOslgTheseKthreeHOWTOKdoGcumentsKdescribecon gurationandsetupofelectronicmail,lgnews,andUUCPcommunicationsonaLinuxsystem.P?Whilelgthisڛlistisfarfromcomplete,'itshouldgiveyouageneralpictureofwhichhardware Ձ(b{$"$"A.2.Lin9uxTDoQcumentationProjectManuals;183KP덑lgdevicesUUshouldbGesupportedbythesystem.J$"TheLinuxSCSIHOWTO lgThe4LinuxSCSI$HOWTOis4acompleteguidetocon gurationandusageofSCSIlgdevicesUUunderLinux,suchasharddrives,tapGedrivesandCD-ROM.$"TheLinuxNET-2-HOWTOlgTheLinuxNET-2-HOWTOdescribGesinstallation,setup,andcon gurationofthelg\NET-2"eTCP/IPesoftwareunderLinux,includingSLIP*.IfyouwanttouseTCP/IPlgonUUyourLinuxsystem,thisdoGcumentisamustread.$"TheLinuxEthernetHOWTOlgCloselyhBrelatedtotheNET-2-HOWTO,theEthernetHOWTOhdescribGesthevqariouslgEthernetdevicessuppGortedbyLinux,andexplainshowtocon gureeachofthemlgforUUusebytheLinuxTCP/IPsoftware.$"TheLinuxPrintingHOWTOlgThisїdoGcumentdescribeshowtocon gureprintingsoftwareunderLinux,suchaslglpr. blCon gurationofprintersandprintingsoftwareunderUNIXucanbGeverylgconfusingUUattimes;thisdoGcumentshedssomelightonthesub8ject.$"Otheronlinedo}'cumentslgIf youbrowsethedocssubGdirectoryofanyLinuxFTPsite,you'llseemanyotherlgdoGcumentswhicharenotlistedhere:$AslewofFAQ's,interestingtidbits,andotherlgimpGortantSinformation.LThismiscellanyisdiculttocategorizehere;ifyoudon'tlgseewhatyou'reloGokingforonthelistabove,justtakealoGokatoneoftheLinuxlgarchiveUUsiteslistedinAppGendixC.16ލ$"A.2N?Lin=uxDoucumentationProjectManuals׍$"TheLinuxDoGcumentationPro8jectisworkingondevelopingasetofmanualsandotherdoGcumen-$"tationforLinux,Bincludingmanpages. Thesemanualsareinvqariousstagesofdevelopment,Band$"anyhelprevisingandupGdatingthemisgreatlyappreciated.IfyouhavequestionsabGouttheLDP*,$"pleaseUUcontactMattW*elsh(mdw@sunsite.unc.edu).ؼ3"ThesebGooksareavqailableviaanonymousFTPfromanumbGerofLinuxarchivesites,including$"sunsite.unc.eduinthedirectory/pub/Linux/docs/LDP.A޺numbGerofcommercialdistributorsare$"sellingVprintedcopiesofthesebGooks;inVthefuture, VyoumaybGeableto ndtheLDP>manualsonthe$"shelvesUUofyourloGcalbookstore.N$"LinuxInstallationandGettingStarte}'d,UUbyMattW*elshlgACnewcuser'sguideforLinux,coveringceverythingthenewuserneedstoknowtolggetUUstarted.qY*ouhappGentoholdthisbookinyourhands.$"TheLinuxSystemA}'dministrators'Guide,UUbyLarsWirzenius m(b{$"$"A.3.BoQoksTandOtherPublishedW orkse 184KP덑lgThisLisacompleteguidetorunningandcon guringaLinuxsystem.WThereare lgmany:issuesrelatingtosystemsadministrationwhicharespGeci ctoLinux,ssuchlgas#qneedsforsuppGortingausercommunity*,V lesystem#qmaintenance,backups,andlgmore.qThisUUguidecoversUUthemall.J$"TheLinuxNetworkA}'dministrators'Guide,UUbyOlafKirchlgAn%+extensiveandcompleteguidetonetworkingunderLinux,Y includingTCP/IP*,lgUUCP*,BSLIP,andmore.:hThisbGookisaverygoodread;itcontainsawealthoflginformationgonmanysub8jects,`clarifyingthemanyconfusingaspGectsofnetworklgcon guration.$"TheLinuxKernelHackers'Guide,UUbyMichaelJohnsonlgThe$ grittydetailsofkernelhackinganddevelopmentunderLinux.a`Linuxisuniquelgin)thatthecompletekernelsourceisavqailable. ]DThisbGook)opensthedoorstolgdevelopGersQwhowishtoaddormodifyfeatureswithinthekernel.ThisguidealsolgcontainscomprehensivecoverageofkernelconceptsandconventionsusedbyLinux.16ލ$"A.3N?BouoksandOtherPublishedWorks׍$"LinuxbJournaliskamonthlymagazineforandabGouttheLinuxcommunity*, writtenandproGduced$"byanumbGerofLinuxdevelopGersandenthusiasts.rItisdistributedworldwide,andisanexcellent$"wayMtokeepintouchwiththedynamicsoftheLinuxworld,KespGeciallyifyoudon'thaveaccessto$"USENETUUnews.ؼ3"At/thetimeofthiswriting, subscriptionstoLinux=IJournalareUS$19/yearintheUnitedStates,$"US$24jBinCanada,}andUS$29elsewhere.T*osubscribGe,orformoreinformation,writetoLinux$"Journal,POBox85867,Seattle,WA,98145-1867,USA,orcall+1206527-3385.5TheirFAXnumbGer$"isW+1206527-2806,XVande-mailaddressislinux@ssc.com.xY*oucanalso ndaLinuxJournal`EFAQ$"andVssamplearticlesviaanonymousFTPV2onsunsite.unc.eduin/pub/Linux/docs/linux-journal.3"As1wehavesaid,8notmanybGooks1havebGeenpublisheddealingwithLinuxspGeci cally*.eHowever,$"ifzwyouarenewtotheworldofUNIX,orwantmoreinformationthanispresentedhere,wesuggest$"thatUUyoutakealoGokatthefollowingbGooksUUwhichareavqailable.#$"A.3.1PVUsingUNIXJ$"Title:zL}'earningtheUNIXOp}'eratingSystemCj$"Author:zGraceUUT*oGdino&JohnStrang$"Publisher:zO'ReillyUUandAssoGciates,1987$"ISBN:z0-937175-16-1,UU$9.00 L"AgoGodintroductorybookonlearningtheUNIXoperatingsystem.Mostofthe ="informationuwshouldbGeapplicabletoLinuxaswell.,IunsuggestreadingthisbGookuwifyou're +(b{$"$"A.3.BoQoksTandOtherPublishedW orkse 185KP덑="newUUtoUNIXandreallywantUUtogetstartedwithusingyournewsystem.&$"Title:zL}'earningtheviEditorCj$"Author:zLindaUULamb$"Publisher:zO'ReillyUUandAssoGciates,1990$"ISBN:z0-937175-67-6,UU$21.95 L"ThisoisabGookoaboutthevieditor,ҵapowerfultexteditorfoundoneveryUNIX ="system#intheworld.1It'softenimpGortanttoknowandbGeabletousevi,Vbecauseyou="won'tUUalwayshaveaccesstoa\real"editorsuchasEmacs.#$"A.3.2PVSystemsAdministrationJ$"Title:zEssentialSystemA}'dministrationCj$"Author:zleenUUF*risch$"Publisher:zO'ReillyUUandAssoGciates,1991$"ISBN:z0-937175-80-3,UU$29.95L"F*romRtheO'ReillyandAssoGciatesCatalog,\Likeanyothermulti-usersystem,UNIX ="requiressomecareandfeeding.EssentialKZSystemA}'dministrationtellsyouhow.This="bGook ?stripsaway ?themythandconfusionsurroundingthisimpGortanttopicandprovides="acompact,>manageableintroGductiontothetasksfacedbyanyonerespGonsibleforaUNIX="system."qIUUcouldn'thaveUUsaiditbGettermyself.&$"Title:zTCP/IPNetworkA}'dministrationCj$"Author:zCraigUUHunt$"Publisher:zO'ReillyUUandAssoGciates,1990$"ISBN:z0-937175-82-X,UU$24.95L"A@hcomplete@guidetosettingupandrunningaTCP/IPnetwork.While@thisbGook@isnot ="Linux-spGeci c,kroughly90%ofitisapplicabletoLinux.OCoupledwiththeLinuxNET-2-="HOWTOUandULinuxyNetworkA}'dministrator'syGuide,VthisisagreatbGookdiscussingthe="conceptsUUandtechnicaldetailsofmanagingTCP/IP*.&$"Title:zManagingUUCPandUsenetCj$"Author:zTimUUO'ReillyandGraceT*oGdino$"Publisher:zO'ReillyUUandAssoGciates,1991$"ISBN:z0-937175-93-5,UU$24.95 e(b{$"$"A.3.BoQoksTandOtherPublishedW orkse 186KP덑L"ThisWjbGookcovershowtoinstallandcon gureUUCPnetworkingsoftware,Wincluding ="con guration^forUSENET^news.Ifyou'reatallinterestedinusingUUCP^oraccessing="USENETUUnewsonyoursystem,thisbGookUUisamust-read.#$"A.3.3PVTheXWindowSystemJ$"Title:zTheXWindowSystem:AUser'sGuideCj$"Author:zNiallUUMans eld$"Publisher:zAddison-W*esley$"ISBN:z0-201-51341-2,UU?? L"Acomplete7tutorialandreferenceguidetousingtheXWindowSystem.nIfyou ="installedYXwindowsonyourLinuxsystem,andwanttoknowhowtogetthemostout="of+1it,`youshouldreadthisbGook.[Unlike+1somewindowingsystems,`alotofthepGower="providedUUbyXisnotobviousat rstsight.$"A.3.4PVProgrammingJ$"Title:zTheCPr}'ogrammingLanguageCj$"Author:zBrianUUKernighanandDennisRitchie$"Publisher:zPrentice-Hall,UU1988$"ISBN:z0-13-110362-8,UU$25.00 L"ThisybGookisamust-haveforanyonewishingtodoCxprogrammingonaUNIXsystem. ="(Oranysystem,.forthatmatter.){WhilethisbGookisnotobstensiblyUNIX-spGeci c,it="isUUquiteapplicabletoprogrammingCunderUNIX.&$"Title:zTheUnixPr}'ogrammingEnvironmentCj$"Author:zBrianUUKernighanandBobPike$"Publisher:zPrentice-Hall,UU1984$"ISBN:z0-13-937681-X,UU??L"An]overviewtoprogrammingundertheUNIX]system.CoversallofthetoGolsofthe ="trade;a:goGodreadtogetacquaintedwiththesomewhatamorphousUNIXprogramming="world.&$"Title:zA}'dvancedProgrammingintheUNIXEnvironmentCj$"Author:zW.UURichardStevens$"Publisher:zAddison-W*esley (b{$"$"A.3.BoQoksTandOtherPublishedW orkse 187KP덍$"ISBN:z0-201-56317-7,UU$50.00 L"ThismightytomecontainseverythingthatyouneedtoknowtoprogramUNIXat ="thelsystemlevel| leI/O,proGcesscontrol,hinterproGcesscommunication,hsignals,terminal="I/O, 2theworks.`ThisbGook 2focusesonvqariousUNI $standards,*includingPOSIX.1,which="LinuxUUmostlyadheresto.#$"A.3.5PVKernelHackingJ$"Title:zTheDesignoftheUNIXOp}'eratingSystemCj$"Author:zMauriceUUJ.Bach$"Publisher:zPrentice-Hall,UU1986$"ISBN:z0-13-201799-7,UU??L"This?bGookcoversthealgorithmsandinternalsoftheUNIX4kernel.ItisnotspGeci c ="tokXanyparticularkernel,palthoughitdoGesleantowardsSystemV-isms.ThisisthebGest="placeUUtostartifyouwanttounderstandtheinnertickingsoftheLinuxsystem.&$"Title:zTheMagicGar}'denExplainedCj$"Author:zBernyUUGoGodheartandJamesCox$"Publisher:zPrentice-Hall,UU1994$"ISBN:z0-13-098138-9,UU??L"ThisbGookdescribestheSystemVR4kernelindetail.UnlikeBach'sbGook,=which ="concentratesheavilyonthealgorithmswhichmakethekerneltick,thisbGookpresentsthe="SVR4Oimplementationonamoretechnicallevel.oAlthoughLinuxandSVR4aredistant="cousins,~thisbGookcangiveyoumuchinsightintotheworkingsofanactualUNIXkernel="implementation.jThisRisalsoaverymoGdernbookontheUNIXRkernel|publishedin="1994. (b{K$"KAppendixFB;]ڍ$"ILin4ux VendorList:ؼ$"ThisAappGendixlistscontactinformationforanumbGerofvendorswhichsellLinuxondiskette,EtapGe, $"and4MCD-ROM.ManyofthemprovideLinuxdoGcumentation,l support,and4Motherservicesaswell.$"Thisisbynomeansacompletelisting;(ifyoupurchasedthisbGookinprintedform, it'sverypGossible$"thatUUthevendororpublishingcompanyalsoprovidesLinuxsoftwareandservices.ؼ3"Theauthormakesnoguaranteeastotheaccuracyofanyoftheinformationlistedinthis$"AppGendix.i|Thisinformationisincludedhereonlyasaservicetoreaders,notasanadvertisement$"forUUanyparticularorganization.ؼ="FintronicUULinuxSystems="1360UUWillowRd.,Suite205="MenloUUPark,CA94025USA="T*el:q+1UU415325-4474="F*ax:q+1UU415325-4908="linux@fintronic.com="InfoMagic,UUInc.="POUUBox30370="Flagsta ,UUAZ86003-0370USA="T*el:q+1UU800800-6613,+1602526-9565="F*ax:q+1UU602526-9573="Orders@InfoMagic.com="LasermoGonUULtd="2aUUBeacons eldRoad,F*areham,="Hants,UUEngland.qPO160QB.="T*el:q+44UU(0)329826444.="F*ax:q+44UU(0)329825936.="info@lasermoon.co.ukq188 (b{$"$"A.3.BoQoksTandOtherPublishedW orkse 189KP덑="LinuxUUJournal ="P*.O.UUBox85867="Seattle,UUWA98145-1867USA="T*el:q+1UU206527-3385="F*ax:q+1UU206527-2806="linux@ssc.comǍ="LinuxUUSystemsLabs="18300UUT*araDrive="ClintonUUTwp,MI48036USA="T*el:q+1UU313954-2829,+1800432-0556="F*ax:q+1UU313954-2806="info@lsl.com="MorseUUT*elecommunication,Inc.="26UUEastParkAvenue,Suite240="LongUUBeach,NY11561USA="T*el:q+1UU80060-MORSE="F*ax:q+1UU516889-8665="Linux@morse.net="NascentUUT*echnology="LinuxUUfromNascentCDROM="P*.O.UUBox60669="SunnyvqaleUUCA94088-0669USA="T*el:q+1UU408737-9500="F*ax:q+1UU408241-9390="nascent@netcom.com="RedUUHatSoftware="P*.O.UUBox4325="ChapGelUUHill,NC27515USA="T*el:q+1UU919309-9560="redhat@redhat.com="SWUUT*echnology="251UUW*estRennerSuite229="Richardson,UUTX75080USA="T*el:q+1UU214907-0871="swt@netcom.com="T*akelapUUSystemsLtd.="TheUUReddings,CourtRobinLane,="Llangwm,UUUsk,Gwent,UUUnitedKingdomNP51ET. (b{$"$"A.3.BoQoksTandOtherPublishedW orkse 190KP덑="T*el:q+44UU(0)291650357 ="F*ax:q+44UU(0)291650500="info@ddrive.demon.co.ukؼ="T*rans-AmeritechUUEnterprises,Inc.="2342AUUW*alshAve="SantaUUClara,CA95051USA="T*el:q+1UU408727-3883="roman@trans-ameritech.com="Uni xUUSoftwareGmbH="PostfachUU4918="D-38039UUBraunschweig="Germany="T*el:q+49UU(0)531515161="F*ax:q+49UU(0)531515162="YggdrasilUUComputing,IncorpGorated="4880UUStevensCreekBlvd.,Suite205="SanUUJose,CA95129-1034USA="T*el:q+1UU800261-6630,+1408261-6630="F*ax:q+1UU408261-6631="info@yggdrasil.com #(b{K$"KAppendixFC;]ڍ$"IFTP TutorialandSiteList:ؼ$"FTP1(\FileST*ransferProtoGcol")isthesetofprogramsthatareusedfortransferring lesbetween $"systems`ontheInternet.MostUNIX,VMS,andMS-DOS`systemsontheInternethaveaprogram$"calledftpwhichyouusetotransferthese les,R6andifyouhaveInternetaccess,R6thebGestwayto$"downloadJtheLinuxsoftwareisbyusingftp.R0ThisappGendixcoversbasicftpusage|ofcourse,$"thereUUaremanymorefunctionsandusesofftpthanaregivenhere.ؼ3"At^theendofthisappGendixthereisalistingofFTPHsiteswhereLinuxsoftwarecanbGefound.$"Also,if*youdon'thavedirectInternetaccessbutareabletoexchangeelectronicmailwiththe$"Internet,UUinformationonusingtheftpmailserviceisincludedbGelow.3"Ifyou'reusinganMS-DOS,UNIX,orVMSsystemtodownload lesfromtheInternet,Lthen$"ftpa"isacommand-drivenprogram..However,thereareotherimplementationsofftpoutthere,$"suchKastheMacintoshversion(calledFetch)withanicemenu-driveninterface,Mwhichisquiteself-$"explanatory*.LEven&ifyou'renotusingthecommand-drivenversionofftp,[7theinformationgiven$"hereUUshouldhelp.ؼ3"ftpcanbGeusedtobothupload(send)ordownload(receive) lesfromotherInternetsites.-eIn$"mostZsituations,Tyou'regoingtobGedownloadingsoftware.OntheInternettherearealargenumbGerof$"publicly-avqailable=)FTParc9hivesites,Amachines=)whichallowanyonetoftptothemanddownload$"free]software.Onesucharchivesiteissunsite.unc.edu,ܟwhichhasalotofSunMicrosystems$"software,aand^actsasoneofthemainLinuxsites.UInaddition,FTPKarchive^sitesmirrorsoftware$"toCveachother|thatis,G softwareuploadedtoonesitewillbGeautomaticallycopiedovertoanumbGer$"ofUUothersites.qSodon'tbGesurprisedifyouseetheexactsame lesonmanydi erentarchivesites.($"C.1MStartingNftp׍$"Notethatintheexample\screens"printedbGelowI'monlyshowingthemostimpGortantinforma-$"tion,andƅwhatyouseemaydi er.XAlso,commandsinitalicsrepresentcommandsthatyoutypGe;$"everythingUUelseisscreenoutput.q191 'g(b{$"$"C.2.LoggingTInO%192KP덑3"T*oUUstartftpandconnecttoasite,simplyusethecommandpݍ="ftphMhostnameipލ$"wherehhostnameiisthenameofthesiteyouareconnectingto.F*orexample,Ctoconnecttothe $"mythicalUUsiteshoop.vpizza.comwecanusethecommand="ftpshoop.vpizza.com(.$"C.2MLoggingIn׍$"WhenUUftpstartsupweshouldseesomethinglike="Connectedtoshoop.vpizza.com.="220Shoop.vpizza.comFTPDreadyat15Dec199208:20:42EDT="Name(shoop.vpizza.com:mdw):pލ$"Here,eftpisaskingustogivetheusernamethatwewanttologinasonshoop.vpizza.com. The$"defaultfhereismdw,whichismyusernameonthesystemI'musingFTPPfrom.TSinceIdon'thavefan$"account4onshoop.vpizza.comI#can'tloginasmyself.[Instead,toaccesspublicly-avqailablesoftware$"onkFanFTPkAsiteyouloginasanonymous,pandgiveyourInternete-mailaddress(ifyouhaveone)as$"theUUpassword.qSo,wewouldtypGe="Name(shoop.vpizza.com:mdw): s,anonymous="331-Guestloginok,sende-mailaddressaspassword.="Password: s,mdw@sunsite.unc.edu="230-Welcometoshoop.vpizza.com.="230-VirtualPizzaDelivery[tm]: s,Downloadpizzain30cyclesorless="230-oryougetitFREE!="ftp>pލ$"OfxVcourse,youshouldgiveyoure-mailaddress,insteadofmine,anditwon'techotothescreenas$"you'retypingit(sinceit'stechnicallya\password").Eftpshouldallowustologinandwe'llbGeready$"toUUdownloadsoftware.(.$"C.3MP=okingAround׍$"Okqay*, we're vin.Y}ftp>isourprompt,andtheftpprogramiswaitingforcommands.Y}Thereareafew$"basicUUcommandsyouneedtoknowabGout.qFirst,thecommands="lshM leipލ$"and 2<(b{$"$"C.3.P9okingTAround8[K193KP덑="dirhM leiؼ$"bGoth~=give lelistings(whereh leiisanoptionalargumentspGecifyingaparticular lenametolist). $"Thedi erenceisthatlsusuallygivesashortlistinganddirgivesalongerlisting(thatis,|with$"moreUUinformationonthesizesofthe les,datesofmoGdi cation,andsoon).ؼ3"TheUUcommand="cdhMdirectoryi$"willmovetothegivendirectory(justlikethecdcommandonUNIXorMS-DOSsystems).QQY*oucan$"useUUthecommand="cdup$"toUUchangetotheparentdirectory^1|s.ؼ3"TheUUcommand="helphMcommandi$"willJgivehelponthegivenftphcommandi(suchaslsorcd).nIfnocommandisspGeci ed,LUftpwill$"listUUalloftheavqailablecommands.ؼ3"IfUUwetypGediratthispointwe'llseeaninitialdirectorylistingofwhereweare.卑="ftp>dir =="200PORTcommandsuccessful.="150OpeningASCIImodedataconnectionfor/bin/ls.="total1337=="dr-xr-xr-x s,2rootwheel*F512Aug1313:55bin="drwxr-xr-x s,2rootwheel*F512Aug1313:58dev="drwxr-xr-x s,2rootwheel*F512Jan2517:35etc="drwxr-xr-x19rootwheel%̰1024Jan2721:39pub="drwxrwx-wx s,4rootftp-admi1024Feb s,622:10uploads="drwxr-xr-x s,3rootwheel*F512Mar111992usr="226Transfercomplete. ="921bytesreceivedin0.24seconds(3.7Kbytes/s)="ftp>3"Eachoftheseentriesisadirectory*,ʎnotanindividual lewhichwecandownload(spGeci edby$"theWdinthe rstcolumnofthelisting).xOnmostFTParchiveWsites,X=thepubliclyavqailablesoftware$"isUUunderthedirectory/pub,solet'sgothere.$"Jffr .S "5-:1LܸTheXdirectoryabdir="200PORTcommandsuccessful.="150ASCIIdataconnectionfor/bin/ls(128.84.181.1,4525)(0bytes).="total846=="-rw-r--r--,1rootstaff%̰1433Jul12 s,1988README="-r--r--r--,13807staff!15586May13 s,1991US-DOMAIN.TXT.2="-rw-r--r--,1539Ystaff!52664Feb20 s,1991altenergy.avail="-r--r--r--,165534X65534!56456Dec17 s,1990ataxx.tar.Z="-rw-r--r--,1rootother2013041Jul s,31991gesyps.tar.Z="-rw-r--r--,1432Ystaff!41831Jan30 s,1989gnexe.arc="-rw-rw-rw-,1615Ystaff!50315Apr16 s,1992linpack.tar.Z="-r--r--r--,1rootwheel!12168Dec25 s,1990localtime.o="-rw-r--r--,1rootstaff%̰7035Aug27 s,1986manualslist.tblms="drwxr-xr-x,22195staff*F512Mar1000:48mdw="-rw-r--r--,1rootstaff%̰5593Jul19 s,1988t.out.h="226ASCIITransfercomplete. ="2443bytesreceivedin0.35seconds(6.8Kbytes/s)="ftp>ؼ3"Here3wecanseeanumbGerof(interesting?)f les,:JoneofwhichiscalledREADME,whichweshould$"downloadUU(mostFTPsiteshaveaREADME leinthe/pubdirectory).($"C.4MDo=wnloading les׍$"BeforeUUdownloading les,thereareafewthingsthatyouneedtotakecareof.ؼ3"="T urn=/onhashmarkprin9ting.Hashmarks@areprintedtothescreenas lesarebGeing="transferred;they{letyouknowhowfaralongthetransferis,xandthatyourconnectionhasn't="hung'up(soyoudon'tsitfor20minutes,\}thinkingthatyou'restilldownloadinga le).ZIn="general,~ahashmarkappGearsasapoundsign(#),~andoneisprintedforevery1024or8192="bytesUUtransferred,depGendingonyoursystem.="T*oUUturnonhashmarkprinting,givethecommandhash.S"ftp>hashS"Hashmarkprintingon(8192bytes/hashmark).S"ftp>3"="DetermineNthet9ypQeof lewhichyouaredownloading.8AsfarasFTPisconcerned,=" lescomeintwo avors:`binaryandtext.؇Mostofthe leswhichyou'llbGedownloadingare="binaryz les:thatis,asciiS"200TypesettoA.S"ftp>3"="Set:y9ourloQcaldirectory .nY*our^Ilo}'caldirectoryisthedirectoryonyoursystemwhereyouwant="the[downloaded lestoendup.dWhereasthecdcommandchangestheremotedirectory(on="theUUremotemachinewhichyou'reFTPingto),thelcdcommandchangestheloGcaldirectory*.="F*orUUexample,tosettheloGcaldirectoryto/home/db/mdw/tmp,usethecommandS"ftp>lcdNؼ3"NowUUyou'rereadytoactuallydownloadthe le.qThecommand="gethMremote-nameihMloAcal-namei$"is'usedforthis,\wherehremote-nameiisthenameofthe leontheremotemachine,andhloGcal- $"namei?isthenamethatyouwishtogivethe leonyourloGcalmachine.^ThehloGcal-nameiargument$"is1optional;bydefault,theloGcal lenameisthesameastheremoteone.[However,ifforexample$"you'redownloadingthe leREADME,andyoualreadyhaveaREADMEinyourloGcaldirectory*,you'll$"wantUUtogiveadi erenthloGcal- lenameisothatthe rstoneisn'toverwritten.ؼ3"F*orUUourexample,todownloadthe leREADME,wesimplyuseؼ="ftp>getN M(b{$"$"C.5.QuittingTFTP?196KP덍$"C.5MQuittingFTP׍$"T*oUUendyourFTPsession,simplyusethecommand="quit$"TheUUcommand="close$"can,bGeusedtoclosetheconnectionwiththecurrentremoteFTP,site;:ftheopencommandcanthen $"bGeUUusedtostartasessionwithanothersite(withoutquittingtheFTPprogramaltogether)..ҍ="ftp>close="221Goodbye.="ftp>quit'퍍$"C.6MUsingNftpmail׍$"ftpmailkisaservicewhichallowsyoutoobtain lesfromFTPkarchivesitesviaInternetelectronic$"mail."If'youdon'thavedirectInternetaccess,\ebutareabletosendmailtotheInternet(froma$"service%5suchasCompuServe,Y-forexample),ftpmailisagoGod%5waytoget lesfromFTP%archive$"sites.QUnfortunately*,ftpmailcanbGeslow,espGeciallywhensendinglargejobs.QBeforeattempting$"tosdownloadlargeamountsofsoftwareusingftpmail,{bGesurethatyourmailspGoolswillbGeableto$"handleqtheincomingtrac.S&Manysystemskeepquotasonincomingelectronicmail, andmaydelete$"yourUUaccountifyourmailexceedsthisquota.qJustusecommonsense.ؼ3"sunsite.unc.edu,Cone>ofthema8jorLinuxFTP>archivesites,Cishometoanftpmailserver.j.T*o$"useUUthisservice,sendelectronicmailto="ftpmail@sunsite.unc.edu$"withUUamessagebGodyUUcontainingonlytheword:="help$"ThisUUwillsendyoubackalistofftpmailcommandsandabrieftutorialonusingthesystem.ؼ3"F*orexample,togetalistingofLinux lesfoundonsunsite.unc.edu,sendmailtotheabGove $"addressUUcontainingthetext="opensunsite.unc.edu="cd/pub/Linux="dir="quit3"Y*oumayusetheftpmailservicetoconnecttoanyFTParchivesite;youarenotlimitedto$"sunsite.unc.edu.qTheUUnextsectionlistsanumbGerUUofLinuxFTParchives. Y(b{$"$"C.7.Lin9uxTFTPSiteList197KP덍$"C.7MLin=uxFTPSiteList׍$"T*ableE C.1isalistingofthemostwell-knownE FTPDarchivesiteswhichcarrytheLinuxsoftware. $"KeepHIGHER$"hip-hop,UU408-773-0768.q19.2kSunnyvqale,CA.USENETaccess$"hip-hop,UU408-773-0768.q38.4kSunnyvqale,CA.$"UnixTOnline,UU707-765-4631.q9600Petaluma,CA.USENETaccess$"TheTOuterRim,UU805-252-6342.SantaClarita,CA.$"Programmer'sTExc9hange,UU818-444-3507.ElMonte,CA.Fidonet$"Programmer'sTExc9hange,UU818-579-9711.ElMonte,CA.$"MicroTOasis,UU510-895-5985.q14.4kSanLeandro,CA.$"T estTEngineering,UU916-928-0504.Sacramento,CA.$"SlutTClub,UU813-975-2603.qUSR/DS16.8kHST/14.4KT*ampa,FL.Fidonet1:377/42$"LostTCit9yAtlantis,UU904-727-9334.q14.4kJacksonville,UUFL.FidoNet$"AquiredTKno9wledge,UU305-720-3669.q14.4kv.32bisFt.Lauderdale,FL.Internet,UUCP$"TheComputerMec9hanic,813-544-9345.14.4khv.32bisSt.Petersburg,FL.Fidonet,Sailnet,$"MXBBSnet$"AVSync,UU404-320-6202.Atlanta,GA.$"InformationTOv9erload,UU404-471-1549.q19.2kZyXELAtlanta,UUGA.Fidonet1:133/308$"A9tlantaTRadioClub,UU404-850-0546.q9600Atlanta,UUGA.q198 j(b{$"$"D.1.UnitedTStates?b199KP덑$"RebQelTBBS,UU208-887-3937.q9600Boise,ID. $"RoQc9kyTMountainHUB,UU208-232-3405.q38.4kPoGcatello,ID.Fionet,SLNet,CinemaNet$"Ec9hoMania,UU618-233-1659.q14.4kHSTBelleville,IL.Fidonet1:2250/1,f'reqLINUX$"UNIXTUSER,UU708-879-8633.q14.4kBatavia,IL.USENET,Internetmail$"PBSTBBS,UU309-663-7675.q2400BloGomington,IL.$"ThirdTW orld,UU217-356-9512.q9600v.32IL.$"DigitalTUnderground,UU812-941-9427.q14.4kv.32bisIN.USENET$"TheTO9ASouthernStar,UU504-885-5928.NewOrleans,LA.Fidonet1:396/1$"ChannelTOne,UU617-354-8873.Boston,MA.RIME->CHANNEL$"VWISTLin9uxSuppQortBBS,UU508-793-1570.q9600W*orcester,MA.$"W a9yStarTBBS,UU508-481-7147.q14.4kV.32bisUSR/HSTMarlbGorough,MA.Fidonet1:333/14$"W a9yStarTBBS,UU508-481-7293.q14.4kV.32bisUSR/HSTMarlbGorough,MA.Fidonet1:333/15$"W a9yStar^3BBS,508-480-8371. }9600V.32bisor14.4kUSR/HSTMarlbGorough,MA.Fidonet$"1:333/16$"Programmer'sTCen9ter,UU301-596-1180.q9600Columbia,MD.RIME$"BroQdmann'sTPlace,UU301-843-5732.q14.4kW*aldorf,MD.RIME->BRODMANN,Fidonet$"MainTF rame,UU301-654-2554.q9600Gaithersburg,MD.RIME->MAINFRAME$"1TZeroCybQernetBBS,UU301-589-4064.MD.$"W aterDeepTBBS,UU410-614-2190.q9600v.32Baltimore,MD.$"HarbQorTHeigh9tsBBS,UU207-663-0391.q14.4kBoGothbayUUHarbor,ME.$"P9art-TimeTBBS,UU612-544-5552.q14.4kv.32bisPlymouth,MN.$"TheTSoleSurviv9or,UU314-846-2702.q14.4kv.32bisSt.Louis,MO.WWIVnet,WWIVlink,etc$"MA9C'sTPlace,UU919-891-1111.q16.8k,DSmoGdemDunn,NC.RIME->MAC$"DigitalTDesigns,UU919-423-4216.q14.4k,2400HopGeMills,NC.$"FliteTLine,UU402-421-2434.Lincoln,NE.RIME->FLITE,DSmoGdem$"Legend,UU402-438-2433.Lincoln,NE.DSmoGdem$"MegaByteTMansion,UU402-551-8681.q14.4V,32bisOmaha,NE.$"MycroftTQNX,UU201-858-3429.q14.4kNJ.$"Stev9eTLeon's,UU201-886-8041.q14.4kCli sidePark,NJ.$"Dwigh9t-EnglewoQodTBBS,UU201-569-3543.q9600v.42EnglewoGod,UUNJ.USENET$"TheTMothershipCnection,UU908-940-1012.q38.4kF*ranklinPark,NJ.$"TheTLabQoratory,UU212-927-4980.q16.8kHST,14.4kv.32bisNY.FidoNet1:278/707$"V alhalla, 516-321-6819.w14.4kHSTv.32Babylon,NY.Fidonet(1:107/255),UseNet$"(die.linet.org)$"In9termittentTConnection,UU503-344-9838.q14.4kHSTv.32bisEugene,OR.1:152/35$"HorizonTSystems,UU216-899-1086.qUSRv.32W*estlake,OH.$"HorizonTSystems,UU216-899-1293.q2400W*estlake,OH.$"Cen9treTProgrammersUnit,UU814-353-0566.q14.4kV.32bis/HSTBellefonte,P*A.$"Allen9townTT echnical,UU215-432-5699.q9600v.32/v.42bisAllentown,UUP*A.WWIVNet2578$"T actical-OpQerations,814-861-7637.M14.4kʂV32bis/V42bisStateCollege,P*A.Fidonet1:129/226,$"tacEff&fǫops.UUCP$"NorthTShoreBBS,UU713-251-9757.Houston,TX.$"TheTAnnex,UU512-575-1188.q9600HSTTX.Fidonet1:3802/217$"TheTAnnex,UU512-575-0667.q2400TX.Fidonet1:3802/216 s(b{$"$"D.2.OutsideToftheUnitedStates>200KP덑$"W altTFairs,UU713-947-9866.Houston,TX.FidoNet1:106/18 $"CybQerVille,UU817-249-6261.q9600TX.FidoNet1:130/78$"splat-oQoh,UU512-578-2720.q14.4kVictoria,TX.$"splat-oQoh,UU512-578-5436.q14.4kVictoria,TX.$"alaree,UU512-575-5554.q14.4kVictoria,TX.$"Ronin_BBS,214-938-2840.O14.4HST/DSW*axahachie(Dallas),~TX.RIME,Intelec,~Smartnet,etc.$"VTBBS,UU703-231-7498.Blacksburg,VA.$"MBT,UU703-953-0640.Blacksburg,VA.$"NO9VA,UU703-323-3321.q9600Annandale,VA.Fidonet1:109/305$"Rem-Jem,UU703-503-9410.q9600F*airfax,VA.$"Enligh9tend,UU703-370-9528.q14.4kAlexandria,VA.Fidonet1:109/615$"MyTUnKno9wnBBS,UU703-690-0669.q14.4kV.32bisVA.Fidonet1:109/370$"GeorgiaTP9eachBBS,UU804-727-0399.q14.4kNewpGortNews,VA.$"T opTHatBBS,UU206-244-9661.q14.4kWA.Fidonet1:343/40$"victrola.sea.w9a.us,UU206-838-7456.q19.2kF*ederalWay,WA.USENET($"D.2NFSOutsideoftheUnitedStates׍$"Galaktisc9heTArchive,UU0043-2228303804.q16.8ZYXWien,Austria.Fidonet2:310/77(19:00-7:00)$"Lin9ux-SuppQort-Oz,+61-2-418-8750.v.32bise14.4kSydney*,NSW,Austrailia.Internet/Usenet,$"E-Mail/News$"500ccTF orm9ula1BBS,UU+61-2-550-4317.qV.32bisSydney*,NSW,Australia.$"MagicTBBS,UU403-569-2882.q14.4kHST/T*elebit/MNPCalgary,AB,Canada.qInternet/Usenet$"LogicalTSolutions,UU299-9900through9911.q2400AB,Canada.$"LogicalTSolutions,UU299-9912,299-9913.q14.4kCanada.$"LogicalTSolutions,UU299-9914through9917.q16.8kv.32bisCanada.$"V.A.L.I.S.,UU403-478-1281.q14.4kv.32bisEdmonton,AB,Canada.USENET$"TheTWindsorDo9wnload,UU(519)-973-9330.qv32bis14.4ON,Canada.$"r-noQde,UU416-249-5366.q2400T*oronto,ON,Canada.USENET$"Synapse,UU819-246-2344.q819-561-5268Gatineau,QC,Canada.RIME->SYNAPSE$"RadioTF reeNy9ongwa,UU514-524-0829.qv.32bisZyXELMontreal,QC,Canada.USENET,Fidonet$"DataComm1,Ҧ+49.531.132-16.14.4cHSTBraunschweig,NDS,cGermany*.Fido2:240/550,ҦLin-$"uxNet$"DataComm2,Ҧ+49.531.132-17.14.4cHSTBraunschweig,NDS,cGermany*.Fido2:240/551,ҦLin-$"uxNet$"Lin9uxServer/Braukmann,+49.441.592-963. 16.8!ZYX!;Oldenburg,NDS,Germany*. Fido$"2:241/2012,UULinuxNet$"MM'sTSpielebQo9x,UU+49.5323.3515.q14.4ZYXClausthal-Zfd.,NDS,Germany*.Fido2:241/3420$"MM'sTSpielebQo9x,UU+49.5323.3516.q16.8ZYXClausthal-Zfd.,NDS,Germany*.Fido2:241/3421$"MM'sTSpielebQo9x,UU+49.5323.3540.q9600Clausthal-Zfd.,NDS,Germany*.Fido2:241/3422$"Bit-Compan9y]/J.Bartz,~+49.5323.2539.\16.8ZYX˾MOClausthal-Zfd.,NDS,Germany*.\Fido$"2:241/3430 g(b{$"$"D.2.OutsideToftheUnitedStates>201KP덑$"F ractallcZoneBBSk/Maass,& +49.721.863-066. 316.8ZYXSKarlsruhe,BW,Germany*. 3Fido $"2:241/7462$"HippQosoftY/M.Junius,;+49.241.875-090.M14.4HSTAachen,NRW,Germany*.MFido2:242/6,4:30-$"7,8-23:30$"UB-HOFFT/A.Ho mann,UU+49.203.584-155.q19.2ZYX+Duisburg,Germany*.Fido2:242/37$"F9ORMEL-Box,*+49.4191.2846.q16.8ZYXKaltenkirchen,SHL,Germany*.qFido2:242/329,Lin-$"uxNetUU(6:00-20:00)$"BO9X/2,+49.89.601-96-77.416.8WZYXMuenchen,BA*Y,Germany.4Fido2:246/147,infomagic:$"LINUXUU(22-24,0:30-2,5-8)$"DieBo9xPassau2+1,>9+49.851.555-96.h&14.48rV32bPassau,BA*Y,Germany.h&Fido2:246/200(8:00-$"3:30)$"DieaBo9xPassauLine1,+49.851.753-789.<16.8|ZYX\Passau,BA*Y,Germany.202KP덑$"Galw9ayTOnline,UU+353-91-27454.q14.4kv32bGalway*,UUIreland.RIME,@iol.ie $"Nemesis'TDungeon,UU+353-1-324755or326900.q14.4kv32bisDublin,Ireland.Fidonet2:263/150$"nonsolosoft9ware,UU+39516140772.qv.32bis,v.42bisItaly*.Fidonet2:332/407$"nonsolosoft9ware,UU+3951432904.qZyXEL19.2kItaly*.Fidonet2:332/417$"Adv\rancedSystems,J@+64-9-379-3365.ZyXEL16.8kEAuckland,NewZealand.Singet,INTLnet,$"Fidonet$"Th9underballTCave,UU472567018.Norway*.qRIME->CAVE$"Do9wnT own BBSLelystad,j+31-3200-48852. 14.4k/Lelystad,Netherlands.Fido/2:512/155,$"UUCP$"MUGNETTIn9tl-CistronBBS,UU+31-1720-42580.q38.4kAlphena/dRijn,Netherlands.UUCP$"TheTCon9troversy,UU(65)560-6040.q14.4kV.32bis/HSTSingapGore.Fidonet6:600/201$"P9atsTSystem,UU+27-12-333-2049.q14.4kv.32bis/HSTPretoria,SouthAfrica.Fidonet5:71-1/36$"GunshipTBBS,UU+46-31-693306.q14.4kHSTDSGothenburgSweden.$"BabQoonTBBS,UU+41-62-511726.q19.2kSwitzerland.Fido2:301/580and/581$"TheTPurpleT en9tacle,UU+44-734-590990.qHST/V32bisReading,UK.Fidonet2:252/305$"A6TBBS,UU+44-582-460273.q14.4kHerts,UK.Fidonet2:440/111$"OnTtheBeac9h,UU+444-273-600996.q14.4k/16.8kBrighton,UK.Fidonet2:441/122 S(b{K$"KAppendixFE;]ڍ$"IThe GNUGeneralPublicLicense:ؼ$"PrintedbGelowistheGNUGeneralPublicLicense(theGPLorc}'opyleft),underwhichLinuxis $"licensed.[ItBisreproGducedheretoclearupsomeoftheconfusionaboutLinux'scopyrightstatus|$"Linux#isnotshareware,-anditisnotinthepublicdomain.FaThebulkoftheLinuxkerneliscopyright&鬞c$" ."1993εbyLinusT*orvqalds,- andothersoftwareandpartsofthekernelarecopyrightedbytheir$"authors.rThus,ULinuxUis'copyrighted,however,youUmayredistributeitunderthetermsoftheGPL$"printedUUbGelow.,7 KGNUFGENERALPUBLICLICENSEώXV*ersionUU2,June1991ؼ3"Copyrightn!c 1989,p1991F*reeSoftwareFoundation,pInc.f675MassAve,Cambridge,MA02139,$"USAjEveryoneispGermittedtocopyanddistributeverbatimcopiesofthislicensedoGcument,Inbut$"changingUUitisnotallowed.($"E.1LthPream=ble׍$"Thevlicensesformostsoftwarevaredesignedtotakeawayyourfreedomtoshareandchangeit.*By$"contrast,the}GNU}GeneralPublicLicenseisintendedtoguaranteeyourfreedomtoshareandchange$"freeKsoftware{tomakesurethesoftwareisfreeforallitsusers.nThisGeneralPublicLicenseapplies$"tomostoftheF*reeSoftwareFoundation'ssoftwareandtoanyotherprogramwhoseauthorscommit$"tousingit.]R(SomeotherF*reeSoftwareFoundationsoftwareiscoveredbytheGNULibraryGeneral$"PublicUULicenseinstead.)qY*oucanapplyittoyourprograms,toGo.3"WhenTwespGeakoffreesoftware,wearereferringtofreedom,notprice.pPOurGeneralPublic$"Licenses>aredesignedtomakesurethatyouhavethefreedomtodistributecopiesoffreesoftware$"(and\chargeforthisserviceifyouwish),ΝthatyoureceivesourcecoGdeorcangetitifyouwantit,$"thatHyoucanchangethesoftwareorusepiecesofitinnewfreeprograms;Aandthatyouknowyou$"canUUdothesethings.3"T*o.Oprotectyourrights,6weneedtomakerestrictionsthatforbidanyonetodenyyoutheserightsq203 Ӡ(b{$"$"E.2.T ermsTandConditionsforCop9ying,Distribution,andMoQdi cation5D204KP덑$"orTtoaskyoutosurrendertherights.qTheserestrictionstranslatetocertainrespGonsibilitiesforyou $"ifUUyoudistributecopiesofthesoftware,orifyoumoGdifyit.ؼ3"F*oryexample,Bifyoudistributecopiesofsuchaprogram,Bwhethergratisorforafee,youmust$"giveMtherecipientsalltherightsthatyouhave.4Y*oumustmakesurethatthey*,toGo,receiveMorcan$"getUUthesourcecoGde.qAndyoumustshowthemthesetermssotheyknowtheirrights.3"W*ebprotectyourrightswithtwosteps:h(1)copyrightthesoftware,eand(2)o eryouthislicense$"whichUUgivesyoulegalpGermissiontocopy*,distributeand/ormoGdifythesoftware.3"Also,9nfor2teachauthor'sprotectionandours,wewanttomakecertainthateveryoneunderstands$"that5thereisnowarranty5forthisfreesoftware.If5thesoftware5ismoGdi edbysomeoneelseand$"passedon,(wewantitsrecipientstoknowthatwhattheyhaveisnottheoriginal,(sothatany$"problemsUUintroGducedbyotherswillnotre ectontheoriginalauthors'reputations.3"Finally*,0Lanyfreeprogramisthreatenedconstantlybysoftwarepatents.KW*ewishtoavoidthe$"dangerthatredistributorsofafreeprogramwillindividuallyobtainpatentlicenses,Uine ectmaking$"thePprogramproprietary*.LToPpreventthis,wehavemadeitclearthatanypatentmustbGelicensed$"forUUeveryone'sfreeuseornotlicensedatall.3"TheUUprecisetermsandconditionsforcopying,distributionandmoGdi cationfollow.($"E.2LthTerms~andConditionsforCop=ying,Distribution,andLthMoudi cation/0[q0.="This Licenseappliestoanyprogramorotherworkwhichcontainsanoticeplacedbythe="copyrightGholdersayingitmaybGedistributedunderthetermsofthisGeneralPublicLicense.="TheA\Program",xbGelow,referstoanysuchprogramorwork,xanda\workbasedontheProgram"="meansaeithertheProgramoranyderivqativeworkundercopyrightlaw:thatistosay*,ha="workRdcontainingtheProgramorapGortionofit,ReitherverbatimorwithmoGdi cationsand/or="translatedintoanotherlanguage.F(Hereinafter,translationisincludedwithoutlimitationin="theUUterm\moGdi cation".)qEachlicenseeisaddressedas\you".="Activitiesotherthancopying,distributionandmoGdi cationarenotcoveredbythisLicense;="theygareoutsideitsscopGe.+TheactofrunningtheProgramisnotrestricted,andtheoutput="fromtheProgramiscoveredonlyifitscontentsconstituteaworkbasedontheProgram="(indepGendentofhavingbGeenmadebyrunningtheProgram).HWhetherthatistruedepGends="onUUwhattheProgramdoGes.0[q1.="Y*oulWmaycopyanddistributeverbatimcopiesoftheProgram'ssourcecoGdeasyoureceive="it,in*anymedium,providedthatyouconspicuouslyandappropriatelypublishoneachcopy="an appropriatecopyright noticeanddisclaimerofwarranty;jkeep intactallthenoticesthat="referzntothisLicenseandtotheabsenceofanywarranty;andgiveanyotherrecipientsofthe="ProgramUUacopyofthisLicensealongwiththeProgram.="Y*oulmaychargeafeeforthephysicalactoftransferringacopy*,randyoumayatyouroption="o erUUwarrantyprotectioninexchangeforafee. ,(b{$"$"E.2.T ermsTandConditionsforCop9ying,Distribution,andMoQdi cation5D205KP덍0[q2.="Y*oumaymoGdifyyourcopyorcopiesoftheProgramoranypGortionofit,&rthusformingawork ="basedontheProgram,-andcopyanddistributesuchmoGdi cationsorworkunderthetermsof="SectionUU1abGove,UUprovidedthatyoualsomeetalloftheseconditions:F[qa.S"Y*oumustcausethemoGdi ed lestocarryprominentnoticesstatingthatyouchangedS"theUU lesandthedateofanychange.E8b.S"Y*oumustcauseanyworkthatyoudistributeorpublish,thatinwholeorinpartcontainsS"orisderivedfromtheProgramoranypartthereof,tobGelicensedasawholeatnochargeS"toUUallthirdpartiesunderthetermsofthisLicense.Fc.S"IfthemoGdi edprogramnormallyreadscommandsinteractivelywhenrun,youmustS"cause it,dwhenstartedrunningforsuchinteractiveuseinthemostordinaryway*,dtoprintS"orPdisplayanannouncementincludinganappropriatecopyrightnoticeandanoticethatS"thereisnowarranty(orelse,>sayingthatyouprovideawarranty)andthatusersmayS"redistribute.Rtheprogramundertheseconditions,6 andtellingtheuserhowtoviewacopyS"of*ZthisLicense.(Exception:iftheProgramitselfisinteractive*ZbutdoGesnotnormallyS"printsuchanannouncement,WyourworkbasedontheProgramisnotrequiredtoprintanS"announcement.)="These^requirementsapplytothemoGdi edworkasawhole.,Ifidenti ablesectionsofthat="workarenotderivedfromtheProgram,andcanbGereasonablyconsideredindependentand="separateYworksinthemselves,[%thenthisLicense,anditsterms,donotapplytothosesections="whenwyoudistributethemasseparateworks..,Butwhenyoudistributethesamesectionsas="part^ofawholewhichisaworkbasedontheProgram,`1thedistributionofthewholemustbGe="on4thetermsofthisLicense,;OwhosepGermissionsforotherlicenseesextendtotheentirewhole,="andUUthustoeachandeverypartregardlessofwhowroteit.="Thus,O itMvisnottheintentofthissectiontoclaimrightsorcontestyourrightstoworkwritten="entirelyi%byyou;rather,btheintentistoexercisetherighttocontrolthedistributionofderivqative="orUUcollectiveworksbasedontheProgram.="Initwithawritteno er,Cvqalidforatleastthreeyears,Ctogiveanythirdparty*,CforS"a chargenomorethanyourcostofphysicallypGerformingsourcedistribution,%acompleteS"machine-readablecopyofthecorrespGondingsourcecode, tobedistributedundertheS"termsBofSections1and2abGoveBonamediumcustomarilyusedforsoftwareBinterchange;S"or, F(b{$"$"E.2.T ermsTandConditionsforCop9ying,Distribution,andMoQdi cation5D206KP덍Fc.S"Accompanyhitwiththeinformationyoureceivedastotheo ertodistributecorrespGonding S"source9HcoGde.hm(ThisalternativeisallowedonlyfornoncommercialdistributionandonlyifS"you)receivedtheprograminob8jectcoGdeorexecutableformwithsuchano er,2xinaccordS"withUUSubsectionbabGove.)="The8sourcecoGdeforaworkmeansthepreferredformoftheworkformakingmoGdi cationsto="it.1F*oranexecutablework,completesourcecoGdemeansallthesourcecodeforallmodules="ithcontains,mlplusanyassoGciatedinterfacede nition les,mlplusthescriptsusedtocontrolcom-="pilationandinstallationoftheexecutable.However,asaspGecialexception,thesourcecoGde="distributed]neednotincludeanythingthatisnormallydistributed(ineithersourceorbinary="form)Ewiththema8jorcompGonents(compiler,Bkernel,andEsoon)oftheopGeratingsystemon="whichUUtheexecutableruns,unlessthatcompGonentitselfaccompaniestheexecutable.="Ifdistributionofexecutableorob8jectcoGdeismadebyo eringaccesstocopyfromadesignated="place,اthendo eringequivqalentaccesstocopythesourcecoGdefromthesameplacecountsas="distributionnofthesourcecoGde,eventhoughthirdpartiesarenotcompelledtocopythesource="alongUUwiththeob8jectcoGde.0[q4.="Y*ou +maynotcopy*,*moGdify,sublicense,or +distributetheProgramexceptasexpresslyprovided="underthisLicense.yAnyattemptotherwisetocopy*, moGdify,sublicenseordistributethePro-="gramisvoid,andwillautomaticallyterminateyourrightsunderthisLicense.1However,parties="who~havereceivedcopies,orrights,fromyouunderthisLicensewillnothavetheirlicenses="terminatedUUsolongassuchpartiesremaininfullcompliance.0[q5.="Y*ouДarenotrequiredtoacceptthisLicense,csinceyouhavenotsignedit.However,cnothing="else5}grantsyoupGermissiontomodifyordistributetheProgramoritsderivqativeworks.g*These="actionsareprohibitedbylawifyoudonotacceptthisLicense.@Therefore,4bymoGdifyingor="distributingtheProgram(oranyworkbasedontheProgram),youindicateyouracceptance="ofthisLicensetodoso,andallitstermsandconditionsforcopying,distributingormoGdifying="theUUProgramorworksbasedonit.0[q6.="Each/timeyouredistributetheProgram(oranyworkbasedontheProgram),therecipient="automaticallyJ8receivesalicensefromtheoriginallicensortocopy*,qdistributeormoGdifythe="Programesub8jecttothesetermsandconditions.Y*oumaynotimpGoseanyfurtherrestrictions="ontherecipients'exerciseoftherightsgrantedherein.;Y*ouarenotrespGonsibleforenforcing="complianceUUbythirdpartiestothisLicense.0[q7.="If,ZasYaconsequenceofacourtjudgmentorallegationofpatentinfringementorforanyother="reasonG(notlimitedtopatentissues),IconditionsareimpGosedonyou(whetherbycourtorder,="agreementorotherwise)thatcontradicttheconditionsofthisLicense,theydonotexcuseyou="fromtheconditionsofthisLicense.V+Ifyoucannotdistributesoastosatisfysimultaneously="yourobligationsunderthisLicenseandanyotherpGertinentobligations,!thenasaconsequence="youLmaynotdistributetheProgramatall.nF*orexample,NMifapatentlicensewouldnotpGermit="royalty-freemredistributionoftheProgrambyallthosewhoreceivecopiesdirectlyorindirectly="throughAyou,EthentheonlywayyoucouldsatisfybGothitandthisLicensewouldbGetorefrain="entirelyUUfromdistributionoftheProgram. ύ(b{$"$"E.2.T ermsTandConditionsforCop9ying,Distribution,andMoQdi cation5D207KP덑="IfxanypGortionofthissectionisheldinvqalidorunenforceableunderanyparticularcircumstance, ="the"balanceofthesectionisintendedtoapplyandthesectionasawholeisintendedtoapply="inUUothercircumstances.="It+isnotthepurpGoseofthissectiontoinduceyoutoinfringeanypatentsorotherpropGerty="rightUclaimsortocontestvqalidityofanysuchclaims;&UthissectionhasthesolepurpGoseof="protectingQtheintegrityQofthefreesoftwareQdistributionsystem,whichisimplementedby="publiculicensepractices.ManypGeoplehavemadegenerouscontributionstothewiderangeof="softwareIdistributedthroughthatsysteminrelianceonconsistentapplicationofthatsystem;="it isuptotheauthor/donortodecideifheorsheiswillingtodistributesoftware throughany="otherUUsystemandalicenseecannotimpGosethatchoice.="ThisBsectionisintendedtomakethoroughlyclearwhatisbGelievedtobGeaconsequenceofthe="restUUofthisLicense.0[q8.="Ifthedistributionand/oruseoftheProgramisrestrictedincertaincountrieseitherbypatents="orDbycopyrightedinterfaces,H!theoriginalcopyrightholderwhoplacestheProgramunderthis="LicenseImayaddanexplicitgeographicaldistributionlimitationexcludingthosecountries,Lso="thatdistributionispGermittedonlyinoramongcountriesnotthusexcluded.SInsuchcase, this="LicenseUUincorpGoratesthelimitationasifwritteninthebodyofthisLicense.0[q9.="The F*reeSoftware Foundationmaypublishrevisedand/ornewversionsoftheGeneralPublic="Licensefromtimetotime.5SuchnewversionswillbGesimilarinspirittothepresentversion,="butUUmaydi erindetailtoaddressnewproblemsorconcerns.="EachversionisgivenadistinguishingversionnumbGer.IftheProgramspeci esaversion="numbGerCofthisLicensewhichappliestoitand\anylaterversion",youhavetheoptionof="following[thetermsandconditionseitherofthatversionorofanylaterversionpublished="byGtheF*reeSoftwareF*oundation.*IftheProgramdoGesnotspecifyaversionnumbGerofthis="License,UUyoumaychoGoseanyversioneverpublishedbytheF*reeSoftwareF*oundation.+[p10.="IfyouwishtoincorpGoratepartsoftheProgramintootherfreeprogramswhosedistribution="conditionsaredi erent,?writetotheauthortoaskforpGermission._F*orsoftwarewhichis="copyrightedLbytheF*reeSoftwareF*oundation,NIwritetotheFreeSoftwareF*oundation;Gwe="sometimesˎmakeexceptionsforthis.COurdecisionwillbGeguidedbythetwogoalsofpreserving="theXfreestatusofallderivqativesofourfreesoftwareandofpromotingthesharingandreuseof="softwareUUgenerally*.ќJNOWUARRANTY+[p11.="BECAUSEnTHEPROGRAMISLICENSEDFREEOFCHARGE,nTHEREISNOWAR-="RANTYFORTHEPROGRAM,TOTHEEXTENTPERMITTEDBYAPPLICABLE="LAW.y(EXCEPTyWHENOTHERWISEST*ATEDyINWRITINGTHECOPYRIGHTHOLD-="ERSZAND/OROTHERP*ARTIESZPROVIDETHEPROGRAM\ASIS"WITHOUTWAR-="RANTYłOFANYKIND,şEITHEREXPRESSEDORIMPLIED,INCLUDING,BUTNOT="LIMITEDTO,THEIMPLIEDWARRANTIESOFMERCHANT*ABILITYANDFITNESS="FORuAP*ARTICULARuPURPOSE.THEENTIRERISKASTOTHEQUALITYANDPER-="FORMANCEUOFTHEPROGRAMISWITHYOU.USHOULDTHEPROGRAMPROVE .(b{$"$"E.3.AppQendix:pHo9wTtoApplyTheseT ermstoYourNewProgramsG208KP덑="DEFECTIVE,TYOUTSASSUMETHECOSTOFALLNECESSAR*YSERVICING,REP*AIR ="ORUUCORRECTION.j&+[p12.="INNOEVENTUNLESSREQUIREDBYAPPLICABLELAWORAGREEDTOINWRIT-="ING&WILLANYCOPYRIGHTHOLDER,DORANYOTHERP*ARTY&WHOMA*YMODIFY="AND/ORREDISTRIBUTETHEPROGRAMASPERMITTEDABOVE,BELIABLETO="YOUkFORDAMAGES,INCLUDINGANYGENERAL,SPECIAL,INCIDENT*ALORCON-="SEQUENTIALDAMAGESARISINGOUTOFTHEUSEORINABILITYTOUSETHE="PROGRAM&(INCLUDINGBUTNOTLIMITEDTOLOSSOFDA*TA&ORDA*TA&BEING="RENDEREDINACCURA*TEORLOSSESSUSTAINEDBYYOUORTHIRDPARTIES="ORXAFAILUREOFTHEPROGRAMTOOPERA*TEWITHANYOTHERPROGRAMS),="EVENIFSUCHHOLDEROROTHERP*ARTYHASBEENADVISEDOFTHEPOSSI-="BILITYUUOFSUCHDAMAGES.AJENDOFTERMSANDCONDITIONS(K$"E.3LthAppuendix: vHo=wtoApplyTheseTermstoYourNewLthPrograms׍$"IfE0youdevelopanewprogram,&andyouwantittobGeofthegreatestpossibleusetothepublic,$"theWbGestwayWtoachieveWthisistomakeitfreesoftwarewhicheveryonecanredistributeandchange$"underUUtheseterms.ؼ3"T*oܢdoso,vattachthefollowingnoticestotheprogram.Itissafesttoattachthemtothestart$"of;neachsource letomoste ectivelyconveytheexclusionofwarranty;Dandeach leshouldhaveat$"leastUUthe\copyright"UUlineandapGointertowherethefullnoticeisfound..鍑="honelinetogivetheprogram'snameandabriefideaofwhatitdoGes.iCopyrightc 19yy="hnameUUofauthori="Thisiprogramisfreesoftware;syouicanredistributeitand/ormoGdifyitundertheterms="oftheGNUGeneralPublicLicenseaspublishedbytheF*reeSoftwareF*oundation;either="versionUU2oftheLicense,or(atyouroption)anylaterversion.="ThisltprogramisdistributedinthehopGethatitwillbeuseful,,UU97q?,UU95q~"qtoUUrefertohomedirectory*,81q386BSD,UU23IQqaccount"qcreating,UU76qaddgroup,UU131qaddingUUusers,128"qwithUUadduser,130q210 (b{$"$"INDEX|0211KP덑8"withUUuseradd,130 $"adduser,UU130$"afio,UU135$"alpha,UU18$"archivingUU les,132{134$"argument8"commandB"de ned,UU78$"backflops,UU135$"backgroundUUproGcess,105$"backgroundingUUjobs,107$"backups,UU134{1358"incremental,UU1358"multi-volume,UU1358"toUU oppydisk,135$"bash,UU93$"BBSUUlist,199{203$"BBSUUsoftware,138"FidoNet,UU13$"bGeta,UU18$"bg,UU108$"/bin,UU89$"bGooks,UU185{188$"bGootUU oppy*,61,1458"creating,UU126$"bGootUUscripts,143$"bGooting,UU49,125{1278"fromUUmaintenance oppy*,1458"problems,UU63{65,718"withUULILO,126{127$"bGootingUULinux8"withUUbGoot oppy*,126$"bGootingUUnon-Linuxsystems,126$"BourneUUagainshell,93$"BourneUUshell,7,93$"broadcastUUaddress8"de ned,UU168$"bugs,UU18$"CUUNews,180$"CUUShell(csh),7,93$"cat,UU898"toUUview lecontents,UU86$"cd,UU82{83,87P덒qchfn,UU131 qchmod,UU102qchsh,UU131qclient"qnews,qde ned,UU180qCoherent,UU24qcommand"qargument,qde ned,UU78"qde ned,UU78qcommand?notfoundUUerrormessage,78qcommands"q-UUtobGeginoptions,87"qgroupingUUwithshellscripts,117"qsummaryUUofbasic,87{89qcommercialUUsuppGort,32qcompress,UU133qcompressingUU les,132{134qcon gurationUUscripts"qforUUTCP/IP*,169qconsole"qde ned,UU77"qdeviceUUnamefor,90"qvirtual,UU77qcopyUU les,85qcopyingUULinux,15{17,23,204{210qcopyright,UU15{17,204{210qcoreUUdumps,6qcp,UU85,88qcsh,UU7qcurrentUUworkingdirectory"qde ned,UU81qdatabases,UU14qdebugging"qcoreUUdumps,6qdelete"qdirectory*,UU86"q les,UU86qdeletingUUusers,130qdeluser,UU130q/dev,UU90q/dev/sd,UU90 Ҡ(b{$"$"INDEX|0212KP덑$"/dev/sr,UU90 $"/dev/st,UU90$"development8"alpha,UU188"bGeta,UU188"conventions,UU18$"deviceUUdriver,90$"devices8"/dev/console,UU908"/dev/cua,UU908"/dev/hd,UU908"/dev/lp,UU908"/dev/null,UU908"/dev/pty,UU908"/dev/sd,UU908"/dev/sr,UU908"/dev/st,UU908"/dev/tty,UU908"/dev/ttyS,UU908"accessing,UU908"console,UU908"fd,UU908" oppyUUdisk,908"hardUUdrives,908"null,UU908"parallelUUpGorts,908"pseudo-terminals,UU908"SCSI,UU908"serialUUpGorts,908"virtualUUconsoles,90$"dip,UU1748"chatUUscriptfor,177{1798"connectingUUtoSLIPserverwith,177{1798"dynamicUUIPaddresswith,1768"staticUUIPaddresswith,175$"directory8".qtoUUreferto,828"/etc,UU908"/home,UU918"/lib,UU918"/proc,UU918"/sbin,UU918"/tmp,UU918"/usr,UU91P덒"q/usr/X386,UU91 "q/usr/bin,UU91"q/usr/etc,UU91"q/urs/g++-include,UU92"q/usr/include,UU92"q/usr/lib,UU92"q/usr/local,UU92"q/usr/man,UU92"q/usr/src,UU92"q/var,UU92"q/var/adm,UU92"q/var?spool,UU92"q/bin,UU89"qcreating,UU84"qcurrentUUworking,qde ned,UU81"qde ned,UU79"qdelete,UU86"q/dev,UU90"qhome,q~UUtoreferto,81,qde ned,UU80"qlistingUUcontentsof,83{84"qnesting,UU79"qparent,UU79,q..qtoUUreferto,82"qpGermisions,qexecute,UU100,qread,UU100,qwrite,UU100"qpGermissions,qchanging,UU102,qdepGendenciesUUof,101"qroGot,qde ned,UU80"qstructure,UU80,qmovingUUaroundinwithcd,82"qtree,UU80"qworking,qde ned,UU81qdisablingUUusers,130qdisasters"qrecoveryUUfrom,145{147,qwithUUmaintenance oppy*,145 i(b{$"$"INDEX|0213KP덑$"distributions,UU18,35{44 8"Internet,UUgettingfromthe,368"list,UU189{1918"mailUUorder,378"onlineUUsources,37$"doGcumentation,UU182{1888"bGooks,UU30,185{1888"F*requentlyUUAskedQuestions,1828"HOWTOUUdoGcuments,1838"infoUU les,88"LinuxDoGcumentationPro8ject,730,184{L"1858"LinuxUUSoftwareMap,158"online,UU29,182{184B"FAQ,UU29B"HOWTOUUdoGcuments,298"texinfo,UU8$"DoGom,UU15$"e-mail,UU179{1808"mailerB"de ned,UU1798"transpGortB"de ned,UU179$"e2fsck,UU142,146$"echo,UU89$"editor8"de ned,UU110$"editors,UU6$"efsck,UU142$"elm,UU179$"Emacs,UU6,110$"emergencies8"recoveryUUfrom,145{147B"withUUmaintenance oppy*,145$"end-of-textUUsignal,96$"environment8"customizing,UU117{1218"vqariablesB"PATH,UU120$"EOTUU(endoftext)signal,96$"errorUUmessages8"errorUUmessagesB"command?notfound,UU78P덒qethernet,UU12 "qsuppGortedUUcards,167qexecutable"qde ned,UU83qexecutables,UU5qexit,UU78qexport,UU119qFAQ,UU29qfdisk,UU48,53{56"qunderUUMS-DOS,48qfeatures"qkernel,UU4{6"qsystem,UU4{6qfg,UU108qFidoNet,UU13q le"qcopy*,UU85"qdelete,UU86"qexecutable,qde ned,UU83"qmove,UU85q lename"qde ned,UU79q lenames"qwildcardUUcharactersin,94{96q les"qappGedingUUto,99"qarchiving,UU132{134"qbackingUUup,134{135"qcompressing,UU132{134"qde ned,UU79"qdevice,UU90"qhidden,qnotUUmatchedbywildcards,95"qinoGdeUUnumbersUUof,103"qlinks,UU103{104"qlisting,UU83{84"qlistingUUpGermissionsofwithls,100"qMS-DOS,UU165"qowershipUUofbygroup,100"qowershipUUofbyuser,100"qpGermisions,qexecute,UU100 (b{$"$"INDEX|0214KP덑B"read,UU100 B"write,UU1008"pGermissionsB"changing,UU102B"de ned,UU100B"depGendenciesUUof,101B"group,UU131B"interpreting,UU1008"pGermissionsUUof,100{1028"recovering,UU1478"viewingUUcontentsof,86$" lesystem8"exploring,UU89{93$" lesystems,UU5,45,46,140{1428"/etc/fstab,UU1408"checking,UU1418"creating,UU578" xingUUcorrupted,1468"mounting,UU140{1418"onUU oppydisk,1358"roGot,UU468"unmounting,UU142B"unmountingwithshutdownorhalt,L"141$" lter8"de ned,UU98$"find8"forUUincrementalbackups,135$"FIPS,UU47$" oating-pGointUUmath,5$" oppyUUdisk8"bGoot/root,UU1458"deviceUUnamesfor,908"maintenance,UU1458"unmounting,UU136$" oppyUUdisks8"asUUbackupmedium,1358" leUUsystemson,135$"forgroundUUproGcess,105$"freeUUsoftware,15$"F*reeUUSoftwareF*oundation,15,204$"F*requentlyUUAskedQuestions,182$"fsck,UU142,146$"FTPP덒"qanonymous,UU36 "qarchiveUUsitelist,198"qusing,UU192{198qftpmail,UU197qfullname"qsettingUUwithchfn,131qfunctionality*,UU19qgames,UU15"qDoGom,UU15qgatewayUUaddress"qde ned,UU169qgcc"qupgrading,UU139qgdb,UU10qGeneralUUPublicLicense,15{17,204{210qgettingUUhelp,28qgetty,UU143qGNU,UU6"qGeneralUUPublicLicense,15{17,204{210qgprof,UU10qgrep,UU89qgroff,UU7qgroupUUID"qde ned,UU129qgroupadd,UU131qgroups,UU100,131"qadding,UU131"qdeleting,UU131qgroups,UU131qgzip,UU133qhacker,UU17qhalt,UU128qhardUUdrive"qproblems,UU67qhardUUdrives"qdeviceUUnamesfor,90qhardware"qproblems,UU65{69,qcon icts,UU65{67,qhardUUdrive,67{68,qSCSI,UU68{69qhardwareUUsuppGort,24{28"qCD-ROM,UU27 )(b{$"$"INDEX|0215KP덑8"controller,UU25 8"CPU,UU258"driveUUspace,268"ethernetUUcards,28,1678"hardUUdrive,258"memory*,UU258"mice,UU278"moGdems,UU288"monitor,UU268"motherbGoard,UU258"printers,UU278"SCSI,UU26,278"tapGeUUdrives,278"videoUUcard,26,149$"help8"getting,UU32{348"online,UU86$"homeUUdirectory8"~UUtoreferto,818"de ned,UU80,129$"hostname8"hostname,UU1448"de ned,UU768"setting,UU144,173$"hostname,UU173$"HOWTOUUdoGcuments,29,183$"HURD,UU23$"ifconfig,UU170$"inetd,UU171$"Ingres,UU14$"init,UU143$"initializationUU les8"forUUshells,121$"initializationUUscripts8"forUUshells,121$"inittab,UU143$"INN,UU180$"inoGdeUUnumber8"de ned,UU103$"input8"redirecting,UU98$"installation,UU35{748"bGootUU oppy*,61P덒"qbGootingUULinux,49 "qLILO,UU61"qmke2fs,UU57"qmkswap,UU56{57"qotherUUproGcedures,62"qoverview,UU44{45"qpreparation,UU44{49"qproblems,UU63{74,qbGooting,UU63{65,71,qerrors,UU69,q leUUpGermissions,73,qhardware,UU65{69,qLILO,UU72,qloggingUUin,73,qmediaUUerrors,69,qpGostinstallation,UU71{74"qrepartitioning,UU45,47{49qInternet,UU12,36"qmailingUUlists,32qIPUUaddress"qde ned,UU168qIRQ,UU66qjob"qbackground,UU105,107,108,qkill,UU107"qde ned,UU105"qforground,UU105"qinterupt,UU106"qinturpting,UU106"qkill,UU106"qrestarting,UU108"qstopping,UU108"qsuspGended,UU106qjobUUcontrol,4,105{110qjobs,UU107qkernel"qcompiling,UU137"qcompilingUUcompressedimage,138"qfeatures,UU4{6"qsourcesUUfor,137"qupgrading,UU137qkernelUUimage"qcompressed,UU126 2(b{$"$"INDEX|0216KP덑8" leUUnameof,126 $"kill,UU107$"LffUJaTU>ExX,UU7$"libraries,UU108" xingUUcorrupted,1478"shared,UU58"upgrading,UU138$"LILO,UU61,126{1278"asUUbGootloader,1268"installing,UU1278"problemsUUbGooting,638"problemsUUinstalling,728"selectingpCdefaultopGeratingsystemfor,L"127$"links,UU103{1048"displayUUnumbGerof,1038"hard,UU1038"symbGolic,UU104$"Linux,UU1{2108"andUUcost,238"bugs,UU188"commercialUUsuppGort,328"copying,UU238"copyright,UU15{17,204{2108"development,UU188"distributions,UU188"getting,UU368"history*,UU28"installing,UU35{748"philosophy*,UU17{208"pronunciation,UU18"sourcesUUofinformation,288"stability*,UU238"systemUUfeatures,4{6$"LinuxUUDoGcumentationPro8ject,30,184{185$"LinuxUUJournal,185$"LinuxUUSoftwareMap,15,183$"Linux-ActivistsUUmailinglist,32$"listingUUdirectorycontents,UU83{84$"loggingUUin,768"problems,UU73$"loggingUUout8"withUUexitcommand,78P덒qlogin,UU76 qloginUUname"qde ned,UU75qloginUUshell"qde ned,UU121,129"qsettingUUwithchsh,131qls,UU83{84,87"qlistingUU lepGermissionswith,100qmailUUorder,37qmailer"qforUUe-mail,179qmailers,UU12qmailingUUlists,32"qLinux-Activists,UU32qmailx,UU179qmaintenanceUU oppy*,145qman,UU86,88qmanualUUpages,86qmasterUUbGootrecord,45qMbase,UU14qMET*AFONT,UU9qMicrosoftUUWindows,14"qemulator,UU166qMinix,UU3,24qmkdir,UU84,88qmke2fs,UU57"qforUU oppydisk,135qmkswap,UU56{57,142qmoney*,UU23qmore,UU86,88qMotif,UU11qmount,UU140"qmountingUU oppydiskwith,135"qtoUUmountMS-DOSpartition,165qmountUUpGoint"qde ned,UU135qmoveUU les,85qMS-DOS,UU21"qaccessingUU lesfrom,14,165"qemulator,UU14,166"qmountingUUpartionunderLinux,165"qrepartitioning,UU48"qrunningUUprogramsfromLinux,166 ;Ġ(b{$"$"INDEX|0217KP덑8"usingUUMtoGolstoaccess les,166 $"multitasking,UU48"de ned,UU75$"multiuser8"de ned,UU75$"mv,UU85,88$"named,UU172$"nameserverUUaddress8"de ned,UU169$"NET-2,UU1668"suppGortforseriallineInternetprotocolL"(SLIP),UU166$"NetBSD,UU23$"netstat,UU174$"networkUUaddress8"de ned,UU168$"networkUUmask8"de ned,UU168$"networking,UU5,12{138"andUUXWindows,128"ethernetUUcards,suppGorted,28,1678"FTP*,UU128"NET-2,UU1668"news,UU12,180{1818"NFS,UU12,1718"NNTP*,UU128"PPP*,UU1748"SLIP*,UU12,1668"TCP/IP*,UU166{1798"UUCP*,UU13,179$"news,UU180{1818"clientB"de ned,UU1808"newsUUreadersB"de ned,UU180B"rn,UU180B"rn,UU1808"serverB"CUUNews,180B"de ned,UU180B"INN,UU1808"UUCP*,UU179$"newsUUreaders,12P덒"qde ned,UU180 qNFS,UU171qnullUU le,90qopGeratingUUsytems"qbGootingUUnon-Linux,126,127qOS/2,UU22qoutput"qredirecting,UU97qparallelUUpGort"qdeviceUUnamefor,90qparentUUdirectory*,79"q..qtoUUreferto,82qpartitionUUtable,45qpartitions,UU45,46"qfdisk,UU48,53{56"qLinux,UU51{52"qsize,UU47qpasswd,UU79,130qpassword"qchangingUUwithpasswd,79"qde ned,UU75"q xingUUroGot,146qpasswordUU le"qformatUUof,129qpathname"qabsolute,UU81"qde ned,UU79"qfull,UU81"qrelative,UU81qpGermissions"qchanging,UU102"qde ned,UU100"qdepGendenciesUUof,101"qexecute,UU100"qforUUshellscripts,118"qgroup,UU131"qinterpreting,UU100"qofUU les,100{102"qproblems,UU73"qread,UU100"qwrite,UU100qpipGelining"qde ned,UU99 F8(b{$"$"INDEX|0218KP덑$"pipGes 8"creating,UU998"using,UU98{99$"POSIX.1,UU4$"Postgres,UU14$"PPP*,UU5,174$"proGcess8"background,UU105B"kill,UU1078"de ned,UU1058"forground,UU1058"IDB"de ned,UU1058"interupt,UU1068"interupting,UU1068"kill,UU1068"psUUtolist,105$"programming,UU108"coreUUdumps,68"languages,UU108"libraries,UU108"UNIX,UU108"utilities,UU10$"protectedUUmoGde,5$"ps,UU105$"pseudo-terminals,UU90$"RAWRITE.EXE,UU36$"rc,UU1448" lesB"de ned,UU169B"forUUTCP/IP*,170$"rc.inet,UU170$"rc.inet1,UU1708"sample,UU170$"rc.inet2,UU170,1718"sample,UU171$"rc.local,UU144$"rc.net,UU170$"rdev,UU126$"reading8"suggested,UU185{188$"redirection8"non-destructive,UU99P덒"qstandardUUinput,97 "qstandardUUoutput,97qrepartitioning,UU47{49"qconcepts,UU45"qfdisk,UU48,qunderUUMS-DOS,48"qFIPS,UU47qrm,UU86,88qrmdir,UU86,88qrn,UU180qroGot"q xingUUpasswordfor,146qroGotUUaccount,122{123"qeithicalUUissues,123"qprivlegesUUof,123"qusingUUdi erentpromptfor,123qroGotUUdevice"qsettingUUnameofwithrdev,126qroGotUUdirectory"qde ned,UU80qroGotUU lesystem,46qroute,UU170"qentry/in/etc/networksrequiredfor,172qrouted,UU171qscienti cUUsoftware,15qSCSI"qproblems,UU68{69qSCSIUUdevices"qnamesUUfor,90qsecurity*,UU124qsendmail,UU179qserialUUlineInternetprotoGcol,166,174{179qserialUUpGorts"qdeviceUUnamesfor,90qsetenv,UU119qSeyon,UU13qshareware,UU16qshellUUscript,6"qde ned,UU117qshellUUscripts"qcommentsUUin,118"qde ned,UU93"qinitializtion,UU121 O5(b{$"$"INDEX|0219KP덑8"pGermissionsUUfor,118 8"vqariablesUUin,118$"shellUUvqariables8"expGortingUUtoenvironment,UU119$"shells,UU6,938"BourneUUagainshell,938"BourneUUshell,938"CUUshell,938"de ned,UU778"initializtionUU les,1218"jobUUcontrolprovidedby*,1058"prompt,UU778"vqariablesB"de ned,UU1188"wildcardUUcharactersfor,94{968"wildcardUUexpansion,94$"shutdownUUcommand,62,128$"shuttingUUdown,128$"Slackware8"getting,UU37{448"installing,UU58{61$"slattach,UU174$"SLIP*,UU5,12,166,174{1798"connectingUUtoservierwithdip,1778"deviceUUnamesfor,1758"dynamicUUIPaddresswithdip,1768"staticUUIPaddresswithdip,1758"staticUUIPaddresswithslattach,176$"Smail,UU179$"software,UU6{158"bash,UU78"installing,UU136{1398"tcsh,UU78"upgrading,UU136{1398"whereUUto ndreleases,139$"soundUUsuppGort,15$"sourcesUUofinformation,182{188$"stability*,UU23$"standardUUinput,96{1008"redirecting,UU98$"standardUUoutput,96{1008"redirecting,UU97$"standards,UU4$"startupUUscripts,143P덒qslattach "qstaticUUIPaddresseswith,176qstdin,UU96qstdout,UU96qsupGerblock"qde ned,UU146"q xingUUcorrupted,146qswapUU le,46,142{143"qdeleting,UU143qswapUUpartition"qinUU/etc/fstab,141qswapUUspace,5,46"qcreating,UU56{57"qcreatingUUtempGorary*,143qswapoff,UU143qswapon,UU141,143qsyslogd,UU171qsystemUUadministration"qaddingUUusers,128"qbGootingUULinux,125{127"qduties,UU125"qsecurityUUissues,124"qshuttingUUdown,128qsystemUUsecurity*,124qsystem-de nedUUaccounts"qroot,UU122qT*anenbaum,UUAndy,3qtar,UU132qTCP/IP*,UU5,12{13,166{179"q/etc/host.conf,UU173"q/etc/hosts,UU172"q/etc/networks,UU172"q/etc/resolve.conf,UU173"qbroadcastUUaddress,168"qcon gurationUUscriptsfor,169"qcon guring,UU167,168"qdebugging,UU173"qdisplayingUUroutingtables,174"qgatewayUUaddress,169"qhardwareUUrequirementsfor,167"qifconfig,UU170"qinetd,UU171"qIPUUaddress,168 XR(b{$"$"INDEX|0220KP덑8"named,UU172 8"nameserverUUaddress,1698"NET-2UUimplementationof,1668"networkUUaddress,1688"networkUUmask,1688"overUUserialline,174{1798"pGoint-to-pointUUconnection,1748"PPP*,UU1748"rc.inet,UU1708"rc.inet1,UU170B"sample,UU1708"rc.inet2,UU170B"sample,UU1718"rc.net,UU1708"route,UU1708"routed,UU1718"SLIP*,UU174{179B"deviceUUnamesfor,175B"dynamicUUIPaddresswithdip,176B"staticUUIPaddresswithdip,175B"staticUUIPaddresswithslattach,1768"syslogd,UU1718"troubleshoGoting,UU173$"Tcsh,UU93$"tcsh,UU93$"telecommunications,UU13$"term,UU13$"TU>'ExX,UU7$"texinfo,UU8$"textUUeditor8"comparing,UU1108"de ned,UU110$"textUUeditors,6$"textUUproGcessing,7{9$"tin,UU180$"T*orvqalds,UULinus,3,18$"transpGort8"forUUe-mail,179$"trouble8"runningUUinto,63{74$"UID8"de ned,UU129$"umount,UU142P덒"qunmountingUU oppydiskswith,136 qUNIX"qbasicUUconcepts,75{81"qcommercial,UU17,20,22{24"qdirectoryUUstructure,80"qforUUthePC,22{24"qfreeUUimplementations,23"qmanualUUpagesfor,86"qmultitasking,qde ned,UU75"qpGopularity*,UU2"qwizards,UU1qunmountingUU lesystems,141,142qupgrading,UU20qUSENET,UU180{181"qLinux-relatedUUnewsgroups,30"qpGostingUUtips,33quserUUaccount"qcreating,UU76quserUUID"qde ned,UU129quseradd,UU130quserdel,UU130qusername"qde ned,UU129qusers"qadding,UU128,qaddingUUwithadduser,130,qaddingUUwithuseradd,130"qchangingUUfullnamefor,131"qchangingUUloginshellfor,131"qdeleting,UU130"qdisabling,UU130"qfullUUnameof,129"qgroupUUIDof,129"qhomeUUdirectoryof,129"qinUUgroups,100"qlistUUgroupsfor,131"qloginUUshellof,129"qpasswordUUof,129"qsettingUUattributesfor,130"qsettingUUguidelinesfor,125"qsettingUUpasswordfor,130"qsystemUUsecurityand,124 c7(b{$"$"INDEX|0221KP덑8"userUUIDof,129 8"usernameUUof,129$"UUCP*,UU13,179$"vqariables8"environment,UU1198"inUUshellscripts,1188"shell,UU118$"vendor8"list,UU189{191$"vi,UU6,110{1168"changingUUtext,113{1148"commandUUmoGde,1108"deletingUUtext,112{1138"editUUmoGde,1108"includingUU les,1168"insertingUUtext,111{1128"lastUUlinemoGde,1108"movingUUcursor,1148"quitting,UU1158"savingUUchanges,1158"shellUUcommandsfrom,1168"starting,UU1118"switchingUU les,1158"writingUUchanges,115$"virtualUUconsoles,4,90$"V*olkerding,UUPatrick,37$"wildcardUUcharacters8"*,UU948"?,UU958"de ned,UU948"inUU lnames,94{96$"wildcardUUexpansion8"de ned,UU94$"WindowsUUNT,22$"WINE,UU14$"wordUUproGcessing,9$"workingUUdirectory8"de ned,UU81$"X11R6,UU148$"XF86Config,UU153$"XF*ree86,UU11,1488"con gurationUU lefor,153P덒"qcon guring,UU153 "qhardwareUUrequirementsfor,149"qinstalling,UU151"qRAMUUrequirementsfor,151"qvideoUUchipsetssuppGortedby*,149qxfsck,UU142qXUUWindowSystem,11{12,148{165"qde ned,UU148 mr;(G N