You are on page 1of 85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

system,providingasimpleframeworktocreateinstallable Archpackagesfromsource TheArchUserRepository:offeringmanythousandsofuser contributedbuildscriptsandtheopportunitytoshareyour own


License

ArchLinux,pacman,documentation,andscriptsarecopyright 20022007byJuddVinet,20072011byAaronGriffinand arelicensedundertheGNUGeneralPublicLicenseVersion2.


TheArchWay

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

Beginners' Guide wiki.archlinux.org Readability

unnecessarycomplicationstoarriveatthesimplest explanation,methodortheory. "Theextraordinarypartof[mymethod]liesinits simplicity..Theheightofcultivationalwaysrunsto simplicity."BruceLee


AboutThisGuide

ThecommunitymaintainedArchwikiisanexcellentresource andshouldbeconsultedforissuesfirst.TheIRCchannel (irc://irc.freenode.net/#archlinux),andtheforumsarealso availableiftheanswercannotbefoundelsewhere.Also,besure tocheckoutthe m a npagesforanycommandyouare unfamiliarwiththiscanusuallybeinvokedwith m a n


c o m m a n d.

Note:Followingthisguidecloselyisessentialinorderto successfullyinstallaproperlyconfiguredArchLinuxsystem,so pleasereaditthoroughly.Itisstronglyrecommendedyouread eachsectioncompletelybeforecarryingoutthetaskscontained. Theguideisdividedinto4maincomponents:

PreparetheInstallation
Note:Ifyouwishtoinstalltoanotherpartitionfromwithinan existingGNU/LinuxdistroorLiveCD,pleaseseethiswikiarticle forstepstodothis.Thiscanbeusefulparticularlyifyouplanto installArchviavncorsshremotely.Thefollowingassumes installationbyconventionalmeans.

www.readability.com/articles/3wuojrwx

3/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Thisshouldgiveyouan"OK"fortheoneyouhave.(Simply ignoreotherlines.)Ifnot,downloadallfilesagain.Themd5sum checkworksthesameway.

www.readability.com/articles/3wuojrwx

4/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

InstallOveraNetwork

InsteadofwritingthebootmediatoadiscorUSBdrive,youmay alternativelybootthe.isoimageoverthenetwork.Thisworks wellwhenyoualreadyhaveaserversetup.Pleaseseethisarticle formoreinformation,andthencontinuetoBootArchLinux Installer


CDinstaller

Burnthe.isoimagefiletoaCDorDVDmediawithyour preferredCD/DVDburnerdriveandsoftware,andcontinuewith BootArchLinuxInstaller Note:Thequalityofopticaldrives,aswellastheCDmediaitself, varygreatly.Generally,usingaslowburnspeedisrecommended forreliableburnsSomeusersrecommendspeedsaslowas4xor 2x.IfyouareexperiencingunexpectedbehaviorfromtheCD,try burningattheminimumspeedsupportedbyyoursystem.


FlashMemoryDeviceorUSBstick

SeeInstallfromaUSBflashdriveformoredetailedinstructions. Thismethodwillworkforanytypeofflashmediafromwhich yourBIOSwillletyouboot,beitacardreaderorUSBport. Warning:Thisprocedurewillirrevocablydestroyalldataonyour media!Also,beverycarefulwhereyousendtheimageiso,as


d dwillobedientlywritetoanytargetyoupointto,evenifthat

isyourharddisk.
www.readability.com/articles/3wuojrwx 5/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

*nixMethod

Insertanemptyorexpendableflashdevice,determineitspath, andwritethe.isotothedevicewiththe d dprogram:


#d di f = a r c h l i n u x 2 0 1 0 . 0 5 { c o r e | n e t i n s t a l l } { i 6 8 6 | x 8 6 _ 6 4 | d u a l } . i s oo f = / d e v / s d x

where i f =isthepathtothe.isofileand o f =isyourflash device.Makesuretouse/dev/sdxandnot/dev/sdx1.Youwill needaflashmemorydevicelargeenoughtoaccommodatethe image. Toverifythattheimagewassuccessfullywrittentotheflash device,makeanoteofthenumberofrecords(blocks)readinand writtenout,thenperformthefollowingcheck:


$d di f = / d e v / s d xc o u n t = n u m b e r _ o f _ r e c o r d ss t a t u s = n o x f e r|m d 5 s u m

Themd5sumreturnedshouldmatchthemd5sumofthe downloadedarchlinuximagefile(2010.05)theybothshould matchthemd5sumoftheimageaslistedinthemd5sumsfilein themirrordistributionsite.Atypicalrunwilllooklikethis:


$[ s u d o ]d di f = a r c h l i n u x 2 0 1 0 . 0 5 c o r e i 6 8 6 . i s o o f = / d e v / s d c# W r i t e. i s ot od r i v e 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 3 8 1 4 2 6 1 7 6b y t e s( 3 8 1M B )c o p i e d ,1 0 6 . 6 1 1s ,

www.readability.com/articles/3wuojrwx

6/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

Tip:Duringtheprocess,theautomaticscreenblankermaycome on.Ifso,onecanpresstheAltkeytosafelyobtainthenormal display.


BootfromtheMedia

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

Thesystemwillnowloadandpresentaloginprompt.Loginas 'root',withoutthequotes. IfusinganIntelvideochipsetandthescreengoesblankduring thebootprocess,theproblemislikelyanissuewithkernelmode setting.Apossibleworkaroundmaybeachievedbyrebooting andpressing<Tab>attheGRUBmenutoenterkerneloptions. Attheendofthekernelline,addaspaceandthen:


www.readability.com/articles/3wuojrwx 8/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

which(ifitworks)willnotdisablekernelmodesetting. Whendonemakinganychangestoanymenucommand,simply press"Enter"tobootwiththatsetup. SeetheIntelarticleformoreinformation.


Changingthekeymap

IfyouhaveanonUSkeyboardlayoutyoucaninteractively chooseyourkeymap/consolefontwiththecommand:
#k m

orusetheloadkeyscommand:
#l o a d k e y sl a y o u t

wherelayoutisyourkeyboardlayoutsuchas" f r"or" b e l a t i n 1"


Documentation

Theofficialinstallguideisconvenientlyavailablerightonthe livesystem!Toaccessit,changetotty2(virtualconsole#2)with <ALT>+F2,loginas"root"andtheninvoke / u s r / b i n / l e s s


www.readability.com/articles/3wuojrwx 9/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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.

Changebacktotty1with<ALT>+F1tofollowtherestofthe installprocess.(Changebacktotty2atanytimeifyouneedto referencetheOfficialGuideasyouprogressthroughthe installationprocess.) Tip:Pleasenotethattheofficialguideonlycoversinstallation andconfigurationofthebasesystem.Oncethatisinstalled,itis stronglyrecommendedthatyoucomebackheretothewikito findoutmoreaboutpostinstallationconsiderationsandother relatedissues.

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

Beginners' Guide wiki.archlinux.org Readability

Afterawelcomescreen,youwillbepromptedforaninstallation source.Choosetheappropriatesourcefortheinstalleryouare using.IfusingaNetinstallimage,relativespeedandupdate statusofsourcerepositorymirrorsmaybecheckedhere. IfyouchosetheCOREinstallerandwishtousethe packagesontheCD,selectCDROMassource Alternatively,orifyou'reusingtheNetinstallinstallation media,selectNETandseesectionbelow(Configure Network).


ConfigureNetwork(Netinstall)

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

Beginners' Guide wiki.archlinux.org Readability

netmask,broadcast,gatewayDNSIP,HTTPproxy,andFTP proxy.Afterwards,youwillbereturnedtotheNetInstallation Menu SelectChooseMirrorandselectanFTP/HTTPmirror.When finished,returntomainmenu. Note:archlinux.orgisthrottledto50KB/s


(A)DSLQuickstartfortheLiveEnvironment

(Ifyouhaveamodemorrouterinbridgemodetoconnecttoyour ISP) Switchtoanothervirtualconsole(<Alt>+F2),loginasrootand invoke


#p p p o e s e t u p

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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

#i w c o n f i g l on ow i r e l e s se x t e n s i o n s . e t h 0n ow i r e l e s se x t e n s i o n s . w l a n 0 u n a s s o c i a t e d E S S I D : " " M o d e : M a n a g e d C h a n n e l = 0 A c c e s sP o i n t :N o t A s s o c i a t e d B i tR a t e : 0k b / s T x P o w e r = 2 0d B m S e n s i t i v i t y = 8 / 0 R e t r yl i m i t : 7 R T St h r : o f f F r a g m e n tt h r : o f f P o w e rM a n a g e m e n t : o f f L i n kQ u a l i t y : 0 S i g n a ll e v e l : 0 N o i s el e v e l : 0 R xi n v a l i dn w i d : 0 R xi n v a l i dc r y p t : 0 R xi n v a l i df r a g : 0 T xe x c e s s i v er e t r i e s : 0 I n v a l i dm i s c : 0 M i s s e db e a c o n : 0 w l a n 0istheavailablewirelessinterfaceinthisexample.

Note:Ifyoudonotseeoutputsimilartothis,thenyourwireless driverhasnotbeenloaded.Ifthisisthecase,youmustloadthe driveryourself.PleaseseeWirelessSetupformoredetailed information. Bringtheinterfaceupwith / s b i n / i f c o n f i g


< i n t e r f a c e >u p. #i f c o n f i gw l a n 0u p

www.readability.com/articles/3wuojrwx

14/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

Asmallpercentageofwirelesschipsetsalsorequirefirmware,in additiontoacorrespondingdriver.Ifthewirelesschipsetrequires firmware,youarelikelytoreceivethiserrorwhenbringingthe interfaceup:


#i f c o n f i gw l a n 0u p S I O C S I F F L A G S :N os u c hf i l eo rd i r e c t o r y

Ifunsure,invoke / u s r / b i n / d m e s gtoquerythekernellogfor afirmwarerequestfromthewirelesschipset.Exampleoutput fromanIntelchipsetwhichrequiresandhasrequestedfirmware fromthekernelatboot:


$d m e s g|g r e pf i r m w a r e f i r m w a r e :r e q u e s t i n gi w l w i f i 5 0 0 0 1 . u c o d e

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

Beginners' Guide wiki.archlinux.org Readability

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

UsingWPAencryptionrequiresthatthekeybeencryptedand storedinafile,alongwiththeESSID,tobeusedlaterfor connectionvia w p a _ s u p p l i c a n t.Thus,afewextrastepsare required: Forthepurposeofsimplifyingandbackup,renamethedefault wpa_supplicant.conffile:


#m v/ e t c / w p a _ s u p p l i c a n t . c o n f/ e t c / w p a _ s u p p l i c a n t . c o n f . o r i g i n a l

Using w p a _ p a s s p h r a s e,provideyourwirelessnetworkname andWPAkeytobeencryptedandwrittento /etc/wpa_supplicant.conf Thefollowingexampleencryptsthekey'my_secret_passkey'of the'linksys'wirelessnetwork,generatesanewconfigurationfile (<file>/etc/wpa_supplicant.conf</file>),andsubsequently redirectstheencryptedkey,writingittothefile:


#w p a _ p a s s p h r a s el i n k s y s" m y _ s e c r e t _ p a s s k e y " >/ e t c / w p a _ s u p p l i c a n t . c o n f

www.readability.com/articles/3wuojrwx

16/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

CheckWPASupplicantformoreinformationand troubleshooting. Note:/etc/wpa_supplicant.confisstoredinplaintextformat.This isn'triskyintheinstallationenvironment,butwhenyoureboot intoyournewsystemandreconfigureWPA,remembertochange thepermissionson/etc/wpa_supplicant.conf(e.g.c h m o d0 6 0 0


/ e t c / w p a _ s u p p l i c a n t . c o n f tomakeitreadablebyrootonly).

Associateyourwirelessdevicewiththeaccesspointyou wanttouse.Dependingontheencryption(none,WEP,or WPA),theproceduremaydiffer.Youneedtoknowthe nameofthechosenwirelessnetwork(ESSID).

www.readability.com/articles/3wuojrwx

17/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

NoEncryption WEPw/HexKey WEPw/ASCII passphrase WPA

Note:Thenetworkconnectionprocessmaybeautomatedlaterby usingthedefaultArchnetworkdaemon,netcfg,wicd,oranother networkmanagerofyourchoice. Afterutilizingtheappropriateassociationmethodoutlined above,waitafewmomentsandconfirmyouhave successfullyassociatedtotheaccesspointbefore continuing.e.g.:


#i w c o n f i gw l a n 0

Outputshouldindicatethewirelessnetworkisassociatedwiththe interface. RequestanIPaddresswith / s b i n / d h c p c d


< i n t e r f a c e > .e.g.: #d h c p c dw l a n 0

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

Beginners' Guide wiki.archlinux.org Readability

Youshouldhaveaworkingnetworkconnection.For troubleshooting,checkthedetailedWirelessSetuppage. Returntotty1with<ALT>+F1.ContinuewithSetClock


SetClock

UTCChooseUTCifrunningonlyU N I X likeoperating system(s). localtimeChooselocalifmultibootingwithaMicrosoft WindowsOS.


PrepareHardDrive

Warning:Partitioningharddrivescandestroydata.Youare stronglycautionedandadvisedtobackupyourcriticaldataif applicable. Note:PartitioningmaybeperformedbeforeinitiatingtheArch installationifdesired,byutilizingGPartedorotheravailable tools.Iftheinstallationdrivehasalreadybeenpartitionedtothe requiredspecifications,continuewithSetFilesystem Mountpoints Verifycurrentdiskidentitiesandlayoutbyinvoking


/ s b i n / f d i s kwiththe l(lowercaseL)switch.

Openanothervirtualconsole(<ALT>+F3)andenter:
#f d i s kl

www.readability.com/articles/3wuojrwx

19/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

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

Partitioningaharddiskdrivedefinesspecificareas(the partitions)withinthedisk,thatwilleachappearandbehaveasa separatediskanduponwhichafilesystemmaybecreated (formatted). Thereare3typesofdiskpartitions: 1. Primary 2. Extended 3. Logical

www.readability.com/articles/3wuojrwx

21/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

AswappartitionisaplaceonthedrivewherevirtualRAM resides,allowingthekerneltoeasilyusediskstoragefordatathat doesnotfitintophysicalRAM. Historically,thegeneralruleforswappartitionsizewas2xthe amountofphysicalRAM.Overtime,ascomputershavegained everlargermemorycapacities,thisrulehasbecomeincreasingly deprecated.Generally,onmachineswithupto512MBRAM,the 2xruleisusuallyquitesufficient.Iftheinstallationmachine providesgratuitousamountsofRAM(morethan1024MB)it

www.readability.com/articles/3wuojrwx

22/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

maybepossibletocompletelyforgetaswappartitionaltogether, sincetheoptiontocreateaswapfileisalwaysavailablelater.A1 GBswappartitionwillbeusedinthisexample. Note:Ifusingsuspendtodisk,(hibernate)aswappartitionat leastequalinsizetotheamountofphysicalRAMisrequired. SomeArchusersevenrecommendoversizingitbeyondthe amountofphysicalRAMby1015%,toallowforpossiblebad sectors.


PartitionScheme

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

Beginners' Guide wiki.archlinux.org Readability

/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

Beginners' Guide wiki.archlinux.org Readability

/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

Beginners' Guide wiki.archlinux.org Readability

moreexpedientwhenindependentfilesystemsareused. Separatefilesystemtypesmayalsobechosenbasedupon thenatureofdataandusage. Inthisexample,weshalluseseparatepartitionsfor/,/var,/home, andaswappartition. Note:/varcontainsmanysmallfiles.Thisshouldbetakeninto considerationwhenchoosingafilesystemtypeforit,(ifcreating itsownseparatepartition).


Howbigshouldmypartitionsbe?

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

Beginners' Guide wiki.archlinux.org Readability

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

Startbycreatingtheprimarypartitionthatwillcontaintheroot,(/) filesystem. ChooseNew>Primaryandenterthedesiredsizeforroot(/).Put thepartitionatthebeginningofthedisk.

www.readability.com/articles/3wuojrwx

27/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

ChooseWriteandtype'yes'.Bewarethatthisoperationmay destroydataonyourdisk.ChooseQuittoleavethepartitioner. ChooseDonetoleavethismenuandcontinuewith"Set FilesystemMountpoints". Note:SincethelatestdevelopmentsoftheLinuxkernelwhich includethelibataandPATAmodules,allIDE,SATAandSCSI driveshaveadoptedthesdxnamingscheme.Thisisperfectly normalandshouldnotbeaconcern.


SetFilesystemMountpoints

Specifyeachpartitionandcorrespondingmountpointtoyour requirements.(Recallthatpartitionsendinanumber.Therefore, sdaisnotitselfapartition,butrather,signifiesanentiredrive)


FilesystemTypes

Again,afilesystemtypeisaverysubjectivematterwhichcomes downtopersonalpreference.Eachhasitsownadvantages, disadvantages,anduniqueidiosyncrasies.Hereisaverybrief overviewofsupportedfilesystems: 1.ext2SecondExtendedFilesystemOld,reliableGNU/Linux filesystem.Verystable,butwithoutjournalingsupport.Maybe inconvenientforroot(/)and/home,duetoverylongfsck's.An ext2filesystemcaneasilybeconvertedtoext3.

www.readability.com/articles/3wuojrwx

29/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

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

Allabovefilesystems,exceptext2,utilizejournaling.Journaling filesystemsarefaultresilientfilesystemsthatuseajournaltolog changesbeforetheyarecommittedtothefilesystemtoavoid metadatacorruptionintheeventofacrash.Notethatnotall journalingtechniquesarealikespecifically,onlyext3andext4

www.readability.com/articles/3wuojrwx

31/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Allpackagesduringinstallationarefromthe[core]repository. TheyarefurtherdividedintoBase,andBasedevel.Package informationandbriefdescriptionsareavailablehere. First,selectthepackagecategory:

www.readability.com/articles/3wuojrwx

32/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

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

Tip:Closelyfollowingandunderstandingthesestepsisofkey importancetoensureaproperlyconfiguredsystem. Atthisstageoftheinstallation,youwillconfiguretheprimary configurationfilesofyourArchLinuxbasesystem.Previous versionsoftheinstallerincludedhwdetecttogatherinformation foryourconfiguration.Thishasbeendeprecatedandreplaced withudev,whichshouldhandlemostmoduleloading automaticallyatboot.

www.readability.com/articles/3wuojrwx

34/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

ArchLinuxusesthefile/etc/rc.confastheprincipallocationfor systemconfiguration.Thisonefilecontainsawiderangeof configurationinformation,principallyusedatsystemstartup.As itsnamedirectlyimplies,italsocontainssettingsforandinvokes the/etc/rc*files,andis,ofcourse,sourcedbythesefiles.


LOCALIZATIONsection

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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

safe. USECOLOR Select"yes"ifyouhaveacolormonitorandwishtohave colorsinyourconsoles.


HARDWARESection

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

Beginners' Guide wiki.archlinux.org Readability

SpecifyadditionalMODULESifyouknowthatanimportant moduleismissing.Ifyoursystemhasanyfloppydrives,add "floppy".Ifyouwillbeusingloopbackfilesystems,add "loop".Alsospecifyanyblacklistedmodulesbyprefixing themwithabang(!).UdevwillbeforcedNOTtoload blacklistedmodules.Intheexample,theIPv6moduleas wellastheannoyingpcspeakerareblacklisted.


NETWORKINGSection

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

Beginners' Guide wiki.archlinux.org Readability

ROUTES IfyouareusingstaticIP,removethe!infrontof'gateway'. IfusingDHCP,youcanusuallyleavethisvariable commentedoutwiththebang(!),butagain,someusers requirethegatewayandROUTESdefined.Ifyou experiencenetworkingissueswithpacman,forinstance, youmaywanttoreturntothesevariables. Examplew/DynamicIP(DHCP):


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 " e t h 0 = " d h c p " 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 )

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 )

WhenusingastaticIP,modify/etc/resolv.conftospecifythe DNSserversofchoice.Pleaseseethesectionbelowregarding thisfile. Note:Remember,connectingtoawirelessnetworkautomatically


www.readability.com/articles/3wuojrwx 40/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

requiresafewmorestepsandmayrequireyoutosetupa networkmanagersuchasnetcfgorwicd.PleaseseetheWireless Setuppageformoreinformation Tip:IfusinganonstandardMTUsize(a.k.a.jumboframes)is desiredANDtheinstallationmachinehardwaresupportsthem, seetheJumboFrameswikiarticleforfurtherconfiguration.


DAEMONSSection

Thisarraysimplyliststhenamesofthosescriptscontainedin /etc/rc.d/whicharetobestartedduringthebootprocess,andthe orderinwhichtheystart.Asynchronousinitializationby backgroundingisalsosupportedandusefulforspeedingupboot.


D A E M O N S = ( n e t w o r k@ s y s l o g n gn e t f s@ c r o n d )

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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

/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

Beginners' Guide wiki.archlinux.org Readability

/ 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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

initrramfsloadsthepropermodules,eithermanuallyorthrough udev,itpassescontroltothekernelandyourbootcontinues.For thisreason,theinitramfsonlyneedstocontainthemodules necessarytoaccesstherootfilesystem.Itdoesnotneedto containeverymoduleyouwouldeverwanttouse.Themajority ofcommonkernelmoduleswillbeloadedlateronbyudev, duringtheinitprocess.


m k i n i t c p i oisthenextgenerationofinitramfscreation.Ithas

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

Beginners' Guide wiki.archlinux.org Readability

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 "

(Otherwise,ifbootfailsforsomereasonyouwillbeaskedto enterroot'spasswordforsystemmaintenancebutwillbeunable todoso.) IfyouneedsupportforbootingfromUSBdevices,FireWire devices,PCMCIAdevices,NFSshares,softwareRAIDarrays, LVM2volumes,encryptedvolumes,orDSDTsupport,configure yourHOOKSaccordingly.


/etc/modprobe.d/modprobe.conf

Thisfilecanbeusedtosetspecialconfigurationoptionsforthe kernelmodules.Itisunnecessarytoconfigurethisfileinthe example.


/etc/resolv.conf

www.readability.com/articles/3wuojrwx

48/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Ifyouareusingarouter,youwillprobablywanttospecifyyour DNSserversintherouteritself,andmerelypointtoitfromyour /etc/resolv.conf,usingyourrouter'sIP(whichisalsoyour gatewayfrom/etc/rc.conf).Example:


n a m e s e r v e r1 9 2 . 1 6 8 . 1 . 1

www.readability.com/articles/3wuojrwx

49/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

IfusingDHCP,youmayalsospecifyyourDNSserversinthe router,orallowautomaticassignmentfromyourISP,ifyourISP issoequipped.


/etc/hosts

ThisfileassociatesIPaddresseswithhostnamesandaliases,one lineperIPaddress.Foreachhostasinglelineshouldbepresent withthefollowinginformation:


< I P a d d r e s s >< h o s t n a m e >[ a l i a s e s . . . ]

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

Warning:Thisformat,includingthe'localhost'andyouractual hostname,isrequiredforprogramcompatibility!So,ifyouhave namedyourcomputer"arch",thenthatlineaboveshouldlook likethis:


1 2 7 . 0 . 0 . 1 a r c h l o c a l h o s t . l o c a l d o m a i n l o c a l h o s t

Errorsinthisentrymaycausepoornetworkperformanceand/or certainprogramstoopenveryslowly,ornotworkatall.Thisisa verycommonerrorforbeginners. Note:RecentversionsoftheArchLinuxInstallerautomatically addyourhostnametothisfileonceyouedit/etc/rc.confwith suchinformation.If,forwhateverreason,thisisnotthecase,you


www.readability.com/articles/3wuojrwx 50/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

mayaddityourselfwiththegiveninstructions. IfyouuseastaticIP,addanotherlineusingthesyntax:<static IP><hostname.domainname.org><hostname>e.g.:


1 9 2 . 1 6 8 . 1 . 1 0 0y o u r h o s t n a m e . d o m a i n . o r g y o u r h o s t n a m e

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

Theaboveexamplewouldallowyoutoaccessgooglesimplyby typing'g'intoyourbrowser,andaccesstoamediaanddata serveronyournetworkbynameandwithouttheneedfortyping outtheirrespectiveIPaddresses.


/etc/hosts.denyand/etc/hosts.allow

Modifytheseconfigurationsaccordingtoyourneedsifyouplan onusingthesshdaemon.Thedefaultconfigurationwillrejectall incomingconnections,notonlysshconnections.Edityour /etc/hosts.allowfileandaddtheappropriateparameters: Leteveryoneconnecttoyou


s s h d :A L L

Restrictittoacertainip
s s h d :1 9 2 . 1 6 8 . 0 . 1

www.readability.com/articles/3wuojrwx

51/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

The / u s r / s b i n / l o c a l e g e ncommandreadsfrom /etc/locale.gentogeneratespecificlocales.Theycanthenbe usedbyglibcandanyotherlocaleawareprogramorlibraryfor renderingtext,correctlydisplayingregionalmonetaryvalues, timeanddateformats,alphabeticidiosyncrasies,andother localespecificstandards. Bydefault/etc/locale.genisanemptyfilewithcommented documentation.Onceedited,thefileremainsuntouched.


l o c a l e g e nrunsoneveryglibcupgrade,generatingallthe

localesspecifiedin/etc/locale.gen. Choosethelocale(s)youneed(removethe#infrontofthelines youwant),e.g.:


e n _ U SI S O 8 8 5 9 1 e n _ U S . U T F 8

www.readability.com/articles/3wuojrwx

52/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

Theinstallerwillnowrunthelocalegenscript,whichwill generatethelocalesyouspecified.Youmaychangeyourlocale inthefuturebyediting/etc/locale.genandsubsequentlyrunning 'localegen'asroot. Note:Ifyoufailtochooseyourlocale,thiswillleadtoa"The currentlocaleisinvalid..."error.Thisisperhapsthemost commonmistakebynewArchusers.


PacmanMirror

Chooseamirrorrepositoryfor p a c m a n.Rememberthat archlinux.orgisthrottled,limitingdownloadsto50KB/s.


Rootpassword

Finally,setarootpasswordandmakesurethatyourememberit later.Returntothemainmenuandcontinuewithinstalling bootloader.


Done

Whenyouselect"Done",thesystemwillrebuildtheimagesand putyoubacktotheMainMenu.Thismaytakesometime. Becausewehavenosecondaryoperatingsysteminourexample, wewillneedabootloader.GRUBistherecommended bootloaderandwillbeusedinthefollowingexamples. Alternatively,youmaychooseLILOorSyslinux.Pleaseseethe relatedwikianddocumentationpagesifyouchoosetousea bootloaderotherthanGRUB.


www.readability.com/articles/3wuojrwx 53/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

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

InstalltheGRUBbootloadertothemasterbootrecord(/dev/sda inourexample). Warning:MakesuretoinstallGRUBon/dev/sdXandnot /dev/sdX#!Thisisacommonmistake. Tip:Formoredetails,seetheGRUBwikipage.


Reboot

That'sitYouhaveconfiguredandinstalledyourArchLinux basesystem.Exittheinstall,andreboot:
#r e b o o t

Tip:Besuretoremovetheinstallationmediaandperhapschange thebootpreferenceinyourBIOSotherwiseyoumaybootback intotheinstallation!

www.readability.com/articles/3wuojrwx

56/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

PostInstallation
Congratulations,andwelcometoyournewArchLinuxbase system! Thissectionwillcovervariousmustdoproceduresafter installationsuchasupdatingyournewsystemandaddinga regular,nonrootuser.
Update

YournewArchLinuxbasesystemisnowafunctional GNU/Linuxenvironmentreadyforcustomization.Fromhere, youmaybuildthiselegantsetoftoolsintowhateveryouwishor requireforyourpurposes. Loginwiththerootaccount.Wewillconfigurepacmanand updatethesystemasroot. Note:Virtualconsoles16areavailable.Youmayswitch betweenthemwith<ALT>+F1...F6


Configurethenetwork(ifnecessary)

Ifyouproperlyconfiguredyoursystem,youshouldhavea workingnetwork.Tryto p i n gw w w . g o o g l e . c o mtoverify:


#p i n gc3w w w . g o o g l e . c o m P I N Gw w w . l . g o o g l e . c o m( 7 4 . 1 2 5 . 2 2 9 . 5 1 )5 6 ( 8 4 ) b y t e so fd a t a .

www.readability.com/articles/3wuojrwx

57/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

6 4b y t e sf r o m7 4 . 1 2 5 . 2 2 9 . 5 1 :i c m p _ s e q = 1t t l = 5 1t i m e = 2 6 . 8m s 6 4b y t e sf r o m7 4 . 1 2 5 . 2 2 9 . 5 1 :i c m p _ s e q = 2t t l = 5 1t i m e = 2 7 . 4m s 6 4b y t e sf r o m7 4 . 1 2 5 . 2 2 9 . 5 1 :i c m p _ s e q = 3t t l = 5 1t i m e = 2 6 . 8m s -w w w . l . g o o g l e . c o mp i n gs t a t i s t i c s3p a c k e t st r a n s m i t t e d ,3r e c e i v e d ,0 %p a c k e t l o s s ,t i m e2 0 0 2 m s r t tm i n / a v g / m a x / m d e v=2 6 . 8 4 7 / 2 7 . 0 5 3 / 2 7 . 4 3 6 / 0 . 3 3 0m s

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

Beginners' Guide wiki.archlinux.org Readability

foundintheNetworkarticle.
WiredLAN

CheckyourEthernetwith
#i f c o n f i ga

Allinterfaceswillbelisted.Youshouldseeanentryforeth0,or perhapseth1.Theseexampleswilluseeth0. StaticIP Ifrequired,youcansetanewstaticIPwith:


#i f c o n f i ge t h 0< i pa d d r e s s >n e t m a s k< n e t m a s k >u p

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 >

Verifythat/etc/resolv.confcontainsyourDNSserverandadditif itismissing.Checkyournetworkagainwith p i n gc3


w w w . g o o g l e . c o m.Ifeverythingisworkingnow,adjust

/etc/rc.confasdescribedaboveforstaticIP. DHCP IfyouhaveaDHCPserver/routerinyournetworktry:

www.readability.com/articles/3wuojrwx

59/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

#d h c p c de t h 0

Ifthisisworking,adjust/etc/rc.confasdescribedabove,for dynamicIP.
WirelessLAN

PleaseseeWirelessQuickstartFortheLiveEnvironmentfor detailsonconnectingtoawirelessnetwork.Althoughyouareno longerrunningofftheinstallationmedia,thecommandsarethe sameaslongasyouinstalledallrelatedwirelesspackagesduring packageselection.Remember,yourwirelessdevicemayneed firmwareinordertooperate.Fortroubleshooting,checkthe detailedWirelessSetuppage.


ProxyServer

Ifyouarebehindaproxyserver,edit/etc/wgetrcandset http_proxyandftp_proxyinit.
AnalogModem,ISDN,andDSL(PPPoE)

SeeInternetAccessfordetailedinstructions.
Update,Sync,andUpgradethesystemwithpacman

Nowwewillupdatethesystemusingpacman.Pacmanisthe packagemanagerofArchLinux.Itmanagesyourentirepackage systemandhandlesinstallation,removal,packagedowngrade (throughcache),customcompiledpackagehandling,automatic

www.readability.com/articles/3wuojrwx

60/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

dependencyresolution,remoteandlocalsearchesandmuch more.Pacmanwillnowbeusedtodownloadsoftwarepackages fromremoterepositoriesandinstallthemontoyoursystem. Note:IfyouinstalledviaaNetinstall,many,ifnotall,ofyour packageswillalreadybeuptodate.However,itisstilladvisable torunthroughthisupdateprocess.


/etc/pacman.conf

pacmanwillattempttoread/etc/pacman.confeachtimeitis invoked.Thisconfigurationfileisdividedintosections,or repositories.Eachsectiondefinesapackagerepositorythat pacmancanusewhensearchingforpackages.Theexceptionto thisistheo p t i o n s section,whichdefinesglobaloptions. Note:Thedefaultsshouldwork,somodifyingatthispointmay beunnecessary,butverificationisalwaysrecommended.Further infoavailableintheMirrorsarticle.


#n a n o/ e t c / p a c m a n . c o n f

Repositoriesaredescribedbelowenablealldesiredrepositories byremovingthe#infrontofthe'Include='and'[repository]' lines. Note:Whenchoosingrepos,besuretouncommentboththe repositoryheaderlinesin[brackets]aswellasthe'Include=' lines.Failuretodosowillresultintheselectedrepositorybeing omitted!Thisisaverycommonerror.

www.readability.com/articles/3wuojrwx

61/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

TheAURalsocontainstheunsupportedbranch,whichcannotbe accesseddirectlybypacman*.AUR[unsupported]doesnot containbinarypackages.Rather,itprovidesmorethansixteen thousandPKGBUILDscriptsforbuildingpackagesfromsource, thatmaybeunavailablethroughtheotherrepos.WhenanAUR unsupportedpackageacquiresenoughpopularvotes,itmaybe movedtotheAUR[community]binaryrepo,ifaTUiswillingto adoptandmaintainitthere. TUmaintained

www.readability.com/articles/3wuojrwx

62/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

AllPKGBUILDbashbuildscripts Notpacmanaccessiblebydefault *pacmanwrappers(AURHelpers)canhelpyouseamlessly accessAUR.


/etc/pacman.d/mirrorlist

Definespacmanrepositorymirrorsandpriorities. Open/etc/pacman.d/mirrorlistinaneditoranduncomment (removethe'#'infront)aserverclosetoyou.Thenissuea completepackagerefresh:


#p a c m a nS y y

Passingtworefreshoryflagsforcespacmantorefreshall packagelistseveniftheyareconsideredtobeuptodate.Issuing pacmanSyywheneveramirrorischanged,isgoodpracticeand willavoidpossibleheadaches.


r a n k m i r r o r s

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

Beginners' Guide wiki.archlinux.org Readability

Toolssuchas w g e tor r s y n cmaybeusedtoeffectivelytest formirrorthroughputafteranew/etc/pacman.d/mirrorlisthas beengenerated. Issuethefollowingcommandtocompletelyrefreshpackage database,upgradeandinstall c u r l:


#p a c m a nS y y uc u r l

Ifyougetanerroratthisstep,usethecommand"nano /etc/pacman.d/mirrorlist"anduncommentaserverthatsuits you.


c dtothe/etc/pacman.d/directory: #c d/ e t c / p a c m a n . d

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

Editmirrorlist.backupanduncommentallmirrorsonthesame continentorwithingeographicalproximitytotestwith rankmirrors.


#n a n om 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

Beginners' Guide wiki.archlinux.org Readability

l i s t

n6:rankthe6closestmirrors Forcepacmantorefreshallpackagelistswiththenewmirrorlist inplace:


#p a c m a nS y y
Mirrorcheckforuptodatepackages

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

Beginners' Guide wiki.archlinux.org Readability

Formoreinformation,havealookatthepacmanwikientryat yourownleisure,orcheckoutthepacmanrosettaentryfora comparisontootherpopularpackagemanagers.


UpdatetheSystem

Youarenowreadytoupgradeyourentiresystem.Beforeyoudo, readthroughthenews(andoptionallytheannouncemailinglist). Oftenthedeveloperswillprovideimportantinformationabout requiredconfigurationsandmodificationsforknownissues. Consultingthesepagesbeforeanyupgradeisgoodpractice. Sync,refresh,andupgradeyourentirenewsystemwith:


#p a c m a nS y u

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

pacmanwillnowdownloadafreshcopyofthemasterpackage listfromtheserver(s)definedin/etc/pacman.confandperformall availableupgrades.Youmaybepromptedtoupgradepacman itselfatthispoint.Ifso,sayyes,andthenreissuethe p a c m a nS y ucommandwhenfinished.

Rebootifakernelupgradehasoccurred. Note:Occasionally,configurationchangesmaytakeplace requiringuseractionduringanupdatereadpacman'soutputfor anypertinentinformation.


www.readability.com/articles/3wuojrwx 66/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

Pacmanoutputissavedin/var/log/pacman.log. SeePackageManagementFAQsforanswerstofrequentlyasked questionsregardingupdatingandmanagingyourpackages.


IgnoringPackages

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

Beginners' Guide wiki.archlinux.org Readability

KeepinmindthatArchisarollingreleasedistribution.This meansthereisneverareasontoreinstallorperformelaborate systemrebuildstoupgradetothenewestversion.Simplyissuing


p a c m a nS y uperiodicallykeepsyourentiresystemuptodate

andonthebleedingedge.Attheendofthisupgrade,your systemiscompletelycurrent.Remembertorebootifakernel upgradehasoccurred.


AddingaUser

Note:Beforeaddingyourusers,considerhardeningyoursystem byswitchingfrommd5passwordhashestosha512password hashes.Seethe[SHA_password_hashes]wikiarticleformore. Linuxisamultiuserenvironment.Youshouldnotdoyour everydayworkusingtherootaccount.Itismorethanpoor practiceitisdangerous.Rootisforadministrativetasks.Instead, addanormal,nonroot,useraccountusingthe


/ u s r / s b i n / u s e r a d dprogram. #u s e r a d dmg[ i n i t i a l _ g r o u p ]G[ a d d i t i o n a l _ g r o u p s ]s[ l o g i n _ s h e l l ][ u s e r n a m e ]

mCreatesuserhomedirectoryas/home/username.Within theirhomedirectory,ausercanwritefiles,deletethem, installprograms,etc.Users'homedirectoriesshallcontain theirdataandpersonalconfigurationfiles,thesocalled'dot files'(theirnameisprecededbyadot),whichare'hidden'. (Toviewdotfiles,enabletheappropriateoptioninyourfile managerorrunlswiththeaswitch.)Ifthereisaconflict

www.readability.com/articles/3wuojrwx

68/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

Yournewnonrootuserhasnowbeencreated,completewitha homedirectoryandaloginpassword. Deletingtheuseraccount: Intheeventoferror,orifyouwishtodeletethisuseraccountin favorofadifferentnameorforanyotherreason,use


/ u s r / s b i n / u s e r d e l: #u s e r d e lr[ u s e r n a m e ]

rFilesintheusershomedirectorywillberemovedalong withthehomedirectoryitselfandtheusersmailspool. Ifyouwanttochangethenameofyouruseroranyexistinguser, seetheChangeusernamepageoftheArchwikiand/orthe GroupsandUserManagementarticlesforfurtherinformation. Youmayalsocheckthemanpagesfor u s e r m o d ( 8 )and


g p a s s w d ( 8 ).
InstallandsetupSudo(Optional)

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

Beginners' Guide wiki.archlinux.org Readability

Bydefault,thevisudocommandusestheeditorvi.Ifyoudonot knowhowtousevi,youmaysettheEDITORenvironment variabletotheeditorofyourchoice,suchasinthisexamplewith theeditor"nano":


#E D I T O R = n a n ov i s u d o

Note:Pleasenotethatyouaresettingthevariableandstarting visudoonthesamelineatthesametime.Thiswillnotwork properlyastwoseparatedcommands. Ifyouarecomfortableusingvi,issuethevisudocommand withouttheEDITOR=nanovariable:


#v i s u d o

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

Beginners' Guide wiki.archlinux.org Readability

% w h e e l A L L = ( A L L )A L L

Nowyoucangiveanyuseraccesstothesudocommandby simplyaddingthemtothewheelgroup. Formoreinformation,suchassudoer<TAB>completion,see Sudo. YoushouldnowhaveacompletelyfunctionalArchsystem whichwillactasasuitablebaseforyoutobuilduponbasedon yourneeds.However,mostpeopleareinterestedinadesktop system,completewithsoundandgraphics.Thispartoftheguide willgiveaquickrundowntogettingtheseextrasworking.


Sound

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

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

Next,youshouldinstalladriverforyourgraphicscard. Youwillneedknowledgeofwhichvideochipsetyourmachine has.Ifyoudonotknow,usethe / u s r / s b i n / l s p c iprogram:


$l s p c i

Note:Thevesadriveristhemostgeneric,andshouldworkwith almostanymodernvideochipset.Ifyoucannotfindasuitable driverforyourvideochipset,vesashouldworkwithanyvideo card,butitoffersonlyslow2D. Foracompletelistofallopensourcevideodrivers,searchthe packagedatabase:


$p a c m a nS sx f 8 6 v i d e o|l e s s

Note:ProprietarydriversforNVIDIAandATIarecoveredinthe nextsections.Ifyouplanondoingheavy3Dprocessingsuchas gaming,considerusingthese. Usepacmantoinstalltheappropriatevideodriverforyourvideo card/onboardvideo.ExamplefortheSavagedriver:


#p a c m a nSx f 8 6 v i d e o s a v a g e

Tip:ForsomeIntelgraphicscards,configurationmaybe necessarytogetproper2Dor3Dperformance,seeIntelformore information.


NVIDIAGraphicsCards

www.readability.com/articles/3wuojrwx

75/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

Beginners' Guide wiki.archlinux.org Readability

I d e n t i f i e r" n " D r i v e r" n o u v e a u " E n d S e c t i o n

Thisisrequiredtoensurethatnouveaudriverisloaded.Xorg doesnotyetautoloadnouveau. Tip:Foradvancedinstructions,seeNouveau.


ATIGraphicsCards

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

Beginners' Guide wiki.archlinux.org Readability

Installinputdrivers

Udevshouldbecapableofdetectingyourhardwarewithout problemsandevdev(xf86inputevdev)isthemodern, hotplugginginputdriverforalmostalldevicessoinmostcases, installinginputdriversisnotneeded.Atthispoint,evdevhas alreadybeeninstalledasadependencyofXorg. Ifevdevdoesnotsupportyourdevice,installtheneededdriver fromthexorginputdriversgroup. Foracompletelistofavailableinputdrivers,invokeapacman search:


#p a c m a nS sx f 8 6 i n p u t|l e s s

Note:Youonlyneedxf86inputkeyboardorxf86inputmouseif youplanondisablinghotplugging,otherwise,evdevwillactas theinputdriver. Laptopusers(oruserswithatouchscreen)willalsoneedthe synapticspackagetoallowXtoconfigurethe touchpad/touchscreen:


#p a c m a nSx f 8 6 i n p u t s y n a p t i c s

Tip:Forinstructionsonfinetuningortroubleshootingtouchpad settings,seetheTouchpadSynapticsarticle.
ConfigureX(Optional)

www.readability.com/articles/3wuojrwx

78/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

Warning:Proprietarydriversusuallyrequirearebootafter installationalongwithconfiguration.SeeNVIDIAorATI Catalystfordetails. XServerfeaturesautoconfigurationandthereforecanfunction withoutanxorg.conf.IfyoustillwishtomanuallyconfigureX Server,pleaseseetheXorgwikipage.


NonUSkeyboard

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

Note:TheXkbLayoutkeymaydifferfromthekeymapcodeyou usedwiththekmorloadkeyscommand.Forinstance,theuk layoutcorrespondstothekey:gb.


TestingX

Thissectionwillexplainhowtostarttheverybasicgraphical environmentincludedwithinthexorggroupinordertotestit. ThisusesthesimpledefaultXwindowmanager,twm.

www.readability.com/articles/3wuojrwx

79/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

ThedefaultXenvironmentisratherbare.Thissectionbelowwill dealwithinstallingadesktopenvironmentorwindowmanagerof yourchoicetosupplementX. IfyouinstalledXorgbeforecreatingyourregularuser,therewill beanempty.xinitrcfileinyour$HOMEthatyouneedtoeither deleteoreditinorderforXtostartproperly.Ifyoudonotdothis Xwillshowablankscreenwithwhatappearstobenoerrorsin yourXorg.0.log.Simplydeletingitwillgetitrunningwitha defaultXenvironment.


$r m~ / . x i n i t r c
Messagebus

Note:d b u s islikelyrequiredformanyofyourapplicationsto workproperly,ifyouknowyoudon'tneedit,skipthissection. Installdbus:


#p a c m a nSd b u s

Tostartautomaticallyonboot,youshouldaddd b u s toyour DAEMONSarrayin/etc/rc.conf:


D A E M O N S = ( s y s l o g n gd b u sn e t w o r kc r o n d )

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

Beginners' Guide wiki.archlinux.org Readability

Note:TheCtrlAltBackspaceshortcuttraditionallyusedtokillX hasbeendeprecatedandwillnotworktoexitoutofthistest.You canenableCtrlAltBackspacebyeditingxorg.conf,asdescribed here. Finally,startXorg:


$s t a r t x $x i n i t-/ u s r / b i n / Xn o l i s t e nt c p

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

Beginners' Guide wiki.archlinux.org Readability

Ifaproblemoccurs,thenlookforerrorsin/var/log/Xorg.0.log. Beonthelookoutforanylinesbeginningwith(EE)which representerrors,andalso(WW)whicharewarningsthatcould indicateotherissues.


$g r e pE E/ v a r / l o g / X o r g . 0 . l o g

Errorsmayalsobesearchedforintheconsoleoutputofthe virtualconsolefromwhichXwasstarted. SeetheXorgarticlefordetailedinstructionsandtroubleshooting.


NeedHelp?

IfyouarestillhavingtroubleafterconsultingtheXorgarticleand needassistanceviatheArchforums,besuretoinstallanduse wgetpaste:


#p a c m a nSw g e t p a s t e

Usewgetpasteandprovidelinksforthefollowingfileswhen askingforhelpinyourforumpost: ~/.xinitrc /etc/X11/xorg.conf /var/log/Xorg.0.log /var/log/Xorg.0.log.old Usewgetpastelikeso:


$w g e t p a s t e< / p a t h / t o / f i l e >

www.readability.com/articles/3wuojrwx

82/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

Postthecorrespondinglinksgivenwithinyourforumpost.Be suretoprovideappropriatehardwareanddriverinformationas well. Warning:Itisveryimportanttoprovidedetailwhen troubleshootingX.Pleaseprovideallpertinentinformationas detailedabovewhenaskingforassistanceontheArchforums.


InstallFonts

Atthispoint,youmaywishtosavetimebyinstallingvisually pleasing,truetypefonts,beforeinstallingadesktop environment/windowmanager.DejaVuisasetofhighquality, generalpurposefonts. Installwith:


#p a c m a nSt t f d e j a v u

RefertoFontConfigurationforhowtoconfigurefontrendering andFontsforfontsuggestionsandinstallationinstructions.
Chooseandinstallagraphicalinterface

TheXWindowSystemprovidesthebasicframeworkfor buildingagraphicaluserinterface(GUI). Note:ChoosingyourDEorWMisaverysubjectiveand personaldecision.Choosethebestenvironmentforyourneeds. WindowManager(WM)

www.readability.com/articles/3wuojrwx

83/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

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

YoumightprefertostartXmanuallyfromyourterminalrather thanbootingstraightintothedesktop.ForDEspecific commands,pleaseseethewikipagecorrospondingtoyourDE formoreinformation.FormoregenericXcommands,pleasesee thesectionontheXorgpage.


Automatically

www.readability.com/articles/3wuojrwx

84/85

4/23/13

Beginners' Guide wiki.archlinux.org Readability

Youmightprefertohavethedesktopstartautomaticallyduring bootinsteadofstartingXmanually.SeeDisplayManagerfor instructionsonusingaloginmanagerorStartXatBootfortwo lightweightmethodsthatdon'trelyonadisplaymanager.

Appendix
ForalistofCommonApplicationsandLightweightApplications, visittheirrespectivearticles. SeeGeneralRecommendationsforpostinstallationtutorialslike settingupCPUfrequencyscalingorfontrendering.

Original URL: https://wiki.archlinux.org/index.php/Beginners'_Guide

www.readability.com/articles/3wuojrwx

85/85

You might also like