Slackware Linux Essentials

  • View
    196

  • Download
    6

Embed Size (px)

Text of Slackware Linux Essentials

SlackwareLinuxEssentials

AlanHicks ChrisLumens DavidCantrell LoganJohnsonCopyright1998,1999,2000,2001,2002,2003,2004,2005SlackwareLinux,Inc.SLACKWARE LINUXISA REGISTERED TRADEMARK OFPATRICK VOLKERDING AND SLACKWARE LINUX,INC. LINUXISA REGISTERED TRADEMARK OFLINUSTORVALDS. A MERICA ONLINE AND AOLARE REGISTERED TRADEMARKSOFA MERICA ONLINE ,INC.IN THE UNITED STATESAND /OROTHER COUNTRIES. A P P LE ,FIRE W IRE ,M AC,M ACINTOSH ,M ACOS,QUICKTIME ,AND TRUE TYP E ARE TRADEMARKSOFA P P LE COMP UTER,INC., REGISTERED IN THE UNITED STATESAND OTHERCOUNTRIES. IBM,AIX,ETHERJET,NETFINITY ,OS/2,POWERPC,PS/2,S/390,AND THINK PAD ARE TRADEMARKSOFINTERNATIONAL BUSINESSM ACHINESCORP ORATION IN THE UNITED STATES,OTHERCOUNTRIES,ORBOTH . IEEE,POSIX,AND 802ARE REGISTERED TRADEMARKSOFINSTITUTE OFELECTRICAL AND ELECTRONICSENGINEERS,INC.IN THE UNITED STATES. INTEL ,CELERON ,ETHEREXP RESS,I386,I486,ITANIUM,PENTIUM,AND XEON ARE TRADEMARKSORREGISTERED TRADEMARKSOF INTEL CORP ORATION ORITSSUBSIDIARIESIN THE UNITED STATESAND OTHERCOUNTRIES. M ICROSOFT,INTELLIM OUSE ,MSDOS,OUTLOOK ,W INDOWS,W INDOWSM EDIA AND W INDOWSNTARE EITHERREGISTERED TRADEMARKSORTRADEMARKSOFM ICROSOFTCORP ORATION IN THE UNITED STATESAND / OROTHERCOUNTRIES. NETSCAP E AND THE NETSCAP E NAVIGATORARE REGISTERED TRADEMARKSOFNETSCAP E COMMUNICATIONSCORP ORATION IN THE U.S.AND OTHERCOUNTRIES. RED HAT,RPM,ARE TRADEMARKSORREGISTERED TRADEMARKSOFRED HAT,INC.IN THE UNITED STATESAND OTHER COUNTRIES. XFREE 86ISA TRADEMARK OFTHE XFREE 86PROJECT,INC. M ANY OFTHE DESIGNATIONSUSED BY MANUFACTURERSAND SELLERSTO DISTINGUISH THEIRP RODUCTSARE CLAIMED AS TRADEMARKS.W HERE THOSE DESIGNATIONSAP P EARIN THISDOCUMENT,AND SLACKWARE LINUX,INC.WASAWARE OFTHE TRADEMARK CLAIM,THE DESIGNATIONSHAVE BEEN FOLLOWED BY THE ORTHE SYMBOL .

1571763384 [SplitHTML/SingleHTML] TableofContents

Preface 1AnIntroductiontoSlackwareLinux 1.1WhatisLinux? 1.1.1AWordonGNU 1.2WhatisSlackware? 1.3OpenSourceandFreeSoftware 2Help 2.1SystemHelp 2.1.1man 2.1.2The/usr/docDirectory 2.1.3HOWTOsandminiHOWTOs 2.2OnlineHelp 2.2.1TheOfficialWebsiteandHelpForums 2.2.2EmailSupport 2.2.3NonOfficialWebsitesandHelpForums 3Installation 3.1GettingSlackware 3.1.1TheOfficialDiscandBoxSets 3.1.2ViatheInternet 3.2SystemRequirements 3.2.1TheSoftwareSeries 3.2.2InstallationMethods 3.2.3BootDisk 3.2.4RootDisk 3.2.5SupplementalDisk 3.2.6MakingtheDisks 3.3Partitioning 3.4ThesetupProgram 3.4.1HELP 3.4.2KEYMAP 3.4.3ADDSWAP 3.4.4TARGET 3.4.5SOURCE 3.4.6SELECT 3.4.7INSTALL 3.4.8CONFIGURE 4SystemConfiguration 4.1SystemOverview 4.1.1FileSystemLayout 4.1.2FindingFiles

4.1.3The/etc/rc.dDirectory 4.2SelectingaKernel 4.2.1The/kernelsDirectoryontheSlackwareCDROM 4.2.2CompilingaKernelfromSource 4.2.3UsingKernelModules 5NetworkConfiguration 5.1Introduction:netconfigisyourfriend. 5.2NetworkHardwareConfiguration 5.2.1LoadingNetworkModules 5.2.2LAN(10/100/1000BaseTandBase2)cards 5.2.3Modems 5.2.4PCMCIA 5.3TCP/IPConfiguration 5.3.1DHCP 5.3.2StaticIP 5.3.3/etc/rc.d/rc.inet1.conf 5.3.4/etc/resolv.conf 5.3.5/etc/hosts 5.4PPP 5.4.1pppsetup 5.4.2/etc/ppp 5.5Wireless 5.5.1HardwareSupport 5.5.2ConfiguretheWirelessSettings 5.5.3ConfiguretheNetwork 5.6NetworkFileSystems 5.6.1SMB/Samba/CIFS 5.6.2NetworkFileSystem(NFS) 6XConfiguration 6.1xorgconfig 6.2xorgsetup 6.3xinitrc 6.4xwmconfig 6.5xdm 7Booting 7.1LILO 7.2LOADLIN 7.3DualBooting 7.3.1Windows 7.3.2Linux

8TheShell 8.1Users 8.1.1LoggingIn 8.1.2Root:TheSuperuser 8.2TheCommandLine 8.2.1RunningPrograms 8.2.2WildcardMatching 8.2.3Input/OutputRedirectionandPiping 8.3TheBourneAgainShell(bash) 8.3.1EnvironmentVariables 8.3.2TabCompletion 8.4VirtualTerminals 8.4.1Screen 9FilesystemStructure 9.1Ownership 9.2Permissions 9.3Links 9.4MountingDevices 9.4.1fstab 9.4.2mountandumount 9.5NFSMounts 10HandlingFilesandDirectories 10.1Navigation:ls,cd,andpwd 10.1.1ls 10.1.2cd 10.1.3pwd 10.2Pagers:more,less,andmost 10.2.1more 10.2.2less 10.2.3most 10.3SimpleOutput:catandecho 10.3.1cat 10.3.2echo 10.4Creation:touchandmkdir 10.4.1touch 10.4.2mkdir 10.5CopyandMove

10.5.1cp 10.5.2mv 10.6Deletion:rmandrmdir 10.6.1rm 10.6.2rmdir 10.7Aliasingfileswithln 11ProcessControl 11.1Backgrounding 11.2Foregrounding 11.3ps 11.4kill 11.5top 12EssentialSystemAdministration 12.1UsersandGroups 12.1.1SuppliedScripts 12.1.2ChangingPasswords 12.1.3ChangingUserInformation 12.2UsersandGroups,theHardWay 12.3ShuttingDownProperly 13BasicNetworkCommands 13.1ping 13.2traceroute 13.3DNSTools 13.3.1host 13.3.2nslookup 13.3.3dig 13.4finger 13.5telnet 13.5.1Theotheruseoftelnet 13.6TheSecureshell 13.7email 13.7.1pine 13.7.2elm 13.7.3mutt 13.7.4nail 13.8Browsers 13.8.1lynx 13.8.2links 13.8.3wget 13.9FTPClients

13.9.1ftp 13.9.2ncftp 13.10TalkingtoOtherPeople 13.10.1wall 13.10.2talk 13.10.3ytalk 14Security 14.1DisablingServices 14.1.1Servicesstartedfrominetd 14.1.2Servicesstartedfrominitscripts 14.2HostAccessControl 14.2.1iptables 14.2.2tcpwrappers 14.3KeepingCurrent 14.3.1slackwaresecuritymailinglist 14.3.2The/patchesdirectory 15ArchiveFiles 15.1gzip 15.2bzip2 15.3tar 15.4zip 16Vi 16.1Startingvi 16.2Modes 16.2.1CommandMode 16.2.2InsertMode 16.3OpeningFiles 16.4SavingFiles 16.5Quittingvi 16.6viConfiguration 16.7ViKeys 17Emacs 17.1Startingemacs 17.1.1CommandKeys 17.2Buffers 17.3Modes 17.3.1Openingfiles 17.4BasicEditing

17.5SavingFiles 17.5.1QuittingEmacs 18SlackwarePackageManagement 18.1OverviewofPackageFormat 18.2PackageUtilities 18.2.1pkgtool 18.2.2installpkg 18.2.3removepkg 18.2.4upgradepkg 18.2.5rpm2tgz/rpm2targz 18.3MakingPackages 18.3.1explodepkg 18.3.2makepkg 18.3.3SlackBuildScripts 18.4MakingTagsandTagfiles(forsetup) 19ZipSlack 19.1WhatisZipSlack? 19.1.1Advantages 19.1.2Disadvantages 19.2GettingZipSlack 19.2.1Installation 19.3BootingZipSlack Glossary A.TheGNUGeneralPublicLicense A.1.Preamble A.2.TERMSANDCONDITIONS A.3.HowtoApplyTheseTermstoYourNewPrograms ListofTables 21.ManPageSections 31.SlackwareLinux,Inc.ContactInformation 32.SystemRequirements 33.SoftwareSeries 91.OctalPermissionValues 131.ftpcommands 161.Movement 162.Editing 163.Searching 164.SavingandQuitting 171.BasicEmacsEditingCommands 181.installpkgOptions 182.removepkgOptions

183.TagfileStatusOptions ListofFigures 41.KernelConfigurationMenu 61.xorgconfigMouseConfiguration 62.xorgconfigHorizontalSync 63.xorgconfigVerticalSync 64.xorgconfigVideoCard 65.DesktopConfigurationwithxorgconfig 71.liloconfig 72.liloconfigExpertMenu 111.Basicpsoutput 131.Telnettingtoawebserver 132.ThePinemainmenu 133.Elmmainscreen 134.Muttmainscreen 135.Lynxdefaultstartpage 136.Links,withthefilemenuopen 137.Twousersinatalksession 138.Twousersinaytalksession 161.Avisession. 181.Pkgtool'smainmenu. 182.Pkgtoolviewmode ListofExamples 81.ListingEnvironmentVariableswithset

PrefaceIntendedAudienceTheSlackwareLinuxoperatingsystemisapowerfulplatformforIntelbasedcomputers.Itisdesigned tobestable,secure,andfunctionalasbothahighendserverandpowerfulworkstation. ThisbookisdesignedtogetyoustartedwiththeSlackwareLinuxoperatingsystem.It'snotmeantto covereverysingleaspectofthedistribution,butrathertoshowwhatitiscapableofandgiveyoua basicworkingknowledgeofthesystem. AsyougainexperiencewithSlackwareLinux,wehopeyoufindthisbooktobeahandyreference.We alsohopeyou'lllendittoallofyourfriendswhentheycomeaskingaboutthatcoolSlackwareLinux operatingsystemyou'rerunning. Whilethisbookmaynotanedgeofyourseatnovel,wecertainlytriedtomakeitasentertainingas possible.Withanyluck,we'llgetamoviedeal.Ofcourse,wealsohopeyouareabletolearnfromit andfindituseful. Andnow,onwiththeshow.

ChangesfromtheFirstEdition

Thissecondeditionistheculminationofyearsofhardworkbythededicatedmembersofthe SlackwareDocumentationProject.Thefollowingarethemajorchangesinthisnewedition: Chapter3,Installation,hasbeenmodifiedwithnewscreenshotsoftheinstaller,andreflects changesindisksets,andCDinstallation. Chapter4,SystemConfiguration,hasbeenupdatedwithnewinformationaboutLinux2.6.x kernels. Chapter5,NetworkConfiguration,hasbeenexpandedwithfurtherexplanationofSamba, NFS,andDHCP.Asectiononwirelessnetworkinghasalsobeenadded.Thischapternow reflectsmajorchangesinhowSlackwarehandlesnetworksetup. Chapter6,XWindowSystem,hasbeensubstantiallyrewrittenforXorgbasedsystems. Thischapternowalsocoversthexdmgraphicalloginmanager. Chapter13,BasicNetworkCommands,hasbeenenhancedwithinformationabout additionalnetworkutilities. Chapter14,Security,isanewchapterwiththisedition.Itexplainshowtokeepa SlackwareLinuxsystemsecure. Chapter17,Emacs,isanewchapterwiththisedition.ItdescribeshowtouseEmacs,a powerfuleditorforUnix. Chapter18,PackageManagement,hasbeenupdatedwithinformationaboutSlackBuild scripts. Therearemanyotherchanges,bothminorandmajor,toreflectchangesinSlackwareasit hasmatured.

OrganizationofthisBookChapter1,Introduction ProvidesintroductorymaterialonLinux,Slackware,andtheOpenSourceandFreeSoftware Movements. Chapter2,Help DescribesthehelpresourcesavailableonaSlackwareLinuxsystemandonline. Chapter3,Installation Describestheinstallationprocessstepbystepwithscreenshotstoprovideanillustrativewalk through. Chapter4,SystemConfiguration Describestheimportantconfigurationfilesandcoverskernelrecompilation. Chapter5,NetworkConfiguration DescribeshowtoconnectaSlackwareLinuxmachinetoanetwork.CoversTCP/IP,PPP/dial

up,wirelessnetworking,andmore. Chapter6,TheXWindowSystem DescribeshowtosetupandusethegraphicalXWindowSysteminSlackware. Chapter7,Booting DescribestheprocessbywhichacomputerbootsintoSlackwareLinux.Alsocoversdual bootingwithMicrosoftWindowsoperatingsystems. Chapter8,TheShell DescribesthepowerfulcommandlineinterfaceforLinux. Chapter9,FilesystemStructure Describesthefilesystemstructure,includingfileownership,permission,andlinking. Chapter10,HandlingFilesandDirectories Describesthecommandsusedtomanipulatefilesanddirectoriesfromthecommandline interface. Chapter11,ProcessControl DescribesthepowerfulLinuxprocessmanagementcommandsusedtomanagemultiplerunning applications. Chapter12,EssentialSystemAdministration Describesbasicsystemad