Arch Linux Beginners' Guide
Arch Linux Beginners' Guide
wiki.archlinux.org
Beginners' Guide
Tip:Thisguideisalsoavailableinmultiplepages,ratherthan onelargecopy.Ifyouwouldratherfollowitthatway,pleasestart here.
Preface
Introduction
Welcome.Thisdocumentwillguideyouthroughtheprocessof installingandconfiguringArchLinuxasimple,lightweight GNU/Linuxdistributiontargetedatcompetentusers.Thisguide isaimedatnewArchusers,butstrivestoserveasastrong referenceandinformativebaseforall. ArchLinuxDistributionHighlights: Simpledesignandphilosophy Allpackagescompiledfori686andx86_64architectures BSDstyleinitscripts,featuringonecentralized configurationfile mkinitcpio:Asimpleanddynamicinitramfscreator Pacmanpackagemanagerislightweightandagile,witha verymodestmemoryfootprint TheArchBuildSystem:Aportslikepackagebuilding
www.readability.com/articles/3wuojrwx
1/85
4/23/13
ThedesignprinciplesbehindArchareaimedatkeepingit simple. 'Simple',inthiscontext,shallmean'withoutunnecessary additions,modifications,orcomplications'.Inshortanelegant, minimalistapproach. Somethoughtstokeepinmindasyouconsidersimplicity: "'Simple'isdefinedfromatechnicalstandpoint,nota usabilitystandpoint.Itisbettertobetechnicallyelegant withahigherlearningcurve,thantobeeasytouseand technically[inferior]."AaronGriffin Entianonsuntmultiplicandapraeternecessitatemor "Entitiesshouldnotbemultipliedunnecessarily."Occam's razor.Thetermrazorreferstotheactofshavingaway
www.readability.com/articles/3wuojrwx
2/85
4/23/13
PreparetheInstallation
Note:Ifyouwishtoinstalltoanotherpartitionfromwithinan existingGNU/LinuxdistroorLiveCD,pleaseseethiswikiarticle forstepstodothis.Thiscanbeusefulparticularlyifyouplanto installArchviavncorsshremotely.Thefollowingassumes installationbyconventionalmeans.
www.readability.com/articles/3wuojrwx
3/85
4/23/13
ObtainthelatestInstallationmedia
YoucanobtainArch'sofficialinstallationmediafromhere.The latestversionis2010.05 BoththeCoreandtheNetinstallimagesprovideonlythe necessarypackagestocreateanArchLinuxbasesystem. NotethattheBaseSystemdoesnotincludeaGUI.Itis mainlycomprisedoftheGNUtoolchain(compiler, assembler,linker,libraries,shell,andutilities),theLinux kernel,andafewextralibrariesandmodules. CoreimagesfacilitatebothinstallingfromCDandNet. Netinstallimagesaresmallerandprovidenopackages themselvestheentiresystemisretrievedviainternet. TheArch64FAQcanhelpyouchoosebetweenthe32,64 bitanddualversions. Don'tforgettodownloadthechecksumtxtfilesalongwith yourchosenISO.
ChecktheIntegrityoftheDownloadedFile
c dtothedirectorywherethedownloadedfileshavebeen
placed,andinvoke s h a 1 s u m:
$s h a 1 s u mc h e c kn a m e _ o f _ c h e c k s u m _ f i l e . t x tn a m e _ o f _ s e l e c t e d _ i s o _ f i l e . i s o
www.readability.com/articles/3wuojrwx
4/85
4/23/13
InstallOveraNetwork
isyourharddisk.
www.readability.com/articles/3wuojrwx 5/85
4/23/13
*nixMethod
www.readability.com/articles/3wuojrwx
6/85
4/23/13
3 . 6M B / s $[ s u d o ]d di f = / d e v / s d cc o u n t = 7 4 4 9 7 3 s t a t u s = n o x f e r|m d 5 s u m# V e r i f yi n t e g r i t y 4 8 5 0 d 5 3 3 d d d 3 4 3 b 8 0 5 0 7 5 4 3 5 3 6 2 5 8 2 2 9 7 4 4 9 7 3 + 0r e c o r d si n 7 4 4 9 7 3 + 0r e c o r d so u t
ContinuewithBootArchLinuxInstaller
MicrosoftWindowsMethod
DownloadDiskImagerfromhttps://launchpad.net/win32image writer/+download.Insertflashmedia.StarttheDiskImagerand selecttheimagefile(DiskImageracceptsonly*.IMGfiles,so you'llhavetoput"*.iso"infileopendialogtoselectArch snapshot).Selectthedriveletterassociatedwiththeflashdrive. Click"write". TherearealsoothersolutionstowritingbootableISOimagesto USBsticks.IfyouhaveproblemswithUSBsticksdisconnecting, tryusingdifferentUSBportand/orcable. ContinuewithBootArchLinuxInstaller
BootArchLinuxInstaller
Tip:Thememoryrequirementforabasicinstallis64MBof RAM.
www.readability.com/articles/3wuojrwx
7/85
4/23/13
InserttheCDorFlashmediayouprepared,andbootfromit.You mayhavetochangethebootorderinyourcomputerBIOSor pressakey(usuallyDEL,F1,F2,F11orF12)duringtheBIOS POST(PowerOnSelfTest)phase. MainMenu:Themainmenushouldbedisplayedatthispoint. Selectthepreferredchoicebyusingthearrowkeystohighlight yourchoice,andthenbypressingEnter.Menusvaryslightly amongthedifferentISOs. Note:UsersseekingtoperformtheArchLinuxinstallation remotelyviaansshconnectionareencouragedtomakeafew tweaksatthispointtoenablesshconnectionsdirectlytothelive CDenvironment.Ifinterested,seetheInstallfromSSHarticle.
OSSystemStart
4/23/13
i 9 1 5 . m o d e s e t = 0
Alternatively,add:
v i d e o = S V I D E O 1 : d
IfyouhaveanonUSkeyboardlayoutyoucaninteractively chooseyourkeymap/consolefontwiththecommand:
#k m
orusetheloadkeyscommand:
#l o a d k e y sl a y o u t
4/23/13
bytypinginthefollowingatthe#prompt:
#l e s s/ u s r / s h a r e / a i f / d o c s / o f f i c i a l _ i n s t a l l a t i o n _ g u i d e _ e n l e s swillallowyoutopagethroughthedocument.
InstalltheBaseSystem
Asroot,runtheinstallerscriptfromtty1:
#/ a r c h / s e t u p
YoushouldnextseethedisplayedArchLinuxInstallation Frameworkscreen.
Selectaninstallationsource
www.readability.com/articles/3wuojrwx
10/85
4/23/13
Youshallbepromptedtoloadethernetdriversmanually,if desired.Udevisquiteeffectiveatloadingtherequiredmodules, soyoumayassumeithasalreadydoneso.Atthenextscreen, selectSetupNetwork.Youmayverifythisbypressing<Alt>+F3 andinvokingifconfiga.Whendone,returntotty1bypressing <Alt>+F1 AvailableInterfaceswillbepresented.Ifaninterfaceand HWaddr(HardWareaddress)islisted,thenyourmodulehas alreadybeenloaded.Ifyourinterfaceisnotlisted,youmayprobe itfromtheinstaller,ormanuallydosofromanothervirtual console.Selectyourinterfacetocontinue. TheinstallerwillthenaskifyouwishtouseDHCP.Choosing Yeswillrundhcpcdtodiscoveranavailablegatewayandrequest anIPaddressChoosingNowillpromptyouforyourstaticIP,
www.readability.com/articles/3wuojrwx
11/85
4/23/13
Ifeverythingiswellconfiguredintheendyoucanconnectto yourISPwith
#p p p o e s t a r t
Returntofirstvirtualconsolewith<ALT>+F1.ContinuewithSet Clock
WirelessQuickstartFortheLiveEnvironment
(Ifyouneedwirelessconnectivityduringtheinstallationprocess)
www.readability.com/articles/3wuojrwx
12/85
4/23/13
Thewirelessdriversandutilitiesarenowavailabletoyouinthe liveenvironmentoftheinstallationmedia.Agoodknowledgeof yourwirelesshardwarewillbeofkeyimportancetosuccessful configuration.Notethatthefollowingquickstartprocedure executedatthispointintheinstallationwillinitializeyour wirelesshardwareforuseintheliveenvironmentofthe installationmedia.Thesesteps(orsomeotherformofwireless management)mustberepeatedfromtheactualinstalledsystem afterbootingintoit. Alsonotethatthesestepsareoptionalifwirelessconnectivityis unnecessaryatthispointintheinstallationwirelessfunctionality mayalwaysbeestablishedlater. Note:Thefollowingexamplesusewlan0fortheinterfaceand 'linksys'fortheESSID.Remembertochangetheseforyour situation. Thebasicprocedurewillbe: Switchtoafreevirtualconsole,e.g.:<ALT>+F3 Loginasroot (Optional)Identifythewirelessinterface:
#l s p c i|g r e pin e t
Ensureudevhasloadedthedriver,andthatthedriverhas createdausablewirelesskernelinterfacewith
/ u s r / s b i n / i w c o n f i g:
www.readability.com/articles/3wuojrwx
13/85
4/23/13
www.readability.com/articles/3wuojrwx
14/85
4/23/13
Ifthereisnooutput,itmaybeconcludedthatthesystem's wirelesschipsetdoesnotrequirefirmware. Note:Wirelesschipsetfirmwarepackages(forcardswhich requirethem)arepreinstalledunder/lib/firmwareinthelive environment(onCD/USBstick)butmustbeexplicitlyinstalledto youractualsystemtoprovidewirelessfunctionalityafteryou rebootintoit!Packageselectionandinstallationiscoveredlater inthisguide.Ensureinstallationofbothyourwirelessmodule andfirmwareduringthepackageselectionstep!SeeWireless Setupifyouareunsureabouttherequirementofcorresponding firmwareinstallationforyourparticularchipset.Thisisavery
www.readability.com/articles/3wuojrwx
15/85
4/23/13
commonerror. IftheESSIDhasbeenforgottenorisunknown,use
/ s b i n / i w l i s t< i n t e r f a c e >s c a ntoscanfornearby
networks.
#i w l i s tw l a n 0s c a n
www.readability.com/articles/3wuojrwx
16/85
4/23/13
www.readability.com/articles/3wuojrwx
17/85
4/23/13
Encryption
Command
i w c o n f i gw l a n 0e s s i d" l i n k s y s " i w c o n f i gw l a n 0e s s i d" l i n k s y s "k e y " 0 2 4 1 b a f 3 4 c " i w c o n f i gw l a n 0e s s i d" l i n k s y s "k e y" s : p a s s 1 " w p a _ s u p p l i c a n tBD w e x tiw l a n 0c / e t c / w p a _ s u p p l i c a n t . c o n f
Lastly,ensureyoucanrouteusing / b i n / p i n g:
#p i n gc3w w w . g o o g l e . c o m
www.readability.com/articles/3wuojrwx
18/85
4/23/13
Openanothervirtualconsole(<ALT>+F3)andenter:
#f d i s kl
www.readability.com/articles/3wuojrwx
19/85
4/23/13
Takenoteofthedisk(s)/partition(s)toutilizefortheArch installation. Switchbacktotheinstallationscriptwith<ALT>+F1 Selectthefirstmenuentry"PrepareHardDrive". Option1:AutoPrepare(ErasesanENTIREharddriveand setsuppartitions) AutoPreparedividesthediskintothefollowingconfiguration: ext2/bootpartition,defaultsize32MB.Youwillbe promptedtomodifythesizetoyourrequirement. swappartition,defaultsize256MB.Youwillbepromptedto modifythesizetoyourrequirement. ASeparate/and/homepartition,(sizescanalsobe specified).Availablefilesystemsincludeext2,ext3,ext4, reiserfs,xfsandjfs,butnotethatboth/and/homeshall sharethesamefstypeifchoosingtheAutoPrepareoption. BewarnedthatAutopreparewillcompletelyerasethechosen harddrive.Readthewarningpresentedbytheinstallervery carefully,andmakesurethecorrectdeviceisabouttobe partitioned. Option2:ManuallyPartitionHardDrives(withcfdisk) recommended.
www.readability.com/articles/3wuojrwx
20/85
4/23/13
Thisoptionwillallowforthemostrobustandcustomized partitioningsolutionforyourpersonalneeds. Option3:ManuallyConfigureblockdevices,filesystems andmountpoints Ifthisisselected,thesystemwilllistwhatfilesystemsand mountpointsithasfoundandaskyouifyouwishtousethese.If selecting"Yes",youwillbegivenachoicetoselectthedesired methodofidentification,ie.bydev,labeloruuid. Option4:Rollbacklastfilesystemchanges Atthispoint,moreadvancedGNU/Linuxuserswhoarefamiliar andcomfortablewithmanuallypartitioningmaywishtoskip downtoSelectPackagesbelow.
PartitionHardDrives
PartitionInfo
www.readability.com/articles/3wuojrwx
21/85
4/23/13
Primarypartitionscanbebootable,andarelimitedto4partitions perdiskorraidvolume.Ifapartitioningschemerequiresmore than4partitions,anextendedpartitionwhichwillcontainlogical partitionswillberequired. Extendedpartitionsarenotusablebythemselvestheyaremerely a"container"forlogicalpartitions.Ifrequired,aharddiskshall containonlyoneextendedpartitionwhichshallthenbesub dividedintologicalpartitions. Whenpartitioningadisk,onecanobservethisnumbering schemebycreatingprimarypartitionssda1throughsda3 followedbycreatinganextendedpartition,sda4,and subsequentlycreatinglogicalpartition(s)withintheextended partitionsda5,sda6,andsoon.
SwapPartition
www.readability.com/articles/3wuojrwx
22/85
4/23/13
Adiskpartitioningschemeisaverypersonalizedpreference. Eachuser'schoiceswillbeuniquetotheirowncomputinghabits andrequirements.IfyouwouldliketodualbootArchLinuxand aWindowsoperatingsystempleaseseeWindowsandArchDual Boot. Filesystemcandidatesforseparatepartitionsinclude: /(root)Therootfilesystemistheprimaryfilesystemfromwhich allotherfilesystemsstemthetopofthehierarchy.Allfilesand directoriesappearundertherootdirectory"/",eveniftheyare storedondifferentphysicaldevices.Thecontentsoftheroot filesystemmustbeadequatetoboot,restore,recover,and/or repairthesystem.Therefore,certaindirectoriesunder/arenot themselvescandidatesforseparatepartitions.(Seewarning below).
www.readability.com/articles/3wuojrwx
23/85
4/23/13
/bootThisdirectorycontainsthekernelandramdiskimagesas wellasthebootloaderconfigurationfile,andbootloaderstages. /bootalsostoresdatathatisusedbeforethekernelbegins executinguserspaceprograms.Thismayincludesavedmaster bootsectorsandsectormapfiles./bootisessentialforbooting, butisuniqueinthatitmaystillbekeptonitsownseparate partition(ifrequired). /homeProvidessubdirectories,eachnamedforasystemuser, formiscellaneouspersonaldatastorageaswellasuserspecific configurationfilesforapplications. /usrWhilerootistheprimaryfilesystem,/usristhesecondary hierarchyforallsystemusers'data,includingthemajorityof multiuserutilitiesandapplications./usrisshareable,readonly data.Thismeansthat/usrshallbeshareablebetweenvarious hostsandmustnotbewrittento,exceptinthecaseofsystem update/upgrade.Anyinformationthatishostspecificorvaries withtimeisstoredelsewhere. /tmpdirectoryforprogramsthatrequiretemporaryfilessuchas '.lck'files,whichcanbeusedtopreventmultipleinstancesof theirrespectiveprogramuntilataskiscompleted,atwhichpoint the'.lck'filewillberemoved.Programsmustnotassumethat anyfilesordirectoriesin/tmparepreservedbetween invocationsoftheprogramandfilesanddirectorieslocated under/tmpwilltypicallybedeletedwheneverthesystemis booted.
www.readability.com/articles/3wuojrwx
24/85
4/23/13
/varcontainsvariabledataspooldirectoriesandfiles, administrativeandloggingdata,pacman'scache,theABStree, etc./varexistsinordertomakeitpossibletomount/usrasread only.Everythingthathistoricallywentinto/usrthatiswrittento duringsystemoperation(asopposedtoinstallationandsoftware maintenance)mustresideunder/var. Warning:Besides/boot,directoriesessentialforbootingare: '/bin','/etc','/lib',and'/sbin'.Therefore,theymustnotresideona separatepartitionfrom/. Thereareseveraladvantagesforusingdiscretefilesystems, ratherthancombiningallintoonepartition: Security:Eachfilesystemmaybeconfiguredin/etc/fstabas 'nosuid','nodev','noexec','readonly',etc. Stability:Auser,ormalfunctioningprogramcancompletely fillafilesystemwithgarbageiftheyhavewritepermissions forit.Criticalprograms,whichresideonadifferent filesystemremainunaffected. Speed:Afilesystemwhichgetswrittentofrequentlymay becomesomewhatfragmented.(Aneffectivemethodof avoidingfragmentationistoensurethateachfilesystemis neverindangeroffillingupcompletely.)Separate filesystemsremainunaffected,andeachcanbe defragmentedseparatelyaswell. Integrity:Ifonefilesystembecomescorrupted,separate filesystemsremainunaffected. Versatility:Sharingdataacrossseveralsystemsbecomes
www.readability.com/articles/3wuojrwx
25/85
4/23/13
Thisquestionisbestansweredbaseduponindividualneeds.You maywishtosimplycreateonepartitionforrootandonepartition forswaporonlyonerootpartitionwithoutswaporrefertothe followingexamplesandconsidertheseguidelinestoprovidea frameofreference: Therootfilesystem(/)intheexamplewillcontainthe/usr directory,whichcanbecomemoderatelylarge,depending uponhowmuchsoftwareisinstalled.1520GBshouldbe sufficientformostusers. The/varfilesystemwillcontain,amongotherdata,theABS treeandthepacmancache.Keepingcachedpackagesis usefulandversatileitprovidestheabilitytodowngrade packagesifneeded./vartendstogrowinsizethepacman cachecangrowlargeoverlongperiodsoftime,butcanbe safelyclearedifneeded.IfyouareusinganSSD,youmay
www.readability.com/articles/3wuojrwx
26/85
4/23/13
wishtolocateyour/varonanHDDandkeepthe/and /homepartitionsonyourSSDtoavoidneedlessread/writes totheSSD.812Gigsonadesktopsystemshouldbe sufficientfor/var,dependinglargelyuponhowmuch softwareyouintendtoinstall.Serverstendtohaverelatively larger/varfilesystems. The/homefilesystemistypicallywhereuserdata, downloads,andmultimediareside.Onadesktopsystem, /homeistypicallythelargestfilesystemonthedrivebya largemargin.RememberthatifyouchosetoreinstallArch, allthedataonyour/homepartitionwillbeuntouched(so longasyouhaveaseparate/homepartition). Anextra25%ofspaceaddedtoeachfilesystemwillprovide acushionforunforeseenoccurrence,expansion,andserve asapreventiveagainstfragmentation. Fromtheguidelinesabove,theexamplesystemshallcontaina ~15GBroot(/)partition,~10GB/var,1GBswap,anda/home containingtheremainingdiskspace.
CreatePartitionswithcfdisk
www.readability.com/articles/3wuojrwx
27/85
4/23/13
AlsochoosetheTypebydesignatingitas'83Linux'.Thecreated /partitionshallappearassda1inourexample. Nowcreateaprimarypartitionfor/var,designatingitasType83 Linux.Thecreated/varpartitionshallappearassda2 Next,createapartitionforswap.Selectanappropriatesizeand specifytheTypeas82(Linuxswap/Solaris).Thecreatedswap partitionshallappearassda3. Lastly,createapartitionforyour/homedirectory.Choose anotherprimarypartitionandsetthedesiredsize. Likewise,selecttheTypeas83Linux.Thecreated/home partitionshallappearassda4. Example:
N a m e F l a g s P a r tT y p e F ST y p e [ L a b e l ] S i z e( M B ) s d a 1 P r i m a r y L i n u x 1 5 4 4 0# r o o t s d a 2 P r i m a r y L i n u x 1 0 2 5 6# / v a r s d a 3 P r i m a r y L i n u xs w a p/S o l a r i s 1 0 2 4 # s w a p s d a 4 P r i m a r y L i n u x 1 4 0 4 8 0# / h o m e
www.readability.com/articles/3wuojrwx
28/85
4/23/13
www.readability.com/articles/3wuojrwx
29/85
4/23/13
2.ext3ThirdExtendedFilesystemEssentiallytheext2system, butwithjournalingsupport.ext3isbackwardcompatiblewith ext2.Extremelystable,mature,andbyfarthemostwidelyused, supportedanddevelopedGNU/LinuxFS. 3.ext4FourthExtendedFilesystemBackwardcompatiblewith ext2andext3.Introducessupportforvolumeswithsizesupto1 exabyteandfileswithsizesupto16terabytes.Increasesthe 32,000subdirectorylimitinext3to64,000.Offersonline defragmentationability. 4.ReiserFS(V3)HansReiser'shighperformancejournalingFS usesaveryinterestingmethodofdatathroughputbasedonan unconventionalandcreativealgorithm.ReiserFSistoutedasvery fast,especiallywhendealingwithmanysmallfiles.ReiserFSis fastatformatting,yetcomparativelyslowatmounting.Quite matureandstable.ReiserFS(V3)isnotactivelydevelopedatthis time.Generallyregardedasagoodchoicefor/var/. 5.JFSIBM'sJournaledFileSystemThefirstfilesystemtooffer journaling.JFShadmanyyearsofuseintheIBMAIXOS beforebeingportedtoGNU/Linux.JFScurrentlyusestheleast CPUresourcesofanyGNU/Linuxfilesystem.Veryfastat formatting,mountingandfsck's,andverygoodallaround performance,especiallyinconjunctionwiththedeadlineI/O scheduler.(SeeJFS.)NotaswidelysupportedasextorReiserFS, butverymatureandstable.
www.readability.com/articles/3wuojrwx
30/85
4/23/13
6.XFSAnotherearlyjournalingfilesystemoriginallydeveloped bySiliconGraphicsfortheIRIXOSandportedtoGNU/Linux. XFSoffersveryfastthroughputonlargefilesandlarge filesystems.Veryfastatformattingandmounting.Generally benchmarkedasslowerwithmanysmallfiles,incomparisonto otherfilesystems.XFSisverymatureandoffersonline defragmentationability. 7.BtrfsAlsoknownas"BetterFS"isanewfilesystemwith substantialnewandpowerfulfeaturessimilartoSun/Oracle's excellentZFS.Theseincludesnapshots,multidiskstripingand mirroring(basicallysoftwareraidwithoutmdadm),checksums, incrementalbackup,andontheflycompression(whichcangive asignificantperformanceboostaswellassavespace),andmore. Itisstillconsidered"unstable"asofJanuary2011,buthasbeen mergedintothemainlinekernelunderexperimentalstatus.Btrfs lookstobethefutureoflinuxfilesystems,andisnowofferedasa rootfilesystemchoiceinUbuntu10.10,OpenSUSE11.3and othermajordistributioninstallers. JFSandXFSfilesystemscannotbeshrunkbydiskutilities (suchasgpartedorpartedmagic)
AnoteonJournaling
www.readability.com/articles/3wuojrwx
31/85
4/23/13
offerdatamodejournaling,(though,notbydefault),which journalsbothdataandmetadata(butwithasignificantspeed penalty).Theothersonlyofferorderedmodejournaling,which journalsmetadataonly.Whileallwillreturnyourfilesystemtoa validstateafterrecoveringfromacrash,datamodejournaling offersthegreatestprotectionagainstfilesystemcorruptionand datalossbutcansufferfromperformancedegradation,asalldata iswrittentwice(firsttothejournal,thentothedisk).Depending uponhowimportantyourdatais,thismaybeaconsiderationin choosingyourfilesystemtype. Movingon... Chooseandcreatethefilesystem(formatthepartition)for/by selectingyes.Youwillnowbepromptedtoaddanyadditional partitions.Inourexample,sda2andsda4remain.Forsda2, chooseafilesystemtypeandmountitas/var.Finally,choosethe filesystemtypeforsda4,andmountitas/home. Note:Ifyouhavenotcreatedanddonotneedaseparate/boot partition,youmaysafelyignorethewarningthatitdoesnotexist. Returntothemainmenu.
SelectPackages
www.readability.com/articles/3wuojrwx
32/85
4/23/13
Note:Forexpedience,allpackagesinbaseareselectedby default.Usethespacebartoselectanddeselectpackages. Base Packagesfromthe[core]repotoprovidetheminimalbase environment.Alwaysselectthisandonlyremovepackages thatwillnotbeused. Basedevel Extratoolsfrom[core]suchas m a k e,and a u t o m a k e. Mostbeginnersshouldchoosetoinstallit,asmanywill probablyneeditlater. Aftercategoryselection,youwillbepresentedwiththefulllists ofpackages,allowingyoutofinetuneyourselections.Usethe spacebartoselectandunselect. Note:Ifconnectiontoawirelessnetworkisrequired,remember toselectandinstallthewireless_toolspackage.Somewireless interfacesalsoneedndiswrapperand/oraspecificfirmware.If youplantouseWPAencryption,youwillneedwpa_supplicant. TheWirelessSetuppagewillhelpyouchoosethecorrect packagesforyourwirelessdevice.Alsostronglyconsider installingnetcfg,whichwillhelpyousetupyournetwork connectionandprofilesafteryourebootintoyournewsystem. Afterselectingtheneededpackages,leavetheselectionscreen andcontinuetothenextstep,InstallPackages.
InstallPackages
www.readability.com/articles/3wuojrwx
33/85
4/23/13
InstallPackageswillinstalltheselectedpackagestoyournew system.IfyouselectedaCD/USBasthesource,package versionsfromtheCD/USBwillbeinstalled.Ifyouoptedfora Netinstall,freshpackageswillbedownloadedfromtheinternet andinstalled. Note:Insomeinstallers,youwillbeaskedifyouwishtokeep thepackagesinthepacmancache.Ifyouchoose'yes',youwill havetheflexibilitytodowngradetopreviouspackageversionsin thefuture,sothisisrecommended(youcanalwaysclearthe cacheinthefuture). Afterthepackageshavebeendownloaded,theinstallerwill checktheirintegrity.Nextitwillcreatethekernelfromthe packagesdownloaded.
ConfiguretheSystem
www.readability.com/articles/3wuojrwx
34/85
4/23/13
Nowyouwillbeaskedwhichtexteditoryouwanttousechoose nano,joeor[[Vim|vi].n a n o isgenerallyconsideredtheeasiestof thethree.Pleaseseethereleatedwikipagesoftheeditoryou wishtouseforinstructionsonhowtousethem.Youwillbe presentedwithamenuincludingthemainconfigurationfilesfor yoursystem. Note:Itisveryimportantatthispointtoedit,oratleastverifyby opening,everyconfigurationfile.Theinstallerscriptrelieson yourinputtocreatethesefilesonyourinstallation.Acommon erroristoskipoverthesecriticalstepsofconfiguration. Cantheinstallerhandlethismoreautomatically? Hidingtheprocessofsystemconfigurationisindirectopposition toTheArchWay.Whileitistruethatrecentversionsofthe kernelandhardwareprobingtoolsofferexcellenthardware supportandautoconfiguration,Archpresentstheuserall pertinentconfigurationfilesduringinstallationforthepurposesof transparencyandsystemresourcecontrol.Bythetimeyouhave finishedmodifyingthesefilestoyourspecifications,youwill havelearnedthesimplemethodofmanualArchLinuxsystem configurationandbecomemorefamiliarwiththebasestructure, leavingyoubetterpreparedtouseandmaintainyournew installationproductively.
/etc/rc.conf
www.readability.com/articles/3wuojrwx
35/85
4/23/13
ExampleforLOCALIZATION:
L O C A L E = " e n _ U S . u t f 8 " H A R D W A R E C L O C K = " l o c a l t i m e " U S E D I R E C T I S A = " n o " T I M E Z O N E = " U S / E a s t e r n " K E Y M A P = " u s " C O N S O L E F O N T = C O N S O L E M A P = U S E C O L O R = " y e s "
LOCALE Thissetsyoursystemlocale,whichwillbeusedbyalli18n awareapplicationsandutilities.Youcangetalistofthe availablelocalesbyrunninglocaleafromthecommand line.Thissetting'sdefaultisusuallyfineforUSEnglish users.Howeverifyouexperienceanyproblemssuchas somecharactersnotprintingrightandbeingreplacedby squaresyoumaywanttogobackandreplace"en_US.utf8" withjust"en_US". HARDWARECLOCK
www.readability.com/articles/3wuojrwx
36/85
4/23/13
Specifieswhetherthehardwareclock,whichis synchronizedonbootandonshutdown,storesUTCtime,or localtime.UTCmakessensebecauseitgreatlysimplifies changingtimezonesanddaylightsavingstime.localtimeis necessaryifyoudualbootwithanoperatingsystemsuchas Windows,thatonlystoreslocaltimetothehardwareclock. USEDIRECTISA UsedirectI/Orequestinsteadof/dev/rtcforhwclock TIMEZONE SpecifyyourTIMEZONE.(Allavailablezonesareunder /usr/share/zoneinfo/). KEYMAP Theavailablekeymapsarein/usr/share/kbd/keymaps. PleasenotethatthissettingisonlyvalidforyourTTYs,not anygraphicalwindowmanagersorX. CONSOLEFONT Availableconsolefontsresideunder /usr/share/kbd/consolefonts/ifyoumustchange.Thedefault (blank)issafe. CONSOLEMAP Definestheconsolemaptoloadwiththesetfontprogramat boot.Possiblemapsarefoundin /usr/share/kbd/consoletrans,ifneeded.Thedefault(blank)is
www.readability.com/articles/3wuojrwx
37/85
4/23/13
ExampleforHARDWARE:
#S c a nh a r d w a r ea n dl o a dr e q u i r e dm o d u l e sa t b o o t M O D _ A U T O L O A D = " y e s " #M o d u l eB l a c k l i s t-D e p r e c a t e d M O D _ B L A C K L I S T = ( ) # M O D U L E S = ( ! n e t p f 1 0! p c s p k rl o o p )
MOD_AUTOLOAD Settingthisto"yes"willuseudevtoautomaticallyprobe hardwareandloadtheappropriatemodulesduringboot, (convenientwiththedefaultmodularkernel).Settingthisto "no"willrelyontheuser'sabilitytospecifythisinformation manually,orcompiletheirowncustomkernelandmodules, etc. MOD_BLACKLIST Thishasbecomedeprecatedinfavorofaddingblacklisted modulesdirectlytotheMODULES=linebelow. MODULES
www.readability.com/articles/3wuojrwx
38/85
4/23/13
HOSTNAME SetyourHOSTNAMEtoyourliking.Thisisthenameof yourcomputer.Whateveryouputhere,alsoputitin /etc/hosts eth0 'Ethernet,card0'.IfyouareusingstaticIP,adjustthe interfaceIPaddress,netmaskandbroadcastaddress.Set eth0="dhcp"ifyouwanttouseDHCPfor dynamic/automaticconfiguration. INTERFACES Specifyallinterfaceshere.Multipleinterfacesshouldbe separatedwithaspaceasin:(eth0wlan0) gateway IfyouareusingstaticIP,setthegatewayaddress.Ifusing DHCP,youcanusuallyignorethisvariable,thoughsome usershavereportedtheneedtodefineit.
www.readability.com/articles/3wuojrwx
39/85
4/23/13
Examplew/StaticIP:
H O S T N A M E = " a r c h " e t h 0 = " e t h 01 9 2 . 1 6 8 . 0 . 2n e t m a s k2 5 5 . 2 5 5 . 2 5 5 . 0 b r o a d c a s t1 9 2 . 1 6 8 . 0 . 2 5 5 " I N T E R F A C E S = ( e t h 0 ) g a t e w a y = " d e f a u l tg w1 9 2 . 1 6 8 . 0 . 1 " R O U T E S = ( g a t e w a y )
4/23/13
Ifascriptnameisprefixedwithabang(!),itisnotexecuted. Ifascriptisprefixedwithan"at"symbol(@),itshallbe executedinthebackgroundthestartupsequencewillnot waitforsuccessfulcompletionofeachdaemonbefore continuingtothenext.(Usefulforspeedingupsystemboot). Donotbackgrounddaemonsthatareneededbyother daemons.Forexample"mpd"dependson"network", thereforebackgroundingnetworkmaycausempdtobreak. Editthisarraywhenevernewsystemservicesareinstalled,if startingthemautomaticallyduringbootisdesired.
www.readability.com/articles/3wuojrwx
41/85
4/23/13
Note:This'BSDstyle'init,istheArchwayofhandlingwhat otherdistributionshandlewithvarioussymlinkstoan/etc/init.d directory. AboutDAEMONS Thedaemonslineneednotbechangedatthistime,butitis usefultoexplainwhatdaemonsare,astheywillbeaddressed laterinthisguide. Adaemonisaprogramthatrunsinthebackground,waitingfor eventstooccurandofferingservices.Agoodexampleisaweb serverthatwaitsforarequesttodeliverapage(e.g.:httpd)oran SSHserverwaitingforauserlogin(e.g.:sshd).Whiletheseare fullfeaturedapplications,therearealsodaemonswhoseworkis notthatvisible.Examplesareadaemonwhichwritesmessages intoalogfile(e.g.syslog,metalog),andadaemonwhich providesagraphicallogin(e.g.:gdm,kdm).Alltheseprograms canbeaddedtothedaemonslineandwillbestartedwhenthe systemboots.Usefuldaemonswillbepresentedduringthis guide. Historically,thetermdaemonwascoinedbytheprogrammersof MIT'sProjectMAC.TheytookthenamefromMaxwell'sdemon, animaginarybeingfromafamousthoughtexperimentthat constantlyworksinthebackground,sortingmolecules.*nix systemsinheritedthisterminologyandcreatedthebackronym diskandexecutionmonitor. Tip:AllArchdaemonsresideunder/etc/rc.d/
www.readability.com/articles/3wuojrwx
42/85
4/23/13
/etc/fstab
Thefstab(forfilesystemstable)ispartofthesystem configurationlistingallavailabledisksanddiskpartitions,and indicatinghowtheyaretobeinitializedorotherwiseintegrated intotheoverallsystem'sfilesystem.The/etc/fstabfileismost commonlyusedbythemountcommand.Themountcommand takesafilesystemonadevice,andaddsittothemainsystem hierarchythatyouseewhenyouuseyoursystem.mountais calledfrom/etc/rc.sysinit,about3/4ofthewaythroughtheboot process,andreads/etc/fstabtodeterminewhichoptionsshould beusedwhenmountingthespecifieddevicestherein.Ifnoautois appendedtoafilesystemin/etc/fstab,mountawillnotmountit atboot. Anexampleof/etc/fstab
#< f i l es y s t e m > < d i r > < t y p e > < o p t i o n s > < d u m p > < p a s s > n o n e / d e v / p t s d e v p t s d e f a u l t s 0 0 n o n e / d e v / s h m t m p f s d e f a u l t s 0 0 / d e v / s d a 1 / j f s d e f a u l t s , n o a t i m e 0 1 / d e v / s d a 2 / v a r r e i s e r f s d e f a u l t s , n o a t i m e , n o t a i l 0 2
www.readability.com/articles/3wuojrwx
43/85
4/23/13
/ d e v / s d a 3 d e f a u l t s 0 / d e v / s d a 4 d e f a u l t s , n o a t i m e 2
s w a p 0 / h o m e 0
s w a p
j f s
Note:The'noatime'optiondisableswritingreadaccesstimesto themetadataoffilesandmaysafelybeappendedto/and/home regardlessofyourspecifiedfilesystemtypeforincreasedspeed, performance,andpowerefficiency(seehereformore).'notail' disablestheReiserFStailpackingfeature,foraddedperformance atthecostofslightlylessefficientdiskusage. <filesystem> describestheblockdeviceorremotefilesystemtobemounted. Forregularmounts,thisfieldwillcontainalinktoablock devicenode(ascreatedbymknodwhichiscalledbyudevat boot)forthedevicetobemountedforinstance,'/dev/cdrom' or'/dev/sda1'. Note:Ifyoursystemhasmorethanoneharddrive,theinstaller willdefaulttousingUUIDratherthanthesdxnamingscheme, forconsistentdevicemapping.UtilizingUUIDhasseveral advantagesandmayalsobepreferredtoavoidissuesifhard disksareaddedtothesysteminthefuture.Duetoactive developmentsinthekernelandalsoudev,theorderingin whichdriversforstoragecontrollersareloadedmaychange randomly,yieldinganunbootablesystem/kernelpanic.Nearly everymotherboardhasseveralcontrollers(onboardSATA,
www.readability.com/articles/3wuojrwx
44/85
4/23/13
onboardIDE),andduetotheaforementioneddevelopment updates,/dev/sdamaybecome/dev/sdbonthenextreboot. (Seethiswikiarticleformoreinformationonpersistentblock devicenaming.) <dir> describesthemountpointforthefilesystem.Forswap partitions,thisfieldshouldbespecifiedas'swap'(Swap partitionsarenotactuallymounted.) <type> describesthetypeofthefilesystem.TheLinuxkernelsupports manyfilesystemtypes.(Forthefilesystemscurrentlysupported bytherunningkernel,see/proc/filesystems).Anentry'swap' denotesafileorpartitiontobeusedforswapping.Anentry 'ignore'causesthelinetobeignored.Thisisusefultoshow diskpartitionswhicharecurrentlyunused. <options> describesthemountoptionsassociatedwiththefilesystem.Itis formattedasacommaseparatedlistofoptionswithno interveningspaces.Itcontainsatleastthetypeofmountplus anyadditionaloptionsappropriatetothefilesystemtype.For documentationontheavailableoptionsfornonnfsfile systems,seemount(8). <dump> usedbythedump(8)commandtodeterminewhichfilesystems
www.readability.com/articles/3wuojrwx
45/85
4/23/13
aretobedumped.dumpisabackuputility.Ifthefifthfieldis notpresent,avalueofzeroisreturnedanddumpwillassume thatthefilesystemdoesnotneedtobebackedup.Notethat dumpisnotinstalledbydefault. <pass> usedbythefsck(8)programtodeterminetheorderinwhich filesystemchecksaredoneatboottime.Therootfilesystem shouldbespecifiedwitha<pass>of1,andotherfilesystems shouldhavea<pass>of2or0.Filesystemswithinadrivewill becheckedsequentially,butfilesystemsondifferentdrives willbecheckedatthesametimetoutilizeparallelismavailable inthehardware.Ifthesixthfieldisnotpresentorzero,avalue ofzeroisreturnedandfsckwillassumethatthefilesystem doesnotneedtobechecked. ExpandedinformationavailableintheFstabwikientry. Mostuserswillnotneedtomodifythisfileatthistime,butplease readthefollowingexplanatoryinformation. Thisfileallowsfurtherfinetuningoftheinitialramfilesystem,or initramfs,(alsohistoricallyreferredtoastheinitialramdiskor "initrd")foryoursystem.Theinitramfsisagzippedimagethatis readbythekernelduringboot.Thepurposeoftheinitramfsisto bootstrapthesystemtothepointwhereitcanaccesstheroot filesystem.Thismeansithastoloadanymodulesthatare requiredfordeviceslikeIDE,SCSI,orSATAdrives(or USB/FW,ifyouarebootingfromaUSB/FWdrive).Oncethe
www.readability.com/articles/3wuojrwx
46/85
4/23/13
manyadvantagesovertheold m k i n i t r dand m k i n i t r a m f s scripts. Itusesglibcandbusyboxtoprovideasmallandlightweight baseforearlyuserspace. Itcanuseudevforhardwareautodetectionatruntime,thus preventingnumerousunnecessarymodulesfrombeing loaded. Itshookbasedinitscriptiseasilyextendablewithcustom hooks,whichcaneasilybeincludedinpacmanpackages withouthavingtomodifiymkinitcpioitself. Italreadysupportslvm2,dmcryptforbothlegacyandluks volumes,raid,swsuspandsuspend2resumingandbooting fromusbmassstoragedevices. Manyfeaturescanbeconfiguredfromthekernelcommand linewithouthavingtorebuildtheimage. Themkinitcpioscriptmakesitpossibletoincludetheimage inakernel,thusmakingaselfcontainedkernelimageis possible. Itsflexibilitymakesrecompilingakernelunnecessaryin
www.readability.com/articles/3wuojrwx 47/85
4/23/13
manycases. IfusingRAIDorLVMontherootfilesystem,theappropriate HOOKSmustbeconfigured.SeethewikipagesforRAIDand /etc/mkinitcpioformoreinfo.IfusinganonUSkeyboard.add the" k e y m a p"hooktoloadyourlocalkeymapduringboot. Addthe" u s b i n p u t"hookifusingaUSBkeyboard.Don't forgettoaddthe" u s b"hookwheninstallingarchonan externalharddrive,ComfactFlash,orSDcard,whichis connectedviausb,e.g.:
H O O K S = " b a s eu d e va u t o d e t e c tp a t as c s is a t au s bf i l e s y s t e m sk e y m a pu s b i n p u t "
www.readability.com/articles/3wuojrwx
48/85
4/23/13
Note:IfyouareusingDHCP,youmaysafelyignorethisfile,as bydefault,itwillbedynamicallycreatedanddestroyedbythe dhcpcddaemon.Youmaychangethisdefaultbehaviorifyou wish.SeetheNetworkandResolv.confpagesformor information. TheresolverisasetofroutinesintheClibrarythatprovide accesstotheInternetDomainNameSystem(DNS).Oneofthe mainfunctionsofDNSistotranslatedomainnamesintoIP addresses,tomaketheWebafriendlierplace.Theresolver configurationfile,or/etc/resolv.conf,containsinformationthatis readbytheresolverroutinesthefirsttimetheyareinvokedbya process. IfyouuseastaticIP,setyourDNSserversin/etc/resolv.conf (nameserver<ipaddress>).Youmayhaveasmanyasyouwish. Anexample,usingOpenDNS:
n a m e s e r v e r2 0 8 . 6 7 . 2 2 2 . 2 2 2 n a m e s e r v e r2 0 8 . 6 7 . 2 2 0 . 2 2 0
www.readability.com/articles/3wuojrwx
49/85
4/23/13
Addyourhostname,coincidingwiththeonespecifiedin /etc/rc.conf,asanalias,sothatitlookslikethis:
1 2 7 . 0 . 0 . 1 l o c a l h o s t . l o c a l d o m a i n y o u r h o s t n a m e l o c a l h o s t
4/23/13
Tip:Forconvenience,youmayalsouse/etc/hostsaliasesfor hostsonyournetwork,and/orontheWeb,e.g.:
6 4 . 2 3 3 . 1 6 9 . 1 0 3 w w w . g o o g l e . c o m 1 9 2 . 1 6 8 . 1 . 9 0 m e d i a 1 9 2 . 1 6 8 . 1 . 8 8 d a t a g
Restrictittoacertainip
s s h d :1 9 2 . 1 6 8 . 0 . 1
www.readability.com/articles/3wuojrwx
51/85
4/23/13
RestrictittoyourlocalLANnetwork(range192.168.0.0to 192.168.0.255)
s s h d :1 9 2 . 1 6 8 . 0 . s s h d :1 0 . 0 . 0 . 0 / 2 5 5 . 2 5 5 . 2 5 5 . 0
Ifyoudonotplanonusingthesshdaemon,leavethisfileatthe default,(empty).
/etc/locale.gen
www.readability.com/articles/3wuojrwx
52/85
4/23/13
4/23/13
TheprovidedGRUBconfiguration(/boot/grub/menu.lst)should besufficient,butverifyitscontentstoensureaccuracy (specifically,ensurethattheroot(/)partitionisspecifiedby UUIDonline3).Youmaywanttoaltertheresolutionofthe consolebyaddingavga=<number>kernelargument correspondingtoyourdesiredvirtualconsoleresolution.(Atable ofresolutionsandthecorrespondingnumbersisprintedinthe menu.lst.) Explanation: title Aprintedmenuselection."ArchLinux(Main)"willbeprinted onthescreenasamenuselection. root GRUB'srootthedriveandpartitionwherethekernel(/boot) resides,accordingtosystemBIOS.(Moreaccurately,where GRUB'sstage2fileresides).NOTnecessarilytheroot(/)file system,astheycanresideonseparatepartitions.GRUB's numberingschemestartsat0,andusesanhdx,xformat regardlessofIDEorSATA,andenclosedwithinparentheses. Theexampleindicatesthat/bootisonthefirstpartitionofthe firstdrive,accordingtotheBIOS,so(hd0,0). kernel Thislinespecifies: ThepathandfilenameofthekernelrelativetoGRUB's
www.readability.com/articles/3wuojrwx
54/85
4/23/13
root.Intheexample,/bootismerelyadirectoryresiding onthesamepartitionas/andvmlinuz26isthekernel filename/boot/vmlinuz26.If/bootwereonaseparate partition,thepathandfilenamewouldbesimply /vmlinuz26,beingrelativetoGRUB'sroot. Ther o o t = argumenttothekernelstatementspecifiesthe partitioncontainingtheroot(/)directoryinthebooted system,(moreaccurately,thepartitioncontaining /sbin/init).Aneasywaytodistinguishthe2appearances of'root'in/boot/grub/menu.lstistorememberthatthefirst rootstatementinformsGRUBwherethekernelresides, whereasthesecondr o o t = kernelargumenttellsthekernel wheretherootfilesystem(/)resides. Kerneloptions.Inourexample,romountsthefilesystem asreadonlyduringstartup,(usuallyasafedefaultyou maywishtochangethisincaseitcausesproblems booting).Dependingonhardware,rootdelay=8mayneed tobeaddedtothekerneloptionsinordertobeableto bootfromanexternalusbharddrive. initrd ThepathandfilenameoftheinitialRAMfilesystemrelativeto GRUB'sroot.Again,intheexample,/bootismerelya directoryresidingonthesamepartitionas/andkernel26.img istheinitrdfilename/boot/kernel26.img.If/bootwereona separatepartition,thepathandfilenamewouldbesimply /kernel26.img,beingrelativetoGRUB'sroot.
www.readability.com/articles/3wuojrwx
55/85
4/23/13
Example
t i t l e A r c hL i n u x( M a i n ) r o o t ( h d 0 , 0 ) k e r n e l/ b o o t / v m l i n u z 2 6r o o t = / d e v / s d a 1r o i n i t r d/ b o o t / k e r n e l 2 6 . i m g
Examplefor/bootonaseparatepartition
t i t l e A r c hL i n u x( M a i n ) r o o t ( h d 0 , 0 ) k e r n e l/ v m l i n u z 2 6r o o t = / d e v / s d a 3r o i n i t r d/ k e r n e l 2 6 . i m g
That'sitYouhaveconfiguredandinstalledyourArchLinux basesystem.Exittheinstall,andreboot:
#r e b o o t
www.readability.com/articles/3wuojrwx
56/85
4/23/13
PostInstallation
Congratulations,andwelcometoyournewArchLinuxbase system! Thissectionwillcovervariousmustdoproceduresafter installationsuchasupdatingyournewsystemandaddinga regular,nonrootuser.
Update
www.readability.com/articles/3wuojrwx
57/85
4/23/13
Ifyouhavesuccessfullyestablishedanetworkconnection, continuewithUpdate,Sync,andUpgradethesystemwith pacman. If,aftertryingtopingwww.google.com,an"unknownhost"error isreceived,youmayconcludethatyournetworkisnotproperly configured.Youmaychoosetodoublecheckthefollowingfiles forintegrityandpropersettings: /etc/rc.confSpecifically,checkyourHOSTNAMEand NETWORKINGsectionfortyposanderrors. /etc/hostsDoublecheckforformat,typos,anderrors. /etc/resolv.confIfyouareusingastaticIP.Ifyouareusing DHCP,thisfilewillbedynamicallycreatedanddestroyedby default. Tip:Advancedinstructionsforconfiguringthenetworkcanbe
www.readability.com/articles/3wuojrwx
58/85
4/23/13
foundintheNetworkarticle.
WiredLAN
CheckyourEthernetwith
#i f c o n f i ga
andthedefaultgatewaywith
#r o u t ea d dd e f a u l tg w< i pa d d r e s so ft h eg a t e w a y >
www.readability.com/articles/3wuojrwx
59/85
4/23/13
#d h c p c de t h 0
Ifthisisworking,adjust/etc/rc.confasdescribedabove,for dynamicIP.
WirelessLAN
Ifyouarebehindaproxyserver,edit/etc/wgetrcandset http_proxyandftp_proxyinit.
AnalogModem,ISDN,andDSL(PPPoE)
SeeInternetAccessfordetailedinstructions.
Update,Sync,andUpgradethesystemwithpacman
www.readability.com/articles/3wuojrwx
60/85
4/23/13
www.readability.com/articles/3wuojrwx
61/85
4/23/13
PackageRepositories
Asoftwarerepositoryisastoragelocationfromwhichsoftware packagesmayberetrievedandinstalledonacomputer.Arch Linuxpackagemaintainers(developersandTrustedUsers) maintainanumberofofficialrepositoriescontainingsoftware packagesforessentialandpopularsoftware,readilyaccessible viapacman.Thisarticleoutlinesthoseofficiallysupported repositories.SeeOfficialRepositoriesformoreinformation includingdetailsaboutthepurposeofeachrepository. Mostpeoplewillwanttouse[core],[extra]and[community].If youwanttorun32bitapplicationsonArchx86_64,enablethe [multilib]repositorybyaddingthelinesbelowto /etc/pacman.conf:
[ m u l t i l i b ] I n c l u d e=/ e t c / p a c m a n . d / m i r r o r l i s t
AUR
www.readability.com/articles/3wuojrwx
62/85
4/23/13
Alternatively,youcanuse r a n k m i r r o r s. r a n k m i r r o r sis abashscriptwhichwillattempttodetectuncommentedmirrors specifiedin/etc/pacman.d/mirrorlistwhichareclosesttothe installationmachinebasedonlatency.Fastermirrorswill dramaticallyimprovepacmanperformance,andtheoverallArch Linuxexperience.Thisscriptmayberunperiodically,especially ifthechosenmirrorsprovideinconsistentthroughputand/or updates.Notethat r a n k m i r r o r sdoesnottestforthroughput.
www.readability.com/articles/3wuojrwx 63/85
4/23/13
Backuptheexisting/etc/pacman.d/mirrorlist:
#c pm i r r o r l i s tm i r r o r l i s t . b a c k u p
Runthescriptagainstthemirrorlist.backupwiththenswitchand redirectoutputtoanew/etc/pacman.d/mirrorlistfile:
#r a n k m i r r o r sn6m i r r o r l i s t . b a c k u p>m i r r o r
www.readability.com/articles/3wuojrwx
64/85
4/23/13
l i s t
Since r a n k m i r r o r sdoesnottakeintoaccounthowupto dateamirror'spackagelistis,it'simportanttonotethatoneor moreofthemirrorsitselectsasfastestmaystillbeoutofdate. ArchLinuxMirrorcheckreportsvariousaspectsaboutthemirrors suchasnetworkproblemswithmirrors,datacollectionproblems, thelasttimemirrorshavebeensynced,etc.Onemaywishto manuallyinspect/etc/pacman.d/mirrorlist,ensuringthatthefile containsonlyuptodatemirrorsifhavingthelatestpackage versionsisapriority. Alternatively,theMirrorlistGeneratorcanautomaticallyrank mirrorsclosetoyourlocationbyhowuptodatetheyare.
Getfamiliarwithpacman
pacmanistheArchuser'sbestfriend.Itishighlyrecommended tostudyandlearnhowtousethepacman(8)tool.Try:
$m a np a c m a n
www.readability.com/articles/3wuojrwx
65/85
4/23/13
or:
#p a c m a ns y n cr e f r e s hs y s u p g r a d e
4/23/13
Afterexecutingthecommand p a c m a nS y u,theentiresystem willbeupdated.Itispossibletopreventapackagefrombeing upgraded.Atypicalscenariowouldbeapackageforwhichan upgrademayproveproblematicforthesystem.Inthiscase,there aretwooptionsindicatethepackage(s)toskipinthepacman commandlineusingtheignoreswitch( p a c m a nSh e l p fordetails)orpermanentlyindicatethepackage(s)toskipinthe /etc/pacman.conffileintheIgnorePkgarray.Formore information,pleaseseethepacmanwikientry. Pleasenotethatthepoweruserisexpectedtokeepthesystemup todatewithpacmanSyu,ratherthanselectivelyupgrading packages.Youmaydivergefromthistypicalusageasyouwish justbewarnedthatthereisagreaterchancethatthingswillnot workasintendedandthatitcouldbreakyoursystem.The majorityofcomplaintshappenwhenselectiveupgrading,unusual compilationorimpropersoftwareinstallationisperformed.Useof IgnorePkgin/etc/pacman.confisthereforediscouraged,and shouldonlybeusedsparingly,ifyouknowwhatyouaredoing.
TheArchrollingreleasemodel
www.readability.com/articles/3wuojrwx
67/85
4/23/13
www.readability.com/articles/3wuojrwx
68/85
4/23/13
betweenuser(under/home/username)andglobal configurationfiles,(usuallyunder/etc/)thesettingsinthe userfilewillprevail.Dotfileslikelytobealteredbytheend userinclude.xinitrcand.bashrcfiles.Theconfigurationfiles forxinitandBashrespectively.Theyallowtheuserthe abilitytochangethewindowmanagertobestartedupon loginandalsoaliases,userspecifiedcommandsand environmentvariablesrespectively.Whenauseriscreated, theirdotfilesshallbetakenfromthe/etc/skeldirectory wheresystemsamplefilesreside. gThegroupnameornumberoftheuser'sinitiallogin group.Thegroupnamemustexist.Ifagroupnumberis provided,itmustrefertoanalreadyexistinggroup.Ifnot specified,thebehaviorofuseraddwilldependonthe USERGROUPS_ENABvariablecontainedin /etc/login.defs. GAlistofsupplementarygroupswhichtheuserisalsoa memberof.Eachgroupisseparatedfromthenextbya comma,withnointerveningspaces.Thedefaultisforthe usertobelongonlytotheinitialgroup. sThepathandfilenameoftheusersdefaultloginshell. ArchLinuxinitscriptsuseBash.Afterthebootprocessis complete,thedefaultloginshellisuserspecified.(Ensure thechosenshellpackageisinstalledifchoosingsomething otherthanBash). Usefulgroupsforyournonrootuserinclude:
www.readability.com/articles/3wuojrwx
69/85
4/23/13
audiofortasksinvolvingsoundcardandrelatedsoftware floppyforaccesstoafloppyifapplicable lpformanagingprintingtasks opticalformanagingtaskspertainingtotheopticaldrive(s) storageformanagingstoragedevices videoforvideotasksandhardwareacceleration wheelforusingsudo gamesneededforwritepermissionforgamesinthegames group powerusedw/poweroptions(e.g.:shutdownwithpower button) scannerforusingascanner Atypicaldesktopsystemexample,addingausernamed"archie" specifyingbashastheloginshell:
#u s e r a d dmgu s e r sGa u d i o , l p , o p t i c a l , s t o r a g e , v i d e o , w h e e l , g a m e s , p o w e r , s c a n n e rs/ b i n / b a s ha r c h i e
Next,addapasswordforyournewuserusing
/ u s r / b i n / p a s s w d.
Anexampleforouruser,'archie':
#p a s s w da r c h i e
(Youwillbepromptedtoprovidethenewpassword.)
www.readability.com/articles/3wuojrwx
70/85
4/23/13
InstallSudo:
#p a c m a nSs u d o
Toaddauserasasudouser(a"sudoer"),thevisudocommand mustberunasroot.
www.readability.com/articles/3wuojrwx
71/85
4/23/13
Thiswillopenthefile/etc/sudoersinaspecialsessionofvi. visudocopiesthefiletobeeditedtoatemporaryfile,editsitwith aneditor,(vibydefault),andsubsequentlyrunsasanitycheck.If itpasses,thetemporaryfileoverwritestheoriginalwiththe correctpermissions. Warning:Donotedit/etc/sudoersdirectlywithaneditorErrors insyntaxcancauseannoyances(likerenderingtherootaccount unusable).Youmustusethevisudocommandtoedit /etc/sudoers. Intheprevioussectionweaddedyourusertothe"wheel"group. Togiveusersinthewheelgroupfullrootprivilegeswhenthey precedeacommandwith"sudo",uncommentthefollowingline:
www.readability.com/articles/3wuojrwx
72/85
4/23/13
% w h e e l A L L = ( A L L )A L L
Ifyouwantsound,proceedtoAdvancedLinuxSound Architectureforinstructions.Alternatively,proceedtothenext section(installingaGUI)first,andsetupsoundlater(itusually worksoutofthebox,soyou'lljustneedtounmuteit). TheAdvancedLinuxSoundArchitecture(ALSA)isincluded withthekernelandit'srecommendedtotryitfirst.However,ifit doesn'tworkoryouaren'tsatisfiedwiththequality,theOpen SoundSystemisaviablealternative.OSSv4hasbeenreleased underafreelicenseandisgenerallyconsideredasignificant improvementovertheolderOSSv3whichwasreplacedby ALSA.InstructionscanbefoundintheOSSarticle.
www.readability.com/articles/3wuojrwx
73/85
4/23/13
Ifyouhaveadvancedaudiorequirements,takealookatSound foranoverviewofvariousarticles.
GraphicalUserInterface
InstallX
TheXWindowSystem(commonlyX11,orX)isanetworking anddisplayprotocolwhichprovideswindowingonbitmap displays.Itprovidesthestandardtoolkitandprotocoltobuild graphicaluserinterfaces(GUIs). Note:Ifyou'reinstallingArchinaVirtualboxguest,youneeda differentwaytocompleteXinstallation.SeeRunningArchLinux asaguest,thenskiptheA,B,Cstepsbelow. NowwewillinstallthebaseXorgpackagesusingpacman.This isthefirststepinbuildingaGUI. Installthebasepackages:
#p a c m a nSx o r g
Installmesafor3Dsupport:
#p a c m a nSm e s a
The3Dutilitiesglxgearsandglxinfoareincludedinthemesa demospackage,installifneeded:
#p a c m a nSm e s a d e m o s
Installvideodriver
www.readability.com/articles/3wuojrwx
74/85
4/23/13
www.readability.com/articles/3wuojrwx
75/85
4/23/13
NVIDIAusershavethreeoptionsfordrivers(inadditiontothe vesadriver): Theopensourcenouveaudriver,whichoffersfast2d accelerationandexperimental3dsupportwhichisgood enoughforbasiccompositing(note:doesnotfullysupport powersavingyet).FeatureMatrix. Theopensource(butobfuscated)nvdriver,whichisvery slowandonlyhas2dsupport. Theproprietarynvidiadrivers,whichoffergood3d performanceandpowersaving.Evenifyouplanonusing theproprietarydrivers,itisrecommendedtostartwith nouveauandthenswitchtothebinarydriverafteryouhave Xsetupandworking.Nouveauoftenworksoutofthebox, whilenvidiawillrequireconfigurationandlikelysome troubleshooting.SeeNVIDIAformoreinformation. Theopensourcenouveaudrivershouldbegoodenoughformost usersandisrecommended:
#p a c m a nSx f 8 6 v i d e o n o u v e a u
Or,for3Dsupport(experimental):
#p a c m a nSn o u v e a u d r i
Createthefile/etc/X11/xorg.conf.d/20nouveau.conf,andinput thefollowingcontents:
S e c t i o n" D e v i c e "
www.readability.com/articles/3wuojrwx
76/85
4/23/13
ATIownershavetwooptionsfordrivers(inadditiontothevesa driver): Theopensourceradeondriverprovidedbythexf86video atipackage.Seetheradeonfeaturematrixfordetails. Theproprietaryfglrxdriverprovidedbythecatalystpackage locatedintheAUR.Itsupportsonlynewerdevices (HD2xxxandnewer).Itwasonceapackageofferedby Archinthe e x t r arepository,butasofMarch2009, officialsupporthasbeendroppedbecauseofdissatisfaction withthequalityandspeedofdevelopmentoftheproprietary driver.SeeATICatalystformoreinformation. Theopensourcedriveristherecommendedchoice.Installthe radeonATIDriver:
#p a c m a nSx f 8 6 v i d e o a t i
Tip:Foradvancedinstructions,seeATI.
www.readability.com/articles/3wuojrwx
77/85
4/23/13
Installinputdrivers
Tip:Forinstructionsonfinetuningortroubleshootingtouchpad settings,seetheTouchpadSynapticsarticle.
ConfigureX(Optional)
www.readability.com/articles/3wuojrwx
78/85
4/23/13
IfyoudonotuseastandardUSkeyboardyouneedtosetthe keyboardlayoutin/etc/X11/xorg.conf.d/10evdev.conf:
S e c t i o n" I n p u t C l a s s " I d e n t i f i e r" e v d e vk e y b o a r dc a t c h a l l " M a t c h I s K e y b o a r d" o n " M a t c h D e v i c e P a t h" / d e v / i n p u t / e v e n t * " D r i v e r" e v d e v " O p t i o n" X k b L a y o u t "" b e " E n d S e c t i o n
www.readability.com/articles/3wuojrwx
79/85
4/23/13
Ifyouneedtostartdbuswithoutrebooting,run
#/ e t c / r c . d / d b u ss t a r t
StartX
www.readability.com/articles/3wuojrwx
80/85
4/23/13
Afewmovablewindowsshouldshowup,andyourmouse shouldwork.OnceyouaresatisfiedthatXinstallationwasa success,youmayexitoutofXbyissuingthee x i t commandinto thepromptsuntilyoureturntotheconsole. Ifthescreengoesblack,youmaystillattempttoswitchtoa differentvirtualconsole(CTRLAltF2,forexample),andlogin blindlyasroot,followedby<Enter>,followedbyroot'spassword followedby<Enter>. YoucanattempttokilltheXserverwith / u s r / b i n / p k i l l (notethecapitalletterX):
#p k i l lX
Ifpkilldoesnotwork,rebootblindlywith:
#r e b o o t
Incaseoferrors
www.readability.com/articles/3wuojrwx
81/85
4/23/13
www.readability.com/articles/3wuojrwx
82/85
4/23/13
RefertoFontConfigurationforhowtoconfigurefontrendering andFontsforfontsuggestionsandinstallationinstructions.
Chooseandinstallagraphicalinterface
www.readability.com/articles/3wuojrwx
83/85
4/23/13
Controlstheplacementandappearanceofapplicationwindows inconjunctionwiththeXWindowSystem.SeeWindow managersformoreinformation. DesktopEnvironment(DE) WorksatopandinconjunctionwithX,toprovideacompletely functionalanddynamicGUI.ADEtypicallyprovidesa windowmanager,icons,applets,windows,toolbars,folders, wallpapers,asuiteofapplicationsandabilitieslikedragand drop.SeeDesktopenvironmentsformoreinformation. Note:YoucanbuildyourownDEbyusingaWMandthe applicationsofyourchoice. Afterinstallingagraphicalinterface,youmaywishtocontinue withGeneralRecommendationsforpostinstallationinstructions.
MethodsforstartingyourGraphicalEnvironment
Manually
www.readability.com/articles/3wuojrwx
84/85
4/23/13
Appendix
ForalistofCommonApplicationsandLightweightApplications, visittheirrespectivearticles. SeeGeneralRecommendationsforpostinstallationtutorialslike settingupCPUfrequencyscalingorfontrendering.
www.readability.com/articles/3wuojrwx
85/85