Table of Contents ***************** 1 Preface 1.0.0.1 Everything you ever wanted to know about Arch, but were afraid to ask 1.0.0.2 DON'T PANIC! 1.0.0.3 The Arch Way 2 Part I: Install the Base System 2.1 Start the Installation 2.1.1 Select an installation source 2.2 Configure Network (FTP/HTTP) 2.2.1 Wireless Quickstart (If you need wireless connectivity during the installation process) 2.3 Prepare Hard Drive 2.3.1 Partition Hard Drives 2.3.1.1 Partition Info 2.3.1.2 Swap Partition 2.3.1.3 Partition Scheme 2.3.1.4 How big should my partitions be? 2.3.1.5 cfdisk 2.3.2 Set Filesystem Mountpoints 2.3.2.1 Filesystem Types 2.3.2.2 A note on Journaling 2.4 Select Packages 2.5 Install Packages 2.6 Configure the System 2.6.0.1 Can the installer handle this more automatically? 2.6.0.2 */etc/rc.conf* 2.6.0.3 About DAEMONS 2.6.0.4 /etc/fstab 2.6.0.5 * /etc/mkinitcpio.conf* 2.6.0.6 /etc/modprobe.conf 2.6.0.7 /etc/resolv.conf (for Static IP) 2.6.0.8 /etc/hosts 2.6.0.9 /etc/hosts.deny and /etc/hosts.allow 2.6.0.10 /etc/locale.gen 2.6.0.11 Root password 2.6.0.12 Pacman-Mirror 2.7 Install Bootloader 2.7.1 GRUB 2.8 Reboot 2.9 Configuring the network (if necessary) 2.9.1 Wired LAN 2.9.2 Wireless LAN 2.9.3 Analog Modem 2.9.4 ISDN 2.9.5 DSL (PPPoE) 2.10 Update, Sync and Upgrade the system with pacman 2.10.1 What is pacman ? 2.10.2 Configuring pacman 2.10.2.1 Package Repositories and /etc/pacman.conf 2.10.2.2 /etc/pacman.d/mirrorlist 2.10.2.3 Ignoring packages 2.10.2.4 Ignoring Configuration Files 2.11 Update System 2.11.0.1 The beauty of the Arch rolling release model 2.11.1 Get familiar with pacman 2.12 Add a user and setup groups 2.13 Install and setup Sudo (Optional) 3 Part II: Install X and configure ALSA 3.1 Configure the audio card with alsamixer 3.1.1 Sound Test 3.2 Installing and configuring X 3.3 Create /etc/X11/xorg.conf 3.3.0.1 What is /etc/X11/xorg.conf? 3.3.1 Alternative xorg.conf generation 3.4 Using proprietary Graphics Driver (NVIDIA, ATI) 3.4.1 NVIDIA Graphic Cards 3.4.2 ATI Graphic Cards 3.5 Simple baseline X test 3.5.0.1 ~/.xinitrc 4 Part III: Installing and configuring a Desktop Environment 4.1 Install Fonts 4.2 ~/.xinitrc (again) 4.3 GNOME 4.3.1 About GNOME 4.3.2 Installation 4.3.3 Useful DAEMONS for GNOME 4.3.4 Eye Candy 4.4 KDE 4.4.1 About KDE 4.4.2 Installation 4.4.3 Useful KDE DAEMONS 4.5 Xfce 4.5.1 About Xfce 4.5.2 Installation 4.5.3 Useful DAEMONS 4.6 LXDE 4.6.1 About LXDE 4.7 *box 4.7.1 Fluxbox 4.7.2 Openbox 4.8 fvwm2 5 Browser and Video Player 5.1 Web Browser 5.2 VLC 6 An Introduction to ABS 7 An Introduction to The AUR 7.1 Install an AUR Helper 8 File and directory explanation 9 Arch Boot Process 9.1 Boot Script Overview 9.2 agetty and login 10 Maintaining the system 10.1 su 10.2 Pacman 10.2.1 Useful commands 10.2.2 Files 11 Tweaks/Finishing touches 11.1 HAL 11.2 Backgrounding DAEMONS on startup 11.3 Beautifying Fonts for LCD's 11.4 Adjusting Mouse for scroll wheel 11.5 Get All Mouse Buttons Working 11.6 Configuring Touchpad for Laptops 11.7 Adjusting Keyboard Layout 11.8 Additional tweaks for laptops 11.9 Configuring CPU frequency scaling 11.10 Pm-Utils 11.11 Laptop-Mode 12 Polishing & Further information 12.0.0.1 FAQs 1 Preface ********* 1.0.0.1 Everything you ever wanted to know about Arch, but were afraid to ask ............................................................................. Welcome. This self-contained document will guide you through the process of installing, configuring and using Arch Linux; a simple, agile and lightweight GNU/Linux distribution, UNIX-like operating system. Arch Linux requires a certain level of intimate knowledge of its configuration and of UNIX-like system methodology and for this reason, extra explanatory information is included. This guide is aimed at new Arch users, but strives to serve as a strong reference and informative base for all. After reading it entirely, the reader will be well equipped to begin using Arch. *Arch Linux distribution highlights:* * * Simple* design and philosophy * System assembled by the user from the ground up * All packages compiled for *i686/x86-64* * * BSD-style init* scripts, including one centralized configuration file * *Rolling Release* model * *Pacman* package manager is written in *C*, lightweight and agile, with a very modest memory footprint * *ABS*: The *A*rch *B*uild *S*ystem, a ports-like packaging system * *AUR*: The Arch User Repository, offering many thousands of build scripts for user-provided software packages Since GNU/Linux Distributions are fundamentally 'modular' by design, the guide is logically divided into 3 main components of a desktop UNIX-like operating system: *Part I: Installing the Base system* *Part II: Installing X and configuring ALSA* *Part III: Installing a Desktop Environment* 1.0.0.2 DON'T PANIC! .................... The Arch Linux system is assembled by the _user_, from the shell, using basic command line tools. This is *The Arch Way.* Unlike the more rigid structures of other distributions and installers, there are no default environments nor configurations chosen for you. From the command line, _you_ will add packages from the Arch repositories using the pacman tool via your internet connection and manually configure your installation until your system is customized to your requirements. This method allows for maximum flexibility, choice, and system resource control _from the base up_. Arch Linux is aimed at GNU/Linux users who desire minimal 'code separation' from their machine. 1.0.0.3 The Arch Way .................... *"The design principles behind Arch are aimed at keeping it simple." * 'Simple', in this context, shall mean 'without unnecessary additions, modifications, or complications'. In short; an elegant, minimalist approach. *Some thoughts to keep in mind:* * _" 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior]." -Aaron Griffin_ * _Entia non sunt multiplicanda praeter necessitatem_ or "Entities should not be multiplied unnecessarily." -Occam's razor. The term _razor_ refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory. * _"The extraordinary part of [my method] lies in its simplicity..I always believe that the simple way is the right way."_ - Bruce Lee *Following this guide closely is essential in order to successfully install a properly configured Arch Linux system, so "please" read it thoroughly. It is strongly recommended you read each section completely before carrying out the tasks contained.* * You may wish to make a print out of this guide which will serve as a useful Arch Linux user reference. Simply click on the 'Printable Version' tab in the toolbox on the top-left. * _If you would like to add to this wiki, please include the "Why" as well as the "How", where appropriate. The best documentation teaches us how, as well as why!_ * The Arch wiki is an excellent resource and should be consulted for issues first (http://wiki.archlinux.org/index.php/Main_Page); IRC (freenode #archlinux), and the forums (http://bbs.archlinux.org/) are also available if the answer cannot be found. ------------------------------------------------------------------------------- Welcome to Arch! Now, let's get started. 2 Part I: Install the Base System ********************************* 2.1 Start the Installation ========================== As root, run the installer script from vc/1: # /arch/setup 2.1.1 Select an installation source ----------------------------------- After a welcome screen, you will be prompted for an installation source. Choose the appropriate source for the installer you are using. * If you chose the CORE installer, continue below with Prepare Hard Drive. * FTP/HTTP only: You shall be prompted to load ethernet drivers manually, if desired. Udev is quite effective at loading the required modules, so you may assume it has already done so. You may verify this by invoking ifconfig -a from vc/3. (Select OK to continue.) 2.2 Configure Network (FTP/HTTP) ================================ Available Interfaces will be presented. If an interface and HWaddr is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console. The following screen will prompt you to _Select the interface, Probe,_ or _Cancel_. Choose the appropriate interface and continue. The installer will then ask if you wish to use DHCP. Choosing Yes will run *dhcpcd* to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct. 2.2.1 Wireless Quickstart (If you need wireless connectivity during the installation process) --------------------------------------------------------------------------------------------- The wireless drivers and utilities are now available to you in the live environment of the installation media. If you need wireless functionality from the initial installation (live installer environment) onwards, the basic procedure will be: * Switch to a free virtual console, e.g.: +F3 * Identify your wireless card and appropriate module with /sbin/hwdetect: # hwdetect --show-net * Ensure udev has loaded the module with /bin/lsmod: # lsmod | grep * If not, probe it using /sbin/modprobe: # modprobe *"In addition to the wireless module, some wireless chipsets also require corresponding firmware installation. The firmware packages are pre-installed in the live environment, but must be explicitly installed to your actual system to provide wireless functionality after you reboot into your installed system. Package selection and installation is covered below. Ensure installation of both your wireless module and firmware during the package selection step! See Wireless Setup if you are unsure about the requirement of corresponding firmware installation for your particular chipset. This is a very common error.*" * Ensure the driver has created a usable wireless kernel interface with /usr/sbin/iwconfig: # iwconfig (Output should show an available wireless interface) * Bring the interface up with /sbin/ifconfig up. An example, using an atheros card and madwifi driver: # ifconfig ath0 up (Remember, your interface may be named something else, depending on your module (driver) and chipset: wlan0, eth1, etc.) * Specify the id of the wireless network with iwconfig essid key , e.g.: # iwconfig ath0 essid linksys key 0241baf34c * Acquire an IP address with /sbin/dhcpcd . e.g.: # dhcpcd ath0 * Ensure you can route using /bin/ping: # ping -c 3 www.google.com Done. After the initial Arch installation is complete, you may wish to refer to Wireless Setup to ensure a permanent configuration solution for your system. Return to vc/1 with +F1. Continue with Prepare Hard Drive 2.3 Prepare Hard Drive ====================== *WARNING:* *"Partitioning hard drives can destroy data. You are strongly cautioned and advised to backup your critical data if applicable.*" Select the first menu entry "Prepare Hard Drive". * Option 1: Auto Prepare Auto-Prepare divides your disk into the following configuration: * ext2 /boot partition, default size 32MB. _You will be prompted to modify the size to you requirement._ * swap partition, default size 256MB. _You will be prompted to modify the size to you requirement._ * A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but note that _both / and /home must share the same fs type_ if choosing the Auto Prepare option. Be warned that Auto-prepare will completely erase the chosen hard drive. Read the warning presented by the installer very carefully, and make sure the correct device is about to be partitioned. * Option 2: *(Recommended)* Partition Hard Drives (with cfdisk) This option will allow for the most robust and customized partitioning solution for your personal needs. _At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to _'Select Packages_' below._ 2.3.1 Partition Hard Drives --------------------------- 2.3.1.1 Partition Info ...................... Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted). There exist 3 types of disk partitions: 1. Primary 2. Extended 3. Logical *Primary* partitions can be bootable, and are limited to 4. If a partitioning scheme requires more than 4 partitions, we are forced to use an *extended* partition which will contain *logical* partitions. Extended partitions are not usable by themselves; they are merely a "container" for logical partitions. If required, a hard disk shall contain only one extended partition; which shall then be sub-divided into logical partitions. When partitioning a disk, one can observe this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on. 2.3.1.2 Swap Partition ...................... A swap partition is a place on your hard drive where virtual ram resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM. Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually quite sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forgo a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example. If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least *equal* in size to the amount of physical RAM, and some Arch users even recommend oversizing it beyond the amount of physical RAM by 10-15%, to allow for possible bad sectors. 2.3.1.3 Partition Scheme ........................ A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. Filesystem candidates for separate partitions include: */* (root) _The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory "/", even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system._ */boot* _This directory contains the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files._ */home* _User data and user specific configuration files for applications are stored in each user's home directory in a file that starts with the '.' character (a "dot file")._ */usr* _While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system update/upgrade. Any information that is host-specific or varies with time is stored elsewhere._ */tmp* _directory for programs that require temporary files_ */var* _contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc._ Besides /boot, directories essential for booting are: '/bin', '/dev', '/etc', '/lib', '/proc' and '/sbin'. Therefore, they must not reside on a separate partition from /. There are several advantages for using discrete filesystems, rather than combining all into one partition: * Security: Each filesystem may be configured as 'nosuid', 'nodev', 'noexec', 'readonly', etc. (This is specified in /etc/fstab). * Stability: A user, or malfunctioning program can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem remain unaffected. * Speed: A filesystem which gets written to frequently may become somewhat fragmented. (An effective method of avoiding fragmentation is to ensure that each filesystem is never in danger of filling up completely.) Separate filesystems remain unaffected, and each can be defragmented separately as well. * Integrity: If one filesystem becomes corrupted, separate filesystems remain unaffected. * Versatility: Sharing data across several systems becomes more expedient when independent filesystems are used. Separate filesystem types may also be chosen based upon the nature of data and usage. In this example, we shall use separate partitions for /, /var, /home, and a swap partition. /var contains many small files. You may wish to take this into consideration when choosing a filesystem type for it. 2.3.1.4 How big should my partitions be? ........................................ This question is best answered based upon individual needs. If you have little or no experience with partitioning, you may wish to simply create one partition for root, and one partition for swap. Or, follow the example closely, and consider these guidelines to provide a frame of reference: * The root filesystem (/) in the example will contain the /usr directory, which can become moderately large, depending upon how much software is installed. * The /var filesystem will contain, among other data, the ABS tree and the pacman cache. Keeping cached packages is useful and versatile; it provides the ability to downgrade packages if needed. /var tends to grow in size; the pacman cache can grow large over long periods of time, but can be safely cleared if needed. 6-8 Gigs on a desktop system should therefore be sufficient for /var. Servers tend to have extremely large /var filesystems. * The /home filesystem is typically where user data, downloads, and multimedia reside. On a desktop system, /home is typically the largest filesystem on the drive by a large margin. * An extra 25% of space added to each filesystem will provide a cushion for unforeseen occurrence, expansion, and serve as a preventive against fragmentation. From the guidelines above, the example system shall contain a ~15GB root (/) partition, ~6GB /var, 1GB swap, and a /home containing the remaining disk space. 2.3.1.5 cfdisk .............. Start by creating the primary partition that will contain the *root*, (/) filesystem. Choose *N*ew -> Primary and enter the desired size for root (/). Put the partition at the beginning of the disk. Also choose the *T*ype by designating it as '83 Linux'. The created / partition shall appear as sda1 in our example. Now create a primary partition for /var, designating it as *T*ype 83 Linux. The created /var partition shall appear as sda2 Next, create a partition for swap. Select an appropriate size and specify the *T*ype as 82 (Linux swap / Solaris). The created swap partition shall appear as sda3. Lastly, create a partition for your /home directory. Choose another primary partition and set the desired size. Likewise, select the *T*ype as 83 Linux. The created /home partition shall appear as sda4. Example: Name Flags Part Type FS Type [Label] Size (MB) ------------------------------------------------------------------------- sda1 Primary Linux 15440 #root sda2 Primary Linux 6256 #/var sda3 Primary Linux swap / Solaris 1024 #swap sda4 Primary Linux 140480 #/home Choose *W*rite and type *'yes*'. Beware that this operation may destroy data on your disk. Choose *Q*uit to leave the partitioner. Choose Done to leave this menu and continue with "Set Filesystem Mountpoints". Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd_x_ naming scheme. This is perfectly normal and should not be a concern. 2.3.2 Set Filesystem Mountpoints -------------------------------- First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). At this time, you will be asked to specify the filesystem type. 2.3.2.1 Filesystem Types ........................ Again, a filesystem type is a very subjective matter which comes down to personal preference. Each has its own advantages, disadvantages, and unique idiosyncrasies. Here is a very brief overview of supported filesystems: 1. *ext2* _Second Extended Filesystem_- Old, reliable GNU/Linux filesystem. Very stable, but _without journaling support_. May be inconvenient for root (/) and /home, due to very long fsck's. _An ext2 filesystem can easily be converted to ext3._ Generally regarded as a good choice for /boot/. 2. *ext3* _Third Extended Filesystem_- Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. _Extremely_ stable, mature, and by far the most widely used, supported and developed GNU/Linux FS. *High Performance Filesystems:* 3. *ReiserFS* - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput based on an unconventional and creative algorithm. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is fast at formatting, yet comparatively slow at mounting. Quite mature and stable. ReiserFS is not actively developed at this time (Reiser4 is the new Reiser filesystem). Generally regarded as a good choice for /var/. 4. *JFS* - IBM's *J*ournaled *F*ile*S*ystem- The first filesystem to offer journaling. JFS had many years of use in the IBM AIX® OS before being ported to Linux. JFS currently uses the least CPU resources of any GNU/Linux filesystem. Very fast at formatting, mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline I/O scheduler. (See JFS.) Not as widely supported as ext or ReiserFS, but very mature and stable. 5. *XFS* - Another early journaling filesystem originally developed by Silicon Graphics for the IRIX OS and ported to Linux. XFS offers very fast throughput on large files and large filesystems. Very fast at formatting and mounting. Generally benchmarked as slower with many small files, in comparison to other filesystems. XFS is very mature and is currently the only available stable Linux FS with online defragmentation ability. 2.3.2.2 A note on Journaling ............................ All above filesystems, except ext2, use journaling (http://en.wikipedia.org/wiki/Journaling_file_system). Journaling file systems are fault-resilient file systems that use a journal to log changes before they're committed to the file system to avoid metadata corruption in the event of a crash. Note that not all journaling techniques are alike; specifically, only ext3 offers _data-mode journaling_, (though, not by default), which journals _both_ data _and_ meta-data (but with significant speed penalty). The others only offer _ordered-mode journaling_, which journals meta-data only. While all will return your filesystem to a valid state after recovering from a crash, _data-mode journaling_ offers the greatest protection against file system corruption and data loss but can suffer from performance degradation, as all data is written twice (first to the journal, then to the disk). Depending on how important your data are, this may be a consideration in choosing your filesystem type. *"Moving on...*" Choose and create the filesystem (format the partition) for / by selecting *yes*. You will now be prompted to add any additional partitions. In our example, sda2 and sda4 remain. For sda2, choose a filesystem type and mount it as /var. Finally, choose the filesystem type for sda4, and mount it as /home. Return to main menu. 2.4 Select Packages =================== Now we shall select packages to install in our system. * Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one. * FTP ISO: Select an FTP/HTTP mirror. _Note that archlinux.org is throttled to 50KB/s_. Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories. * *BASE:* Contains the minimal package set; just enough for a barebones system. * *SUPPORT:* Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth. * *DEVEL:* Software compiling tools such as GCC, autoconf, automake and make. * *LIB:* Various libraries such as gmp, libelf, libevent, etc. Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now. The next screen will present you with the selected packages within your selected categories. Once you're done selecting the packages you need, leave the selection screen and continue to the next step, Install Packages. 2.5 Install Packages ==================== Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to downgrade to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. * FTP ISO: The Pacman package manager will now download and install your selected packages. (See vc/5 for output, vc/1 to return to the installer) * CORE ISO: The packages will be installed from the CD. Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (+F3, pacman -Sy pacman) and again 'Install Packages'. 2.6 Configure the System ======================== _Closely following and understanding these steps is of key importance to ensure a properly configured system._ At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. The installer will ask if you want to choose hwdetect to gather information for your configuration. Beginners should choose 'yes'. Advanced users who are thoroughly familiar with their hardware, required modules, and who are able and willing to manually configure /etc/rc.conf, /etc/mkinitcpio, /etc/fstab, and other system-critical configuration files from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.) Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. Now you will be asked which text editor you want to use; choose nano (http://en.wikipedia.org/wiki/Nano_%28text_editor%29) or, if you are familiar with it, vim (http://en.wikipedia.org/wiki/Vim_%28text_editor%29). You will be presented with a menu including the main configuration files for your system. _It is very important at this point to edit, or at the very least, to verify by opening, every configuration file._ The installer script relies on your input to create these files on your installation. A common error is to skip over these critical steps of configuration. 2.6.0.1 Can the installer handle this more automatically? ......................................................... Hiding the process of system configuration is in direct opposition to The Arch Way. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and auto-configuration, Arch presents the user all pertinent configuration files during installation for the purposes of _transparency and system resource control_. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use and maintain your new installation productively. 2.6.0.2 */etc/rc.conf* ...................... Arch Linux follows in the **BSD* tradition of utilizing */etc/rc.conf* as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced _by_ these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. * *LOCALIZATION* section - *LOCALE*=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. - *HARDWARECLOCK*=: Specifies whether the hardware clock, which is synchronized on boot and on shutdown, stores *UTC* time, or the *localtime*. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock. - *TIMEZONE*=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/). - *KEYMAP*=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or *X*. - *CONSOLEFONT*=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe. - *CONSOLEMAP*=: Defines the console map to load with the setfont program at boot. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. - *USECOLOR*=: Select "yes" if you have a color monitor and wish to have colors in your consoles. LOCALE="en_US.utf8" HARDWARECLOCK="localtime" TIMEZONE="US/Eastern" KEYMAP="us" CONSOLEFONT= CONSOLEMAP= USECOLOR="yes" * *HARDWARE* section - *MOD_AUTOLOAD*=: Setting this to "yes" will use *udev* to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. - *MOD_BLACKLIST*=: This has become deprecated in favor of adding blacklisted modules directly to the *MODULES=* line below. - *MODULES*=: Specify additional MODULES if you know that an important module is missing, (*hwdetect* should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. # Scan hardware and load required modules at boot MOD_AUTOLOAD="yes" # Module Blacklist - Deprecated MOD_BLACKLIST=() # MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr) * *NETWORKING* section - *HOSTNAME*=:Set your HOSTNAME to your liking. - *eth0*=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address _if_ you are using *static IP*. Set eth0="dhcp" if you want to use *DHCP* - *INTERFACES*=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell. - *gateway*=: If you are using *static IP*, set the gateway address. If using *DHCP*, you can usually ignore this variable, though some users have reported the need to define it. - *ROUTES*=: If you are using static *IP*, remove the *!* in front of 'gateway'. If using *DHCP*, you can usually leave this variable commented out with the bang (!), but again, some users require the gateway and ROUTES defined. If you experience networking issues with pacman, for instance, you may want to return to these variables. Example, using *DHCP*: HOSTNAME="arch" #eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" eth0="dhcp" INTERFACES=(eth0) gateway="default gw 192.168.0.1" ROUTES=(!gateway) Arch uses the *dhcpcd* DHCP client. Alternatively, *dhclient* is available from the [extra] repository via pacman. * *DAEMONS* section This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. DAEMONS=(@network syslog-ng netfs crond) * If a script name is prefixed with a bang (!), it is not executed. * If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot). * Edit this array whenever new system services are installed, if starting them automatically during boot is desired. This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory. 2.6.0.3 About DAEMONS ..................... You do not have to change the daemons line at this time, but it is useful to explain what daemons are, because we need them later in this guide. A _daemon_ is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide. Historically, the term _daemon_ was coined by the programmers of MIT's Project MAC. They took the name from _Maxwell's demon_, an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. UNIX systems inherited this terminology and created the backronym *d*isk *a*nd *e*xecution *mon*itor. *Tip: All Arch daemons reside under /etc/rc.d/* 2.6.0.4 /etc/fstab .................. The *fstab* (for *f*ile *s*ystems *tab*le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's filesystem. The */etc/fstab* file is most commonly used by the *mount* command. The mount command takes a filesystem on a device, and adds it to the main system heirarchy that you see when you use your system. *mount -a* is called from /etc/rc.sysinit, about 3/4 of the way through the boot process, and reads /etc/fstab to determine which options should be used when mounting the specified devices therein. If *noauto* is appended to a filesystem in /etc/fstab, *mount -a* will not mount it at boot. An example */etc/fstab*: # none /dev/pts devpts defaults 0 0 none /dev/shm tmpfs defaults 0 0 #/dev/cdrom /media/cdrom auto ro,user,noauto,unhide 0 0 #/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0 #/dev/fd0 /media/fl auto user,noauto 0 0 /dev/disk/by-uuid/0ec-933.. / jfs defaults,noatime,nodiratime 0 1 /dev/disk/by-uuid/7ef-223.. /home jfs defaults,noatime,nodiratime 0 2 /dev/disk/by-uuid/530-1e-.. swap swap defaults 0 0 /dev/disk/by-uuid/4fe-110.. /var reiserfs defaults,noatime,notail 0 2 *"The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops. 'notail' disables the ReiserFS tailpacking feature, for added performance at the cost of slightly less efficient disk usage.*" * The first field, **, describes the block device or remote filesystem to be mounted. For regular mounts, this field will contain a link to a block device node (as created by mknod which is called by udev at boot) for the device to be mounted; for instance, '/dev/cdrom' or '/dev/sda1'. Instead of giving the device explicitly, the Arch installer indicates the filesystem that is to be mounted by its UUID by default. As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability. _If you do not need nor wish to use UUID, simply change your fstab to use whatever naming convention desired._ (See this wiki article for more information on persistent block device naming. ) ls -lF /dev/disk/by-uuid/ Will list all partitions by uuid. * The second field, **, describes the mount point for the filesystem. For swap partitions, this field should be specified as 'swap'; (Swap partitions are not actually mounted.) * The third field, **, describes the type of the filesystem. The Linux kernel supports many filesystem types. (For the filesystems currently supported by the running kernel, see /proc/filesystems). An entry 'swap' denotes a file or partition to be used for swapping. An entry 'ignore' causes the line to be ignored. This is useful to show disk partitions which are currently unused. * The fourth field, **, describes the mount options associated with the filesystem. It is formatted as a comma separated list of options. It contains at least the type of mount plus any additional options appropriate to the filesystem type. For documentation on the available options for non-nfs file systems, see mount(8). * The fifth field, **, is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. dump is a backup utility. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be backed up. _Note that dump is not installed by default._ * The sixth field, **, is used by the fsck(8) program to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a of 1, and other filesystems should have a of 2 or 0. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to use parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked. * If you plan on using *hal* to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for *hal*, which will be installed later in this guide. Expanded information available in the Fstab wiki entry. 2.6.0.5 * /etc/mkinitcpio.conf* ............................... Editing this configuration is unnecessary at this point; this information is provided for explanation. This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during boot. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your boot continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process. *mkinitcpio* is the next generation of *initramfs creation*. It has many advantages over the old *mkinitrd* and *mkinitramfs* scripts. * It uses *klibc* and *kinit* which are developed by Linux kernel devs to provide a small and lightweight base for early userspace. * It can use *udev* for hardware autodetection at runtime, thus prevents you from having tons of unnecessary modules loaded. * Its hook-based init script is easily extendable with custom hooks, which can easily be included in pacman packages without having to modifiy mkinitcpio itself. * It already supports *lvm2*, *dm-crypt* for both legacy and luks volumes, *raid*, *swsusp* and *suspend2* resuming and booting from *usb mass storage* devices. * Many features can be configured from the kernel command line without having to rebuild the image. * The *mkinitcpio* script makes it possible to include the image in a kernel, thus making a self-contained kernel image is possible. * Its flexibility makes recompiling a kernel unnecessary in many cases. *mkinitcpio* was developed by Aaron Griffin and Tobias Powalowski with some help from the community. 2.6.0.6 /etc/modprobe.conf .......................... It is unnecessary to configure this file at this time. * *modprobe.conf* can be used to set special configuration options for the kernel modules 2.6.0.7 /etc/resolv.conf (for Static IP) ........................................ The _resolver_ is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process. * _If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See Network (http://wiki.archlinux.org/index.php/Network#For_DHCP_IP)])._ If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver ). You may have as many as you wish. An example, using OpenDNS: nameserver 208.67.222.222 nameserver 208.67.220.220 If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your */etc/resolv.conf*, using your router's IP (which is also your gateway from */etc/rc.conf*), e.g.: nameserver 192.168.1.1 If using *DHCP*, you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped. 2.6.0.8 /etc/hosts .................. This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information: [aliases...] Add your _hostname_, coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this: 127.0.0.1 localhost.localdomain localhost '''''yourhostname''''' _This format, _'including the 'localhost' and your actual host name_', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners._ If you use a static IP, add another line using the syntax: e.g.: 192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname''''' * *TIP*: For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.: 64.233.169.103 www.google.com g 192.168.1.90 media 192.168.1.88 data The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses. 2.6.0.9 /etc/hosts.deny and /etc/hosts.allow ............................................ Modify these configurations according to your needs if you plan on using the ssh daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your */etc/hosts.allow *file and add the appropriate parameters: * let everyone connect to you sshd: ALL * restrict it to a certain ip sshd: 192.168.0.1 * OR restrict for an IP range sshd: 10.0.0.0/255.255.255.0 If you do not plan on using the ssh daemon, leave this file at the default, (empty), for added security. 2.6.0.10 /etc/locale.gen ........................ The */usr/sbin/locale-gen* command reads from */etc/locale.gen* to generate specific locales. They can then be used by *glibc* and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a UNIX-like operating system. By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file remains untouched. *locale-gen* runs on every *glibc* upgrade, generating all the locales specified in /etc/locale.gen. Choose the locale(s) you need (remove the # in front of the lines you want), e.g.: en_US ISO-8859-1 en_US.UTF-8 The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root. *"If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.*" 2.6.0.11 Root password ...................... Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader. 2.6.0.12 Pacman-Mirror ...................... Choose a mirror repository for *pacman*. * _archlinux.org is throttled, limiting downloads to 50KB/s_ Return to the main menu. 2.7 Install Bootloader ====================== Because we have no secondary operating system in our example, we will need a bootloader. GNU GRUB (http://www.gnu.org/software/grub/) is the recommended bootloader. Alternatively, you may choose LILO (http://lilo.go.dyndns.org/). 2.7.1 GRUB ---------- The provided *GRUB* configuration (*/boot/grub/menu.lst*) should be sufficient, but verify its contents to ensure accuracy. You may want to alter the resolution of the console by adding a vga= kernel argument corresponding to your desired virtual console resolution. (A table of resolutions and the corresponding numbers is printed in the menu.lst.) Example: title Arch Linux (Main) root (hd0,0) kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773 initrd /boot/kernel26.img _The linux kernel, 'vmlinuz', is so named because it incorporated _'v*irtual *m*emory capability early in its development. The *z_' denotes a zipped (compressed) image._ Explanation: Line 1: *title*: A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection. Line 2: *root*: *GRUB*'s root; the drive and partition where the kernel (/boot) resides, according to system BIOS. (More accurately, where GRUB's stage2 file resides). *NOT necessarily the root* (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd_x,x_ format regardless of IDE or SATA, and enclosed within parentheses. The example indicates that /boot is on the first partition of the first drive, according to BIOS, or, (hd0,0). Line 3: *kernel*: This line specifies: * The path and filename of the kernel *"relative to GRUB's root*". In the example, /boot is merely a directory residing on the same partition as / and *vmlinuz26* is the kernel filename; */boot/vmlinuz26*. _If /boot were on a separate partition, the path and filename would be simply _'/vmlinuz26*, being relative to *GRUB_"s root._ * The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing */sbin/init*), _according to the UUID numbering scheme_ as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. * An easy way to distinguish the 2 appearances of 'root' in /boot/grub/menu.lst is to remember that the first root statement _informs GRUB where the kernel resides_, whereas the second root= kernel argument _tells the kernel where the root filesystem (/) resides_. * Kernel options. In our example, *ro* mounts the filesystem as read only during startup, and the *"vga=773"* argument will give a 1024x768 framebuffer with 256 color depth. Line 4: *initrd*: (For Initial RAM disk) The path and filename of the initial RAM filesystem *relative to GRUB*'s root. Again, in the example, /boot is merely a directory residing on the same partition as / and *kernel26.img* is the initrd filename; */boot/kernel26.img*. _If /boot were on a separate partition, the path and filename would be simply _'/kernel26.img*, being relative to *GRUB_"s root._ Install the *GRUB* bootloader to the master boot record, (sda in our example). 2.8 Reboot ========== That's it; You have configured and installed your Arch Linux base system. Exit the install, and reboot: # reboot (Be sure to remove the installer CD) Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your *BIOS* back to booting from hard disk). *Congratulations, and welcome to your shiny, new Arch Linux base system!* Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. Login with the root account. We will configure pacman and update the system as root, then add a normal user. Virtual consoles 1-6 are available. 2.9 Configuring the network (if necessary) ========================================== * _This section will assist you in configuring most types of networks, if your network configuration is not working for you._ If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this. # ping -c 3 www.google.com _If you have successfully established a network connection, continue with _'Update, Sync and Upgrade the system with pacman_'._ If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings: */etc/rc.conf* # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors. */etc/hosts* # Double-check your format. (See above.) */etc/resolv.conf* # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See Network.) Advanced instructions for configuring the network can be found in the Network article. 2.9.1 Wired LAN --------------- Check your Ethernet with # ifconfig -a All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. * *Static IP* If required, you can set a new static IP with: # ifconfig eth0 netmask up and the default gateway with # route add default gw Verify that /etc/resolv.conf contains your DNS server and add it if it is missing. Check your network again with ping www.google.com. If everything is working now, adjust /etc/rc.conf as described above for static IP. * *DHCP* If you have a DHCP server/router in your network try: # dhcpcd eth0 If this is working, adjust /etc/rc.conf as described above, for dynamic IP. 2.9.2 Wireless LAN ------------------ * Ensure the driver has created a usable interface: # iwconfig * Bring the interface up with ifconfig up. e.g.: # ifconfig ath0 up * (Optional) Scan for available access points: # iwlist ath0 scan | less * Specify the id of the wireless network with iwconfig essid . Or, if using WEP; iwconfig essid key , e.g.: # iwconfig ath0 essid linksys key 0241baf34c * Request an IP address with dhcpcd . e.g.: # dhcpcd ath0 * Ensure you can route: $ ping -c 3 www.google.com Done. Detailed setup guide: Wireless Setup 2.9.3 Analog Modem ------------------ To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1. Tip: Read Dialup without a dialer HOWTO. Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the LinModem (http://www.linmodems.org/) homepage. 2.9.4 ISDN ---------- Setting up ISDN is done in three steps: 1. Install and configure hardware 2. Install and configure the ISDN utilities 3. Add settings for your ISP The current Arch stock kernels include the necessary ISDN modules, meaning that you will not need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1. Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this: # modprobe hisax type=18 protocol=2 This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter. Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf: alias ippp0 hisax options hisax type=18 protocol=2 Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed. That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it! Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1. After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files. If you set up everything correctly, you should now be able to establish a dial-up connection with # isdnctrl dial ippp0 as root. If you have any problems, remember to check the logfiles! 2.9.5 DSL (PPPoE) ----------------- These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work. Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with # /etc/rc.d/adsl start and # /etc/rc.d/adsl stop respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically 'dial in' on boot-up, add adsl to your DAEMONS array. 2.10 Update, Sync and Upgrade the system with pacman ==================================================== Now we will update the system using pacman. 2.10.1 What is pacman ? ----------------------- Pacman is the *pac*kage *man*ager of Arch Linux. Pacman is written in _C_ and is designed from the ground up to be lightweight with a very modest memory footprint, fast, simple, and versatile. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed many times faster than their Bzipped counterparts, and are therefore installed much more expediently. We will use pacman to download software packages from remote repositories and install them onto your system. Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please. 2.10.2 Configuring pacman ------------------------- 2.10.2.1 Package Repositories and /etc/pacman.conf .................................................. Arch currently offers the following 4 repositories readily accessible through pacman: *[core]* The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) It contains all the packages that MUST be in perfect working order to make sure your system continues to run. These are the absolute system-critical packages. Developer maintained. * _The Core installation media simply contains an installer script, and a snapshot of the core repository at the time of release._ *[extra]* The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. *X*, KDE, and Apache, for instance, can be found here. Developer maintained. *[testing]* The [testing] repository contains packages that are candidates for the [core] or [extra] repositories. New packages go into [testing] if: * they are expected to break something on update and need to be tested first * they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained. [testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, [testing] must be the first repo listed in your _pacman.conf_ file. *WARNING*: *"Your system may break after you update with [testing] enabled. Only experienced users should use it.*" *[community]* The [community] repository is maintained by the _Trusted Users (TUs)_ and is part of the _Arch User Repository (AUR)_. It contains binary packages from the _AUR_ that have enough votes and were adopted by a _TU_. Like all repos listed above, [community] may be readily accessed by pacman. The *AUR* also contains the *unsupported* branch, which cannot be accessed directly by pacman*. [unsupported] contains more than eight thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. *"AUR Helpers*" can help you seamlessly access AUR. */etc/pacman.conf* pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package repository that pacman can use when searching for packages. The exception to this is the options section, which defines global options. # nano /etc/pacman.conf Example: # # /etc/pacman.conf # # See the pacman.conf(5) manpage for option and repository directives # # GENERAL OPTIONS # [options] # The following paths are commented out with their default values listed. # If you wish to use different paths, uncomment and update the paths. #RootDir = / #DBPath = /var/lib/pacman/ #CacheDir = /var/cache/pacman/pkg/ #LogFile = /var/log/pacman.log HoldPkg = pacman glibc # If upgrades are available for these packages they will be asked for first SyncFirst = pacman #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #XferCommand = /usr/bin/curl %u > %o # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup #IgnorePkg = #IgnoreGroup = #NoUpgrade = #NoExtract = # Misc options (all disabled by default) #NoPassiveFtp #UseSyslog #ShowSize #UseDelta #TotalDownload ILoveCandy # # REPOSITORIES # - can be defined here or included from another file # - pacman will search repositories in the order defined here # - local/custom mirrors can be added here or in separate files # - repositories listed first will take precedence when packages # have identical names, regardless of version number # - URLs will have $repo replaced by the name of the current repo # # Repository entries are of the format: # [repo-name] # Server = ServerName # Include = IncludePath # # The header [repo-name] is crucial - it must be present and # uncommented to enable the repo. # # Testing is disabled by default. To enable, uncomment the following # two lines. You can add preferred servers immediately after the header, # and they will be used before the default mirrors. #[testing] #Include = /etc/pacman.d/mirrorlist [core] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/mirrorlist [extra] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/mirrorlist [community] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/mirrorlist # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. #[custom] #Server = file:///home/custompkgs Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines). * *"When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error." * 2.10.2.2 /etc/pacman.d/mirrorlist ................................. Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience. Edit /etc/pacman.d/mirrorlist: # nano /etc/pacman.d/mirrorlist Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. After changing mirrors, issue the following command: # pacman -Syy Passing two -refresh or -y flags forces a refresh of all package lists even if they are considered by pacman to be up to date. Issuing pacman -Syy _whenever a mirror is changed_, is good practice and will avoid possible headaches. 2.10.2.3 Ignoring packages .......................... When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the -ignore switch (do pacman -S -help for details) or permanently indicate the packages you want to skip in your /etc/pacman.conf file: IgnorePkg = kernel26 The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using ABS. Many user-contributed package build scripts are also available in the AUR. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading, unusual compilation or improper software installation is performed. Use of *IgnorePkg* in /etc/pacman.conf is therefore discouraged, and should only be used sparingly, if you know what you are doing. 2.10.2.4 Ignoring Configuration Files ..................................... In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf NoUpgrade = etc/lilo.conf boot/grub/menu.lst 2.11 Update System ================== You are now ready to upgrade your entire system. Before you do, read through the news (http://www.archlinux.org/news/) (and optionally the announce mailing list (http://archlinux.org/pipermail/arch-announce/)). Often the developers will provide important information about fixes for known issues. Consulting these pages before any upgrade is good practice. Sync, refresh, and *upgrade* your entire new system with: # pacman -Syu you may also use: # pacman --sync --refresh --sysupgrade pacman will now download a fresh copy of the master package list from the server(s) defined in pacman.conf(5) and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) Reboot if a kernel upgrade has occurred. *"Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.*" If the messages go by too fast to read, you can look at them later at /var/log/pacman.log. 2.11.0.1 The beauty of the Arch rolling release model ..................................................... Keep in mind that Arch is a *rolling release* distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing *pacman -Syu* periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. Reboot if a kernel upgrade has occurred. 2.11.1 Get familiar with pacman ------------------------------- Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman(8) tool. Try: man pacman Check out the bottom of this article, and look up the pacman wiki entries at your leisure. 2.12 Add a user and setup groups ================================ UNIX is a multi-user environment. You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal, non-root user account using the /usr/sbin/useradd program: # useradd -m -G [groups] -s [login_shell] [username] * *-m* Creates user home directory as /home/*username*. Within their home directory, a user can write files, delete them, install programs, etc. Users' home directories shall contain their data and personal configuration files, the so-called 'dot files' (their name is preceded by a dot), which are 'hidden'. (To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch.) If there is a conflict between _user_ (under /home/username) and _global_ configuration files, (usually under /etc/) the settings in the _user_ file will prevail. Dotfiles likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside. * *-G* A list of supplementary groups which the user is also a member of. _Each group is separated from the next by a comma, with no intervening spaces_. The default is for the user to belong only to the initial group (users). * *-s* The name of the user´s login shell. Leaving this field blank will cause the system to select the default login shell. Useful groups for your non-root user include: * *audio* - for tasks involving sound card and related software * *floppy* - for access to a floppy if applicable * *lp* - for managing printing tasks * *optical* - for managing tasks pertaining to the optical drive(s) * *storage* - for managing storage devices * *video* - for video tasks and 3d acceleration * *wheel* - for using sudo/su A typical example, adding a user named "archie" specifying bash as the login shell: # useradd -m -G users,audio,lp,optical,storage,video,wheel -s /bin/bash archie Next, add a password for your new user using /usr/bin/passwd. An example for our user, 'archie': # passwd archie (You will be prompted to provide the new UNIX password.) Your new non-root user has now been created, complete with a home directory and a login password. *Alternative method, using /usr/sbin/adduser:* Alternatively, you may use adduser, an interactive user adding program which will prompt you for the above data: # adduser See the Groups article and check the man pages for usermod(8) and gpasswd(8) for further information. In the event of error, or if you wish to delete this user account in favor of a different name or for any other reason, use /usr/sbin/userdel: # userdel -r [username] * *-r * Files in the user´s home directory will be removed along with the home directory itself and the user´s mail spool. 2.13 Install and setup Sudo (Optional) ====================================== To install Sudo: # pacman -S sudo To add a user as a sudo user (a "sudoer"), the visudo command must be run as root. # visudo This will open the file /etc/sudoers in a special session of vi. visudo copies the file to be edited to a temporary file, edits it with an editor, (vi by default), and subsequently runs a sanity check. If it passes, the temporary file overwrites the original with the correct permissions. Alternatively, or if you do not know how to use vi, you may set the EDITOR environment variable to the editor of your choice before running visudo. e.g.: # EDITOR=nano visudo *WARNING: Do not edit /etc/sudoers directly with an editor; Errors in syntax can cause annoyances (like rendering the root account unusable). You must use the "visudo" command to edit /etc/sudoers.* To give the user full root privileges when he/she precedes a command with "sudo", add the following line: USER_NAME ALL=(ALL) ALL where USER_NAME is the username of the individual. For more information, such as sudoer completion, see Sudo 3 Part II: Install X and configure ALSA *************************************** 3.1 Configure the audio card with alsamixer =========================================== The Advanced Linux Sound Architecture (known by the acronym *ALSA*) is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, *ALSA* also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. ------------------------------------------------------------------------------- - Alsa is included in the Arch mainline kernel and udev will automatically probe your hardware on boot-up, loading the corresponding kernel module for your audio card. Therefore, your sound should already be working, but is muted by default. The alsa-utils package contains the alsamixer userspace tool, which will allow us to configure the sound device from the console. (You may also run alsamixer from an *X* environment later.) Install the alsa-utils package: # pacman -S alsa-utils Did you add your normal user to the audio group? If not, use /usr/bin/gpasswd. As root do: # gpasswd -a ''yourusername'' audio As *"normal, non-root*" user, invoke /usr/bin/alsamixer: # su - ''yourusername'' '''$''' alsamixer Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing *M*. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Some machines, (like the Thinkpad T61), have a *Speaker* channel which must be unmuted and adjusted as well. Leave alsamixer by pressing ESC. 3.1.1 Sound Test ---------------- Ensure your speakers are properly connected, and test your sound configuration as normal user using /usr/bin/aplay: $ aplay /usr/share/sounds/alsa/Front_Center.wav You should hear a very eloquent woman say, "Front, center." Then run /usr/bin/alsactl as root: $ su - # alsactl store This will create '/etc/asound.state', saving the alsamixer settings. Also, add the alsa _daemon_ to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up. # nano /etc/rc.conf DAEMONS=(syslog-ng network crond '''alsa''') _Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API)._ Expanded information available in the ALSA wiki entry. 3.2 Installing and configuring X ================================ The *X* Window System (commonly *X11*, or just simply *X*) is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on UNIX-like operating systems. *X* provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. *X* does not mandate the user interface — individual client programs handle this. *X* is so named because it was preceded by the *W* Window System, originally developed at Stanford University. ------------------------------------------------------------------------------- - If you plan on using an *open-source* video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg: # pacman -S libgl _(Proprietary video drivers provide their own gl library implementations.)_ ------------------------------------------------------------------------------- - Now we will install the base Xorg packages using pacman. This is the first step in building a GUI. # pacman -S xorg 3d utilities such as glxgears are included in the *mesa* package: # pacman -S mesa Now we have the base packages we need for running the *X* Server. You should add the driver for your graphics card now (e.g. xf86-video-). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure. You will need knowledge of which video chipset your machine has. If you do not know, use the /usr/sbin/lspci program: # lspci | grep VGA If you need a list of all *open-source* video drivers, do: # pacman -Ss xf86-video | less Here is a list of *open source* drivers, and the corresponding video chipsets. * *xf86-video-apm* Alliance ProMotion video driver * *xf86-video-ark* ark video driver * *xf86-video-ati* ATI(AMD) video driver * *xf86-video-chips* Chips and Technologies video driver * *xf86-video-cirrus* Cirrus Logic video driver * *xf86-video-dummy* dummy video driver * *xf86-video-fbdev* framebuffer video driver * *xf86-video-glint* GLINT/Permedia video driver * *xf86-video-i128* Number 0 i128 video driver * *xf86-video-i740* Intel i740 video driver * *xf86-video-i810* Intel i810/i830/i9xx video drivers (deprecated - use -intel) * *xf86-video-intel* Newer Version of Intel i810/i830/i9xx video drivers * *xf86-video-imstt* Integrated Micro Solutions Twin Turbo vidoe driver * *xf86-video-mga* mga video driver (Matrox Graphics Adapter) * *xf86-video-neomagic* neomagic video driver * *xf86-video-nv* Nvidia nv video driver * *xf86-video-rendition* Rendition video driver * *xf86-video-s3* S3 video driver * *xf86-video-s3virge* S3 Virge video driver * *xf86-video-savage* savage video driver * *xf86-video-siliconmotion* siliconmotion video driver * *xf86-video-sis* SiS video driver * *xf86-video-sisusb* SiS USB video driver * *xf86-video-tdfx* tdfx video driver * *xf86-video-trident* Trident video driver * *xf86-video-tseng* tseng video driver * *xf86-video-unichrome* VIA S3 Unichrome video drivers * *xf86-video-v4l* v4l video driver * *xf86-video-vesa* vesa video driver * *xf86-video-openchrome (testing)* via video driver (currently in testing, try openchrome in the meantime) * *xf86-video-vga* VGA 16 color video driver * *xf86-video-vmware * vmware video driver * *xf86-video-voodoo * voodoo video driver * Note that the *vesa* driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa *should* work. * If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. *Installing proprietary video drivers is covered below.* Use pacman to install the appropriate video driver for your video card/onboard video. e.g.: # pacman -S xf86-video-savage (for the Savage driver.) 3.3 Create /etc/X11/xorg.conf ============================= 3.3.0.1 What is /etc/X11/xorg.conf? ................................... /etc/X11/xorg.conf is the main configuration file for your *X* Window System, the foundation of your *G*raphical *U*ser *I*nterface. It is a plain text file ordered into sections and subsections. Important sections are _Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout_. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. ------------------------------------------------------------------------------- - By default, you will not have an Xorg config file, as the newest versions of Xorg feature autodetection. _If_ the autodetection _works satisfactorily_ and you do not need to specify special features such as aiglx, compositing and so forth, you may forgo creating an xorg.conf file. _Most people will still find that they need to generate a config file, however._ Advanced users may wish to manually create their own xorg.conf file. You may also use the /usr/bin/Xorg program with the -configure option to generate a basic config file; As root, do: # Xorg -configure This will create a config file at /root/xorg.conf.new To test the server, run: # X -config /root/xorg.conf.new *X* should start with the white hollow vector *X* in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit *X*. Inspect your config file in case of errors: # nano /root/xorg.conf.new Ensure the Xorg -configure script has correctly specified your video driver. e.g.: Section "Device" ... Driver "savage" ... EndSection Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them: Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" HorizSync 30.0 - 130.0 # Safe for LCD's VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's. EndSection (If you do not know these specs, consult your monitor's documentation.) Specify your default color depth under section "Screen": Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 (Typically, this will be set to 24 for true color.) Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.: SubSection "Display" Viewport 0 0 Depth 24 Modes "1024x768" "800x600" "640x480" Add the following section, if you wish to enable eye candy which requires the composite extension: Section "Extensions" Option "Composite" "Enable" EndSection Try your config again, after modifying: # X -config /root/xorg.conf.new Ensure an *X* session opens, without errors, and copy or move the generated config file to /etc/X11/: # cp /root/xorg.conf.new /etc/X11/xorg.conf Detailed instructions in the Xorg article. 3.3.1 Alternative xorg.conf generation -------------------------------------- * Note that if your machine has a successfully configured xorg.conf under another distribution, you may easily copy it over to your current Arch system. * If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the /usr/bin/hwd tool. Install with: # pacman -S hwd And run with # hwd -xa * You may also try the /usr/bin/xorgcfg script: # xorgcfg * Lastly, you may choose /usr/bin/xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf: # xorgconfig Continue with *Simple baseline X test* 3.4 Using proprietary Graphics Driver (NVIDIA, ATI) =================================================== You may choose to use the proprietary video drivers from NVIDIA or ATI. 3.4.1 NVIDIA Graphic Cards -------------------------- The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source *nv* driver offers only 2d support at this time. Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: *1. nvidia-71xx* _for very old Cards like TNT and TNT2_ *2. nvidia-96xx* _slightly newer cards up to the GF 4_ *3. nvidia* _newest GPUs after the GF 4_ Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver. Select and install the appropriate NVIDIA driver _for your card_, e.g.: # pacman -S nvidia-96xx The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver: # nvidia-xconfig It also has several options which will further specify the contents and options of the xorg.conf file. For example, # nvidia-xconfig --composite --add-argb-glx-visuals For more detailed information, see nvidia-xconfig(1). Some useful tweaking options in the device section are (beware that these may not work on your system): Option "RenderAccel" "true" Option "NoLogo" "true" Option "AGPFastWrite" "true" Option "EnablePageFlip" "true" Make sure all instances of DRI are commented out: # Load "dri" Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable. Update kernel module dependencies using /sbin/depmod: # depmod -a (A reboot may be necessary.) Advanced instructions for nvidia configuration can be found in the NVIDIA article. Continue with *Simple baseline X test* 3.4.2 ATI Graphic Cards ----------------------- ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic. Install the *proprietary* ATI Driver with # pacman -S catalyst Use the aticonfig tool to modify the xorg.conf. Install the *open-source* ATI Driver with # pacman -S xf86-video-ati Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support. The latest proprietary driver does support AIGLX now. To use Compiz or Beryl add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions. Advanced instructions for ATI configuration can be found in the ATI wiki. 3.5 Simple baseline X test ========================== At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to successfully start *X* from the command line before installing a complete desktop environment, you can do so by invoking *xterm*. Xterm is a very simple terminal emulator which runs in the *X *Server environment; it is installed as part of the base xorg packages. More advanced users who are comfortable with *X* configuration may choose to skip this optional step. Prepare for the test by configuring a ~/.xinitrc: 3.5.0.1 ~/.xinitrc .................. One of the main functions of this file is to dictate what *X* Window client is invoked with the */usr/bin/startx* and/or */usr/bin/xinit* program _on a per-user basis_. (The *startx* script is merely a front end to the more versatile *xinit* command.) There are vast amounts of additional configurable specifications and commands that may also be added to ~/.xinitrc as you further customize your system. *.xinitrc* is a so-called 'dot' (.) file. Files in a UNIX filesystem which are preceded with a dot (.) are 'hidden', and will not show up with a regular 'ls' command, usually for the sake of keeping directories tidy. Dot files may be seen by issuing *ls -a*. The 'rc' denotes _Run Commands_ and simply indicates that it is a configuration file. Since it controls how a program runs, it is (although historically incorrect) also said to stand for "Run Control". *startx/xinit* will start the *X* server and clients. To determine the client to run, *startx/xinit* will first look to parse a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.) Further details in the .xinitrc wiki entry. Switch to your *"normal, non-root*" user: # su - ''yourusername'' * /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name *skel* is derived from the word *skeleton*, because the files it contains form the basic structure for users' home directories. Copy the sample xinitrc file from /etc/skel/ to your home directory: $ cp /etc/skel/[[.xinitrc]] ~/ Edit the file: $ nano ~/.xinitrc and add: exec xterm So that it looks like this: #!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # exec xterm # exec wmaker # exec startkde # exec icewm # exec blackbox # exec fluxbox _Be sure to have only one uncommented _'exec_' line in your ~/.xinitrc_. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice. Finally, test your configurations by starting *X* as *normal, non-root* user, with: $ startx or $ xinit You should have an *xterm* session open up. You can test your keyboard and its layout in it. You may need to add option lines in the "InputDevice" section of the /etc/X11/xorg.conf file specifying the keyboard layout and variant:
 Option "XkbLayout" "be" Option "XkbVariant" "" 
You can exit the *X* Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting *X*, you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started *X* from. If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly. Advanced instructions for Xorg configuration can be found in the Xorg article. 4 Part III: Installing and configuring a Desktop Environment ************************************************************ While The *X* Window System provides the basic framework for building a _graphical user interface_ (GUI), a *Desktop Environment* (DE), works atop and in conjunction with *X*, to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for _your_ needs. * If you want something full-featured and similar to Windows and Mac OSX, *KDE* is a good choice * If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, *GNOME* is a good choice * *Xfce* is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment. * *LXDE* is a minimal DE based on the Openbox window manager. It provides most things you need for a modern desktop while keeping relatively low system resource usage. LXDE is a good choice for those who want a quick way of setting up a pre-configured Openbox system. If you desire a lighter, less demanding GUI to configure manually, you may choose to simply install a *Window Manager*, or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT include such features as panels, applets, icons, applications, etc., by default. * Lightweight floating WM's include: *Openbox*, *Fluxbox*, *fvwm2*, *Windowmaker, Pekwm, and TWM*. * If you need something completely different, try *Awesome, ion, wmii, dwm, or xmonad*. 4.1 Install Fonts ================= At this point, you may wish to save time by installing visually pleasing, true type fonts, before installing a desktop environment/window manager. Dejavu and bitstream-vera are good, general-purpose font sets. You may also want to have the Microsoft font sets, which are especially popular on websites. Install with: # pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera 4.2 ~/.xinitrc (again) ====================== As *non-root user*, edit your /home/username/.xinitrc to specify the DE you wish to use. This will allow you to use *startx/xinit* from the shell, in the future, to open your DE/WM of choice: $ nano ~/.xinitrc Uncomment or add the *'exec* ..' line of the appropriate desktop environment/window manager. Some examples are below: For the Xfce4 desktop environment: exec startxfce4 For the KDE desktop environment: exec startkde A *startkde* or *startxfce4* command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command. Remember to have only one uncommented *exec* line in your ~/.xinitrc. Continue below, installing the DE/WM of your choice. * *GNOME* * *KDE* * *Xfce* * *LXDE* * *Openbox* * *Fluxbox* * *fvwm2* 4.3 GNOME ========= 4.3.1 About GNOME ----------------- The *G*NU *N*etwork *O*bject *M*odel *E*nvironment. The GNOME project provides two things: The GNOME desktop environment, an intuitive and attractive desktop for end-users, and the GNOME development platform, an extensive framework for building applications that integrate into the rest of the desktop. 4.3.2 Installation ------------------ Install the base GNOME environment with: # pacman -S gnome Additionally, you can install the extras: # pacman -S gnome-extra It's safe to choose all packages shown in the extra package. 4.3.3 Useful DAEMONS for GNOME ------------------------------ Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The *hal* daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The *fam* daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. Both *hal* and *fam* make life easier for the GNOME user. The hal and fam packages are installed when you install GNOME, but must be invoked to become useful. You may want to install a graphical login manager. For GNOME, the *gdm* daemon is a good choice. As root: # pacman -S gdm You will almost certainly want the *hal* and *fam* daemons. Start hal and fam: # /etc/rc.d/hal start # /etc/rc.d/fam start Add them to your /etc/rc.conf DAEMONS section, so they will be invoked at boot: # nano /etc/rc.conf DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''') (If you prefer to log into the console and manually start X, leave out gdm.) As normal user, start X: $ startx or $ xinit If ~/.xinitrc is not configured for GNOME, you may always start it with *xinit*, followed by the path to GNOME: $ xinit /usr/bin/gnome-session Advanced instructions for installing and configuring GNOME can be found in the Gnome article. Congratulations! Welcome to your GNOME desktop environment on your new Arch Linux system! You may wish to continue by viewing *Tweaks and finishing touches*, or the rest of the information below. You may also be interested in the Post Installation Tips wiki article. 4.3.4 Eye Candy --------------- You may find the default GNOME theme and icons not very attractive. A nice gtk theme is murrine. Install it with # pacman -S gtk-engine-murrine and select it with System->Preferences->Appearance->Theme tab. You can find more themes, icons, and wallpaper at Gnome Look (http://www.gnome-look.org). 4.4 KDE ======= 4.4.1 About KDE --------------- The *K* *D*esktop *E*nvironment. KDE is a powerful Free Software graphical desktop environment for GNU/Linux and UNIX workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of UNIX-like operating systems. 4.4.2 Installation ------------------ Choose one of the following, and continue below with *Useful KDE DAEMONS*: 1. Package *kde* is the complete, vanilla KDE 4.1 Install this before: # pacman -S zlib shared-mime-info Install with pacman: # pacman -S kde 2. *KDEmod* is an Arch Linux exclusive community-driven system designed for modularity and also offers a choice between KDE 3.5 or 4.1. KDEmod can be installed with pacman, after adding the proper repository to /etc/pacman.conf. The project website, including complete instructions can be found at http://kdemod.ath.cx/ (http://kdemod.ath.cx/). A dependency of the full kdemod3/kdemod-legacy was removed from the Arch official repositories. KDEmod is not part of said repositories, and no standard Arch programs used this package. If you wish to install kdemod3-complete without potentially problematic workarounds [kdemod3-base shouldn't have this issue btw], you should install the package libopensync from AUR manually (See: `http://wiki.archlinux.org/index.php/AUR_User_Guidelines#Using_Packages_from_UNSUPPORTED') or via yaourt until the package is in the KDEMod3 repositories. If you have trouble, try libopensync-stable (or libopensync-unstable if you're desperate). 4.4.3 Useful KDE DAEMONS ------------------------ KDE will require the *hal* (*H*ardware *A*bstraction *L*ayer) and *fam* (*F*ile *A*lteration *M*onitor) daemons. The *kdm* daemon is the *K* *D*isplay *M*anager, which provides a *graphical login*, if desired. Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both *hal* and *fam* make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful. ------------------------------------------------------------------------------- - Start hal and fam: # /etc/rc.d/hal start # /etc/rc.d/fam start The hal daemon relies on, and will automatically start, the dbus daemon. Edit your DAEMONS section in /etc/rc.conf: # nano /etc/rc.conf Add *hal* and *fam* to your DAEMONS section, to invoke them on boot. If you prefer a graphical login, add *kdm* as well: DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''') If you installed KDEmod3 instead of normal KDE, use kdm3 instead of kdm. * This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. * Some users prefer an alternative method of starting a display manager like KDM on boot by utilizing the /etc/inittab method and starting the system at runlevel 5. See Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup for more. * If you prefer to log into the *console* at runlevel 3, and manually start X, leave out kdm, or comment it out with an exclamation. ( ! ) Now try starting your X Server as normal user: $ startx Advanced instructions for installing and configuring KDE can be found in the KDE article. Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing *Tweaks and finishing touches*, or the rest of the information below. You may also be interested in the Post Installation Tips wiki article. 4.5 Xfce ======== 4.5.1 About Xfce ---------------- The cholesterol-free *X* environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well. 4.5.2 Installation ------------------ Install Xfce: # pacman -S xfce4 You may also wish to install themes and extras: # pacman -S xfce4-goodies gtk2-themes-collection Note: *xfce4-xfapplet-plugin* (a plugin that allows the use of GNOME applets in the Xfce4 panel) is part of the *xfce4-goodies* group and depends on *gnome-panel*, which in turn depends on *gnome-desktop*. You may wish to take this into consideration before installing, since it represents a significant number of extra dependencies. If you wish to admire 'Tips and Tricks' on login, install the *fortune-mod* package: # pacman -S fortune-mod 4.5.3 Useful DAEMONS -------------------- Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful. Start hal and fam: # /etc/rc.d/hal start # /etc/rc.d/fam start The hal daemon relies on, and will automatically start, the dbus daemon. Edit your DAEMONS section in /etc/rc.conf: # nano /etc/rc.conf Add *hal* and *fam* to your DAEMONS section, to invoke them at boot. Advanced instructions for installing and configuring Xfce can be found in the Xfce article. If you wish to install one, see Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup. Otherwise you can login in via the console and run: $ startxfce4 Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing *Tweaks and finishing touches*, or the rest of the information below. You may also be interested in the Post Installation Tips wiki article. 4.6 LXDE ======== 4.6.1 About LXDE ---------------- LXDE, (for _L_ightweight _X_11 _D_esktop _E_nvironment), is a new project focused on providing a modern desktop environment which aims to be lightweight, fast, intuitive and functional while keeping system resource usage low. LXDE is quite different from other desktop environments, since each component of LXDE is a discrete and independent application, and each can be easily substituted by other programs. This modular design eliminates all unnecessary dependencies and provides more flexibility. Details and screenshots available at: http://lxde.org/ LXDE provides: 1. The OpenBox windowmanager 2. PCManFM File manager 3. LXpanel system panel 4. LXSession session manager 5. LXAppearance GTK+ theme switcher 6. GPicView image viewer 7. Leafpad simple text editor 8. XArchiver: Lightweight, fast, and desktop-independent gtk+-based file archiver 9. LXNM (still under development): Lightweight network manager for LXDE supporting wireless connections These lightweight and versatile tools combine for quick setup, modularity and simplicity. Install LXDE with: # pacman -S lxde Add: exec startlxde to your ~/.xinitrc and start with _startx_ or _xinit_ Further information available at the LXDE wiki article. 4.7 *box ======== 4.7.1 Fluxbox ------------- Fluxbox © is yet another windowmanager for X. It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability). Install Fluxbox using # pacman -S fluxbox fluxconf If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it: exec startfluxbox More information is available in the Fluxbox article. 4.7.2 Openbox ------------- Openbox is a standards compliant, fast, light-weight, extensible window manager. Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface. Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. Install openbox using # pacman -S openbox Additional configuration tools are also available, if desired: # pacman -S obconf obmenu Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory: # su - ''yourusername'' $ mkdir -p ~/.config/openbox/ $ cp /etc/xdg/openbox/rc.xml ~/.config/openbox/ $ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/ *rc.xml* is the main configuration file for OpenBox. It may be manually edited, (or you can use OBconf). *menu.xml* configures the right-click menu. You may log into OpenBox via graphical login using KDM/GDM, or from the shell using *startx*, in which case you will need to edit your ~/.xinitrc (as non-root user) and add the following: exec openbox-session You may also start OpenBox from the shell using *xinit*: $ xinit /usr/bin/openbox-session * Openbox may also be used as the window manager for GNOME, KDE, and Xfce. For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM. Some useful, lightweight programs for OpenBox are: * PyPanel or LXpanel if you want a panel * feh if you want to set the background * ROX if you want a simple file manager (also provides simple icons) * PcmanFM a lightweight but versatile file manager (also provides desktop icon functionality) * iDesk (available in AUR) for providing desktop icons More information is available in the Openbox article. 4.8 fvwm2 ========= FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. Install fvwm2 with # pacman -S fvwm fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add exec fvwm to your user's .xinitrc. 5 Browser and Video Player ************************** 5.1 Web Browser =============== The ever-popular Firefox web browser is available through pacman, although it does not have its official branding. Therefore, the program appears as its development codename, _Gran Paradiso_, when opened. Install with: pacman -S firefox Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience: pacman -S flashplugin mplayer mplayer-plugin codecs _For newbies: if you install the x86_64 version of Arch Linux don`t use the option flashplugin in pacman, like above, or you will get an error. Unfortunately Adobe does not offer a 64 bit version of flash plugin. Please see this wiki (http://wiki.archlinux.org/index.php/Install_Flash_on_Arch64) entry to workaround the problem_ (The codecs package contains most codecs, including those for Win32, Quicktime and Realplayer9 content.) 5.2 VLC ======= VLC Player is a versatile multimedia player which can handle many different formats, from a disc or file. It also provides the ability to stream multimedia over a lan. Install with: pacman -S vlc The libdvdcss library provides DVD decoding for encrypted DVDs. Ensure the legality of using libdvdcss in your country before installing! pacman -S libdvdcss For more, see Useful Applications. =APPENDIX= 6 An Introduction to ABS ************************ ABS is the Arch Linux Build System. It is a ports-like system for compiling sources into installable packages. 'Ports' is a system used by *BSD, which uses simple build scripts residing in a directory tree on the local machine. Each port is simply a directory, named for the installable 3rd party software, and containing a build script. Typically, a *BSD user who wanted to build and install _firefox_, would cd into the corresponding firefox port residing under /usr/ports and do make install clean. The _firefox_ sourcecode would then be downloaded from a 3rd party source. According to the port build script, the sources would then be compiled, patched (if directed), and finally, installed to the system. PKGBUILDs, which contain all information for a given piece of software; The md5sums, source URL, version, license and compilation instructions. In addition, ABS provides the advantage of compiling the sources _into an installable package_ with the extension _.pkg.tar.gz_. Obviously, it is a simple g-zipped tarball, but it is cleanly installable/removable/trackable via pacman. Install the abs package: # pacman -Sy abs After installing the _abs_ package with pacman, run the /usr/bin/abs script as root: # abs The _ABS tree_ is then extracted under /var/abs, organized according to the installable software. To build a package from source, create a build directory and copy the abs directory for a given application to the build directory: $ mkdir ~/abs $ cp -r /var/abs/extra/x11/slim ~/abs This will move the slim subdir and PKGBUILD script for slim to the build directory. In addition to PKGBUILDs, some software requires an additional *.install file. See the *ABS* and *makepkg* wiki entries for more information navigate to the slim build directory and, after modifying the PKGBUILD if desired or necessary, invoke the abs /usr/bin/makepkg tool $ [[makepkg]] -cs * -*c* Cleans up any leftover files from the source compilation * -*s* Downloads and installs any missing dependencies by invoking pacman Install with pacman's -U (upgrade) switch: # pacman -U slim.pkg.tar.gz Done. Slim sources are downloaded, compiled, compressed into a package and finally, installed. You may build, clean, install any needed dependencies and finally install the package with one command: *makepkg -csi*. The above example used pacman -U to install as a separate step for informational purposes. See the *makepkg(8)* man page. Q: Why would I need ABS to compile and create an installable package from source, when I have access to all of the same software via pacman and the binary repos? A: A few reasons: * For installing newer, unstable, custom, or development versions of an application. PKGBUILDs are transparent and simple. Edit the software version and the md5sums of the desired versions within the PKGBUILD, and build and install your custom packages. * For patching. Copy the corresponding PKGBUILD to a build directory along with your patch, edit the PKGBUILD, and build/install with /usr/bin/makepkg. * For creating your own packages for yourself, or to share with the community on the AUR. You are not limited to the PKGBUILDs under /var/abs. Create your own to build from 3rd party sourcecode. They are simple, open and transparent. Explore the prototpe PKGBUILD provided at /usr/share/pacman/PKGBUILD.proto * ABS provides an expedient method for recompiling, if necessary. For example, to recompile your video or wireless drivers. * To build an installable package with custom configurations Enable or disable options in any package by modifying the PKGBUILD * To build an installable package, further optimized for your machine's architecture, Specify your CFLAGS in /etc/makepkg.conf. * To rebuild your entire system, BSD-style, further optimized for your machine's architecure. Use the makeworld script, or the community-contributed pacbuilder (http://bbs.archlinux.org/viewtopic.php?id=48957) 7 An Introduction to The AUR **************************** The *A*rch *U*ser *R*epository The ABS tree provides the ability to build all Arch software available in the [core], [extra], [community], and [testing] repositories by providing build scripts on the local machine. In contrast, the AUR does not provide a tree on the local machine, but rather, an unsupported repository of build scripts, sporting a handsome web interface at http://aur.archlinux.org/index.php Also, there is an AUR link tab at the top right of every page on the Arch site. Once you have navigated to the AUR web page, click on the *Packages* button on the top right. You will be brought to the packages search page. The general procedure will be: 1. Enter the search criteria into the *keywords* field and click on *go*. The next screen will present all related results. 2. Take note of the *Location* on the package listing. If the package location is in *community*, you have not done your homework, and should simply use pacman or ABS to install. If the location is *unsupported*, continue. 3. Click on the name of the package on the package listing. You will be brought to the Package Details page. An example for the *yaourt* package: yaourt 0.9-2 http://www.archlinux.fr/yaourt-en/ A Pacman frontend with more features and AUR support unsupported :: system Maintainer: wain Votes: 943 License: GPL Last Updated: Sat, 15 Mar 2008 17:15:20 +0000 First Submitted: Tue, 04 Jul 2006 20:37:58 +0000 Tarball :: Files :: PKGBUILD Click on the *Tarball* link in the last line of the details, and save to a build directory. Navigate to, and extract the tarball: $ tar -xvf yaourt.tar.gz Enter the build directory and invoke makepkg, which will download the sources, compile, and compress the installation into an installable .pkg.tar.gz package: $ makepkg -cs * -*c* Cleans up any leftover files from the source compilation * -*s* Downloads and installs any missing dependencies by invoking pacman Install with pacman's *-U* (upgrade) switch: # pacman -U yaourt.pkg.tar.gz Done. See the AUR wiki entry for more information. 7.1 Install an AUR Helper ========================= AUR Helpers add seamless access to the AUR. They vary in their features, but can ease in searching, fetching, building, and installing from over 9000 PKGBUILDs found in AUR. 8 File and directory explanation ******************************** "Shareable" files are defined as those that can be stored on one host and used on others. "Unshareable" files are those that are not shareable. For example, the files in user home directories are shareable whereas device lock files are not. "Static" files include binaries, libraries, documentation files and other files that do not change without system administrator intervention. "Variable" files are defined as files that are not static. */* (root) The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory "/", even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system. */bin/* Essential command binaries that must be available in single user mode; for all users (e.g., cat, ls, cp). /bin/ provides programs that must be available even if only the partition containing / is mounted. This situation may arise should one need to repair other partitions but have no access to shared directories (i.e. you are in single user mode and therefore have no network access). Unlike /sbin, the /bin directory contains several useful commands that are of use to both the root user as well as non-root users. */boot/* Unshareable, static directory containing the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files. */dev/* Essential device nodes created by udev during the boot process and as machine hardware is discovered by events. This directory highlights one important aspect of the UNIX filesystem - everything is a file or a directory. Exploring this directory will reveal many files, each representing a hardware component of the system. The majority of devices are either block or character devices; however other types of devices exist and can be created. In general, 'block devices' are devices that store or hold data, whereas 'character devices' can be thought of as devices that transmit or transfer data. For example, hard disk drives and optical drives are categorized as block devices while serial ports, mice and USB ports are all character devices. */etc/* Host-specific, unshareable global configuration files shall be placed in the /etc directory. If more than one configuration file is required for an application, it is customary to use a subdirectory in order to keep the /etc/ area as clean as possible. It is considered good practice to make frequent backups of this directory as it contains all system related configuration files. */etc/conf.d/* Some daemon scripts will have a matching configuration file in this directory that contains some useful default values. When a daemon is started, it will first source the settings from its config file within this directory, and then source /etc/rc.conf. Arch's simple, transparent scripting approach means you can easily centralize all your daemon configuration options in your /etc/rc.conf simply by setting an appropriate variable value, or, split up your configuration over multiple files if you prefer a decentralized approach to this issue. */etc/rc.d/* All Arch daemons reside here. Custom scripts may also be placed here and invoked from the DAEMONS= array in /etc/rc.conf */etc/X11/* Configuration files for the X Window System ::*/etc/X11/xinit/* xinit configuration files. 'xinit' is a configuration method of starting up an X session that is designed to be used as part of a script. ::*/etc/X11/xinit/xinitrc* Global xinitrc file, used by all X sessions started by xinit (startx). Its usage is of course overridden by a .xinitrc file located in the home directory of a user. */home/* UNIX is a multi-user environment. Therefore, each user is also assigned a specific directory that is accessible only to them and to the root user. These are the user home directories, which can be found under '/home/$USER' (~/). Within their home directory, a user can write files, delete them, install programs, etc. Users' home directories contain their data and personal configuration files, the so-called 'dot files' (their name is preceded by a dot), which are 'hidden'. To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch. If there is a conflict between personal and system wide configuration files, the settings in the personal file will prevail. Dotfiles most likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside. */home* can become quite large as it is typically used for storing downloads, compiling, installing and running programs, mail, collections of multimedia files etc. */lib/* Contains kernel modules and essential shared library images (the C programming code library) needed to boot the system and run the commands under /bin/ and /sbin/. Libraries are collections of frequently used program routines and are readily identifiable through their filename extension of *.so. They are essential for basic system functionality. Kernel modules (drivers) are in the subdirectory /lib/modules/. */lost+found* UNIX-like operating systems must execute a proper shutdown sequence. At times, a system might crash or a power failure might take the machine down. Either way, at the next boot, a filesystem check using the _fsck_ program shall be performed. _Fsck_ will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered. */media/* Mount points for removable media. CDROMs, DVD's, and USB sticks shall have an appropriate mount point under /media/. The motivation for the creation of this directory has been that historically there have been a number of other different places used to mount removeable media such as /cdrom, /mnt or /mnt/cdrom. Placing the mount points for all removable media directly in the root directory would potentially result in a large number of extra directories in /. Although the use of subdirectories in /mnt as a mount point has recently been common, it conflicts with a much older tradition of using /mnt directly as a temporary mount point. Therefore, Arch allocates /media as the mountpoint for removable media. On systems where more than one device exists for mounting a certain type of media, mount directories shall be created by appending a digit to the name of those available above starting with '0', but the unqualified name must also exist. The "hal" (Hardware Abstraction Layer) daemon mounts removable media to /media as /media/ */mnt/* This is a generic mount point for temporary filesystems or devices. Mounting is the process of making a filesystem available to the system. After mounting, files will be accessible under the mount-point. Additional mount-points (subdirectories) may be created under /mnt/. There is no limitation to creating a mount-point anywhere on the system, but by convention and for practicality, littering a file system with mount-points should be avoided. */opt/* Packages and large static files that do not fit cleanly into the above GNU filesystem layout can be placed in /opt. A package placing files in the /opt/ directory creates a directory bearing the same name as the package. This directory in turn holds files that otherwise would be scattered throughout the file system. For example, the acrobat package has Browser, Reader, and Resource directories sitting at the same level as the bin directory. This doesn't fit into a normal GNU filesystem layout, so Arch places all the files in a subdirectory of /opt. */proc/* /proc is very special in that it is also a virtual filesystem. It is sometimes referred to as the _process information pseudo-file system_. It doesn't contain 'real' files, but rather, runtime system information (e.g. system memory, devices mounted, hardware configuration, etc). For this reason it can be regarded as a control and information center for the kernel. In fact, quite a lot of system utilities are simply calls to files in this directory. For example, 'lsmod' is the same as 'cat /proc/modules' while 'lspci' is a synonym for 'cat /proc/pci'. By altering files located in this directory, kernel parameters may be read/changed (sysctl) while the system is running. The most distinctive facet about files in this directory is the fact that all of them have a file size of 0, with the exception of *kcore, mounts* and *self*. */root/* Home directory of the System Administrator, 'root'. This may be somewhat confusing, ('/root under root') but historically, '/' was root's home directory (hence the name of the Administrator account). To keep things tidier, 'root' eventually got his own home directory. Why not in '/home'? Because '/home' is often located on a different partition or even on another system and would thus be inaccessible to 'root' when - for some reason - only '/' is mounted. */sbin/* UNIX discriminates between 'normal' executables and those used for system maintenance and/or administrative tasks. The latter reside either here or - the less important ones - in /usr/sbin. Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. This directory contains binaries that are essential to the working of the system. These include system administration as well as maintenance and hardware configuration programs. grub (the command), fdisk, init, route, ifconfig, etc., all reside here. */srv/* Site-specific data which is served by the system. The main purpose of specifying this is so that users may find the location of the data files for a particular service, and so that services which require a single tree for readonly data, writable data and scripts (such as cgi scripts) can be reasonably placed. Data of interest to a specific user shall be placed in that user's home directory. */tmp* This directory contains files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. Do not remove files from this directory unless you know exactly what you are doing! Many of these files are important for currently running programs and deleting them may result in a system crash. On most systems, this directory is cleared out at boot or at shutdown by the local system. The basis for this was historical precedent and common practice. */usr/* While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system administrator intervention (installation, update, upgrade). Any information that is host-specific or varies with time is stored elsewhere. Aside from /home/, /usr/ usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc. X and its supporting libraries can be found here. User programs like telnet, ftp, etc., are also placed here. In the original UNIX implementations, /usr/ (for _user_), was where the home directories of the system's users were placed (that is to say, /usr/_someone_ was then the directory now known as /home/_someone_). Over time, /usr/ has become where userspace programs and data (as opposed to 'kernelspace' programs and data) reside. The name has not changed, but its meaning has narrowed and lengthened from _everything user related_ to _user usable programs and data_. As such, the backronym *'U*ser *S*ystem *R*esources' was created. :*/usr/bin/* Non-essential command binaries (not needed in single user mode); for all users. This directory contains the vast majority of binaries (applications) on your system. Executables in this directory vary widely. For instance vi, gcc, and gnome-session reside here. :*/usr/include/* Header files needed for compiling userspace source code.. :*/usr/lib/* Libraries for the binaries in /usr/bin/ and /usr/sbin/. :*/usr/sbin/* Non-essential system binaries of use to the system administrator. This is where the network daemons for the system reside, along with other binaries that (generally) only the system administrator has access to, but which are not required for system maintenance and repair. Normally, these directories are never part of normal user's $PATHs, only of root's (PATH is an environment variable that controls the sequence of locations that the system will attempt to look in for commands). :*/usr/share/* This directory contains 'shareable', architecture-independent files (docs, icons, fonts etc). Note, however, that '/usr/share' is generally not intended to be shared by different operating systems or by different releases of the same operating system. Any program or package which contains or requires data that don't need to be modified should store these data in '/usr/share/' (or '/usr/local/share/', if manually installed - see below). It is recommended that a subdirectory be used in /usr/share for this purpose. :*/usr/src/* The 'linux' sub-directory holds the Linux kernel sources, and header-files. :*/usr/local/* Optional tertiary hierarchy for local data. The original idea behind '/usr/local' was to have a separate ('local') '/usr/' directory on every machine besides '/usr/', which might be mounted read-only from somewhere else. It copies the structure of '/usr/'. These days, '/usr/local/' is widely regarded as a good place in which to keep self-compiled or third-party programs. This directory is empty by default in Arch Linux. It may be used for manually compiled software installations if desired. Pacman installs to /usr/, therefore, manually compiled/installed software installed to /usr/local/ may peacefully co-exist with pacman-tracked system software. */var/* Variable files, such as logs, spool files, and temporary e-mail files. On Arch, the ABS tree and pacman cache also reside here. Why not put the variable and transient data into /usr/? Because there might be circumstances when /usr/ is mounted as read-only, e.g. if it is on a CD or on another computer. '/var/' contains variable data, i.e. files and directories the system must be able to write to during operation, whereas /usr/ shall only contain static data. Some directories can be put onto separate partitions or systems, e.g. for easier backups, due to network topology or security concerns. Other directories have to be on the root partition, because they are vital for the boot process. 'Mountable' directories are: '/home', '/mnt', '/tmp', '/usr' and '/var'. Essential for booting are: '/bin', '/boot', '/dev', '/etc', '/lib', '/proc' and '/sbin'. :*/var/abs/* The ABS tree. A ports-like package build system hierarchy containing build scripts within subdirectories corresponding to all installable Arch software. :*/var/cache/pacman/pkg/* The pacman package cache. :*/var/lib/* State information. Persistent data modified by programs as they run (e.g. databases, packaging system metadata etc.). :*/var/lock/* Unsharable Lock files data. Files keeping track of resources currently in use. :*/var/log/* Log files. :*/var/mail/* Shareable directory for users' mailboxes. :*/var/run/* Unshareable data about the running system since last boot (e.g. currently logged-in users and running daemons). :*/var/spool/* Spool for tasks waiting to be processed (e.g. print queues and unread mail). :*/var/spool/mail/* Deprecated location for users' mailboxes. :*/var/tmp/* Temporary files to be preserved between reboots. 9 Arch Boot Process ******************* After the initial POST, the BIOS directs the computer to load a boot sector from the hard drive. Actually, a small program called GRUB stage1 is within this sector. This is a tiny program. Its only function is to load GRUB stage1.5 or stage2 (depending on filesystem type). GRUB stage1.5/stage2 will present a boot menu with various (customizable) choices of operating systems to boot. The path to the device, partition and filename of the kernel and initial ram filesystem is contained for GRUB in /boot/grub/menu.lst. After choosing an Arch Linux entry, GRUB loads the Linux kernel. The kernel is the core of an operating system. It functions on a low level (_kernelspace_) interacting between the hardware of the machine, and the programs which use the hardware to run. To make efficient use of the cpu, the kernel uses a scheduler to arbitrate which tasks take priority at any given moment, creating the illusion (to human perception) of many tasks being executed simultaneously. After the kernel is loaded, it reads from the initramfs. The purpose of the initramfs is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initramfs loads the proper modules, either manually or through udev, it passes control to the kernel and the boot process continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process. The kernel then looks for the program init which resides at /sbin/init. init relies on glibc, the GNU C library. Libraries are collections of frequently used program routines and are readily identifiable through their filename extension of *.so. They are essential for basic system functionality. This part of the boot process is called _early userspace_. The purpose of init is to bring (and keep) the system up into a usable state. It uses the boot scripts to do so. As you may be aware, Arch uses BSD-style boot scripts. init reads the file /etc/inittab, which tells it what to do. Looking over the inittab script, you will find that the first uncommented line defines the default system runlevel, or, 3. The next thing it is told to do is to run an initialization script. The program that executes (or interprets) this script is bash, the same program that gives you a command prompt. In Arch Linux, the main initialization script is /etc/rc.sysinit. /etc/inittab also defines your virtual consoles, which are 'respawned' by /sbin/init if terminated. Lastly, inittab defines a login manager, if starting the system at runlevel 5 is desired. By default the login manager is also respawned by /sbin/init if terminated. /etc/inittab directs init to call the first boot script, /etc/rc.sysinit, after which /etc/rc.multi will be called (in a normal boot). The last script to run will be /etc/rc.local, which is empty by default. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the boot sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the /etc/rc.d/functions script. If you plan to write your own daemon files, you should consider having a look at this file and existing daemon scripts. 9.1 Boot Script Overview ======================== 1. /etc/inittab (covered above) 2. /etc/rc.sysinit 3. /etc/rc.single 4. /etc/rc.multi 5. /etc/rc.local 6. /etc/profile 7. /etc/rc.shutdown 8. /etc/rc.local.shutdown 9. /etc/rc.d/* */etc/rc.sysinit* The main system boot script, which mounts filesystems, runs udev, activates swap, loads modules, sets localization parameters, etc. When called, udev shall probe system hardware, loading appropriate kernel modules and creating device nodes under /dev. For more, open /etc/rc.sysinit in your editor of choice; the file is well commented. */etc/rc.single* Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. For desktop users, this mode is usually quite useless. */etc/rc.multi* Multi-user startup script. It starts all daemons (such as a logger, a network script, etc) specified in the DAEMONS= array in /etc/rc.conf, after which it calls /etc/rc.local. */etc/rc.local* Local multi-user startup script. Empty by default. It is a good place to put any last-minute commands you want the system to run at the very end of the boot process. Most common system configuration tasks, like loading modules, changing the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local is not already residing in /etc/profile.d/, or any other existing configuration location instead. */etc/profile* This script is run on each user login to initialize the system. It globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs. */etc/rc.shutdown* System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. */etc/rc.local.shutdown* (Optional) Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable. */etc/rc.d/** This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on boot, you can use these scripts when the system is running to manage the services of your system. For example the command /etc/rc.d/postfix stop will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, there are few scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit. 9.2 agetty and login ==================== After the Arch boot scripts are completed, the agetty program prompts you for a login name. After a login name is received, agetty calls login to prompt for the login password. Finally, with a successful login, the login program starts your default shell. The default shell and environment variables may be globally defined within /etc/profile. All variables within a users home directory shall take precedence over those globally defined under /etc. For instance, if 2 conflicting variables are specified within /etc/profile and ~/.bashrc, the one dictated by ~/.bashrc shall prevail. For more, see The Arch boot process 10 Maintaining the system ************************* 10.1 su ======= *su* or *su -* ? The default behavior of su is to remain within the current directory and to maintain the environmental variables of the original user (rather than switch to those of the new user). It sometimes can be advantageous for a system administrator to use the shell account of an ordinary user rather than its own. In particular, occasionally the most efficient way to solve a user's problem is to log into that user's account in order to reproduce or debug the problem. However, in many situations it is not desirable, or it can even be dangerous, for the root user to be operating from an ordinary user's shell account and with that account's environmental variables rather than from its own. While inadvertently using an ordinary user's shell account, root could install a program or make other changes to the system that would not have the same result as if they were made while using the root account. For instance, a program could be installed that could give the ordinary user power to accidentally damage the system or gain unauthorized access to certain data. Thus, it is advisable that administrative users, as well as any other users that are authorized to use su (of which there should be very few, if any), acquire the habit of always following the su command with a space and then a hyphen. (login shell option) The hyphen has two effects: (1) it switches from the current directory to the home directory of the new user (e.g., to /root in the case of the root user) by _logging in_ as that user, and (2) it changes the environmental variables to those of the new user as dictated by their ~/.bashrc. That is, if the first argument to su is a hyphen, the current directory and environment will be changed to what would be expected if the new user had actually logged on to a new session (rather than just taking over an existing session). *"Thus, administrators should generally use su as follows*": $ su - An identical result is produced by adding the username root, i.e., $ su - root Likewise, the same can be done for any other user, e.g., for a user named bob: # su - bob 10.2 Pacman =========== Pacman is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too. A more-detailed description of Pacman can be found in its article. 10.2.1 Useful commands ---------------------- To view the options available for a particular operational command, say *-Q*, just append it with *-h*: pacman -Qh To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages): pacman -Sy To *upgrade* all packages on the system: pacman -Su To sync, update, and *upgrade* all the packages on the system with one command: pacman -Syu To install or upgrade a single package or list of packages (including dependencies): pacman -S packageA packageB You can also sync, update the package database, and install packages in one command: pacman -Sy packageA packageB To remove a single package, leaving all of its dependencies installed: pacman -R package To remove a package and all of the package's dependencies which are not used by any other installed package: pacman -Rs package (*-Rs* is typically preferred vs *R* to remove any package as it will clean up all unused dependencies) To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.): pacman -Rsn package To search the remote (repo) package database for a list of packages matching a given keyword: pacman -Ss keyword List all available packages in a given repo. e.g., core: pacman -Sl core To list all packages on your system pacman -Q To list all packages on your system without the version strings, we add the *-q* option: pacman -Qq To search (query) the local (your machine) package database for a given package: pacman -Q package To search (query) the local (your machine) package database for a given package and list all pertinent information: pacman -Qi package To list all files installed by a given _package_: pacman -Ql ''package'' Conversely, to find the package that owns a given file (in this example, the _ls_ executable): pacman -Qo /bin/ls To find all unused packages (orphans): pacman -Qdt Missing libraries: Suppose you receive an error message like this: mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type: pacman -Ql | grep ''libgssapi.so.2'' The first column in the output is the package name: heimdal /usr/lib/libgssapi.so.2 heimdal /usr/lib/libgssapi.so.2.0.0 Then, you can just re-install it: pacman -Sy heimdal To defragment pacman's cache database and optimize for speed: pacman-optimize To count how many packages are currently on your system: pacman -Q | wc -l To install a package compiled from source using ABS and makepkg: pacman -U packagename.pkg.tar.gz Note: There are countless additional pacman functions and commands. Try man pacman and consult the pacman wiki entries. 10.2.2 Files ------------ There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the *.pacsave* extension. When you force a "NoUpgrade" on a file via pacman.conf (http://www.archlinux.org/pacman/pacman.conf.5.html), it will not be replaced during an upgrade and the new file will come with the *.pacnew* extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in */etc/pacman.conf*: NoUpgrade = /path/to/config/file To view the differences of the old and new versions of these files, we can either edit them manually or use a *diff* utility to take note of the differences. There is an automated tool to find and view such files available from the *community* repository: pacman -S pacman-contrib cd ~/ pacdiff # as root There is a bug in the above tool where if you navigate to */etc* and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you _think_ that is the right way). There are other types of leftovers depending on the programs available on your system. Some will create backups with a *.bak* extension, while others with something like "*~*" or "*-*". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use *locate* to search for them: locate -e *.~ *.- *.bak And we can use something useful like *vimdiff* to look at the differences manually: pacman -S vim vimdiff file1 file2 11 Tweaks/Finishing touches *************************** 11.1 HAL ======== Since you have now installed a desktop environment/window manager, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device. KDE, GNOME and XFCE all use HAL. The installation procedure is described in the HAL article. Some information can also be found at Wikipedia (http://en.wikipedia.org/wiki/HAL_(software)). 11.2 Backgrounding DAEMONS on startup ===================================== To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.: DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm) This will enable daemons to load in the background, without waiting for the preceding daemon to load first. Prefix any daemons which you do not need with a bang (!) e.g.: DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm) Alternatively, you may also simply remove unneeded daemons. 11.3 Beautifying Fonts for LCD's ================================ See Fonts 11.4 Adjusting Mouse for scroll wheel ===================================== While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0): Option "ZAxisMapping" "4 5 6 7" 11.5 Get All Mouse Buttons Working ================================== See Get All Mouse Buttons Working 11.6 Configuring Touchpad for Laptops ===================================== See Touchpad Synaptics 11.7 Adjusting Keyboard Layout ============================== You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs). Option "XkbLayout" "de" Option "XkbVariant" "nodeadkeys" 11.8 Additional tweaks for laptops ================================== ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install `acpid' using pacman -S acpid and add it to the daemons in /etc/rc.conf. If you already have *hal* specified in your DAEMONS, there is no need to add *acpid*. HAL will automatically detect and load the acpid daemon. Manually, it can be started by /etc/rc.d/acpid start More-specific information about Arch Linux on various Laptops can be found at :Category:Laptops (English) 11.9 Configuring CPU frequency scaling ====================================== Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with pacman -S cpufrequtils Edit the config file /etc/conf.d/cpufreq and change governor="ondemand" which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you do not know the frequencies, run _cpufreq-info_ after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the _acpi-cpufreq_ driver, however other options include the _p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino_ drivers. Load the module with modprobe and start cpufreq with /etc/rc.d/cpufreq start For more details, see Cpufrequtils 11.10 Pm-Utils ============== The pm-utils package will allow you to suspend-to-RAM and hibernate: pacman -S pm-utils Pm-utils wiki page. 11.11 Laptop-Mode ================= The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired. pacman -S laptop-mode-tools Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf. 12 Polishing & Further information ********************************** For further information and support you can go to the homepage (http://www.archlinux.org/), search the wiki, the forums (http://bbs.archlinux.org/), the IRC channel, and the mailing lists (http://www.archlinux.org/mailman/listinfo/).