Difference between revisions of "Arch Handbook"

From ArchWiki
Jump to: navigation, search
(removed pacman section, updated graphical DE section)
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Getting and installing Arch]]
[[Category:Getting and installing Arch]]
{{i18n|Arch Handbook}}
{{out of date}}
{{out of date}}
== Notice ==
== Notice ==
Line 15: Line 14:
=== Installing Arch Linux ===
=== Installing Arch Linux ===
The full install guide is [[Official Arch Linux Install Guide|here]] and the install CDs are available [http://www.archlinux.org/download/ here]. If you would like a more detailed installation guide, please see the [[Beginners Guide|Beginners' Guide]].
The full install guide is [[Installation Guide|here]] and the install CDs are available [https://www.archlinux.org/download/ here]. If you would like a more detailed installation guide, please see the [[Beginners' Guide]].
=== Linux Basics ===
=== Linux Basics ===
Line 121: Line 120:
  man ultracompressor
  man ultracompressor
=== Installing Software: Pacman ===
=== Installing, removing, updating and managing software: pacman ===
See [[pacman]].
See [[pacman]].
=== X11 and Graphical Desktop Environments ===
=== Graphical Desktop Environments ===
Basics of X11 concepts, installation and configuration of Gnome, KDE, etc.
{{Graphical user interface overview}}
See [[Xorg]].
====Window Managers and Desktop Environments====
Installing, updating and removing software is a fairly common task and this chapter will
introduce you to Pacman(8). Pacman is a package manager that will aid you in keeping your
system up-to-date, installing new software and general house keeping. If this is your
first time with Arch Linux you REALLY want to read this chapter at least once. Not reading
it will severely impair your experience with Arch, so please read it carefully.
After reading this chapter you will know...
* ... how to install, remove and update software.
* ... how to search for software in the package database.
* ... how to update every single software package on your computer.
* ... how to query the package database for information about installed packages.
Let's get on with it shall we?
=== Pacman introduction ===
As mentioned previously Pacman(8) is a software utility that helps you keep your system
up-to-date and install, remove or update software. Pacman will automatically resolve
dependencies during installation of a software. A dependency is simply another software
package required by the program you're trying to install.
Let's us fire up Pacman and see what
it can do. In a console type the following:
sh$ pacman --help
usage:  pacman <operation> [...]
    pacman {-h --help}
    pacman {-V --version}
    pacman {-A --add}    [options] <file>
    pacman {-Q --query}  [options] [package]
    pacman {-R --remove}  [options] <package>
    pacman {-S --sync}    [options] [package]
    pacman {-U --upgrade} [options] <file>
use 'pacman --help' with other options for more syntax
Functionality in Pacman is split into a main action and a sub-action. Each action usually
requires an argument to specify exactly what you're trying to achieve. For example --query (or -Q)
will allow you to query the package database to see installed packages and other types
of information related to the software installed. Let's assume we wanted to find out which
package owns the file /etc/rc.conf. In a console type the following:
sh$ pacman --query --owns /etc/rc.conf
/etc/rc.conf is owned by initscripts 2008.03-4
As we can see here rc.conf is owned by initscripts 2008.03-4. Most actions can be abbreviated
such that '--query --owns' becomes '-Qo' . For clarity we'll however continue to use the longer
=== Searching for software ===
Pacman comes with powerful searching capabilities and that allows you to do searches using
regular expressions. If you're unfamiliar with regular expressions there is no reason for
concern as you'll do just fine without them.
Searching is done through the --sync (or -S) action and sub-action --search (or -s).
Let's see if we can find a package called wpa_supplicant. In a console type the following:
sh$ pacman --sync --search wpa_supplicant
core/wpa_supplicant 0.5.10-1 (base)
    A utility providing key negotiation for WPA wireless networks
extra/wpa_supplicant_gui 0.5.10-1
    A qt frontend to wpa_supplicant
The results displays two matching packages one from the 'core' respository and another from
'extra'. Should we want more detailed information about this package we can again use Pacman
to query the database with --sync --info. In a console type the following:
sh$ pacman --sync --info wpa_supplicant
Repository    : core
Name          : wpa_supplicant
Version        : 0.5.10-1
URL            : None
Licences      : None
Groups        : base 
Provides      : None
Depends On    : openssl 
Optional Deps  : None
Conflicts With : None
Replaces      : None
Download Size  : 193.46 K
Installed Size : 193.46 K
Packager      : None
Architecture  : None
Build Date    : None
MD5 Sum        : 91b2beebb2abea973c18eb672057f128
Description    : A utility providing key negotiation for WPA wireless networks
=== Installing software ===
Now that you've found a package it's time to install it. Choose any package you're interested
in and type the following in your console:
  # pacman -S muparser
  resolving dependencies...
  looking for inter-conflicts...
  Targets: muparser-1.28-1 
  Total Download Size:    0.15 MB
  Proceed with installation? [Y/n]
Pacman will check for dependencies and if all is good proceed to download required packages.
Once all files are downloaded Pacman will proceed to install them. While installing the software
Pacman might print messages during installation. It's VERY important that you read these
messages as they usually contain important information about the software you're installing.
(!) Note: Remember to read any messages printed by Pacman during installation, they are printed
for a reason and should be considered essential reading. Please do not forget! (!)
=== Removing software ===
So you've decided to remove a package from the system. Again Pacman will happily do this for
you and also remove any non-explicitly (dependencies) installed packages as well. Pacman will
obviously not remove depdencies if they are required by other packages, but if you want that
Pacman can do that as well.
To remove a particular package and any dependencies no longer needed type the following in a
sh$ pacman --remove --recursive muparser
Pacman will remove any files belonging to the specified package and potential dependencies. It's
important to understand that some files might remain on the system even after removing the
package. There might for example be configuration files left in your home-folder and Pacman
will NOT remove these files.
===  Updating software ===
Pacman will obviously not only install and remove software packages but also help you maintain
the ones you have installed on your system. Keeping software up-to-date is useful for many
reasons such as removing security vulnerabiltiies, bugs and perhaps even adding more
Before proceeding with any package updating you should first ensure that you have the most
recent snapshop of currently available packages. This is done through a simple command to
Pacman. Type the following in your console:
sh$ pacman --sync --refresh
Pacman will connect to each repository and update, if necessary, information about available
software packages. Once Pacman has updated your respositories it's time to check if you've
got any outdated packages that may be upgraded to a later version.
Generally you'll want to update the entire system in one go, but we'll first walk through the
steps of updating just one package. To find out what packages may be updated we'll use Pacman
to query the package database. In a console type the following:
sh$ pacman --query --upgrades
Choose a package you'd like to update and type the following in a console:
sh$ pacman --sync <package_to_upgrade>
Confirm the procedure and Pacman will begin downloading new packages and any necessary
dependencies. Should you want to avoid updating of dependencies you'd also want to add
--nodeps (or -d).
Clearly this is not a particularily quick and efficient way of updating your entire system,
especially if you've got more than ten available package updates. Pacman does solve this
problem as well so keep reading and you'll learn how you can update your entire system
in just one command.
=== Updating the entire system ===
If you've not already run your repository update, please do so now. (In case you do not remember:
pacman --sync --refresh) In a console type the following:
sh$ pacman --sync --sysupgrade
Pacman will now begin a possibly lengthy process of downloading and updating your entire
system. Depending on things such as download speed, processor power it might take anything from
a few seconds to a half an hour. Not too bad considering your entire system will be completely
updated after it finishes.
(!) Note: During installation Pacman might print messages on the screen. It's VERY important
that you do not ignore these messages as they are printed for a reason. Read them, please!
If you do not understand the meaning of them, write them down and use ask the forum for help. (!)
Sometimes Pacman may update important packages that contain updates to some of your configuration
files in for example /etc. It's important to always keep an eye out for .pacnew files in this
folder. Pacman will only produce these files (.pacnew/.pacsave) if you've made any changes to
the files being updated. If no changes have been made Pacman will automatically replace the old
files with the new ones. We'll talk more about this in a later chapter.
=== Summary ===
This chapter introduced you to some of the basic functionality of Pacman. There is much more
functionality in Pacman and we've only really scratched the surface. If you'd like a more
thorough description of all the options Pacman provide we recommend reading the man pages for
Hopefully this chapter have demonstrated some of the Pacman power and why it makes Arch Linux
a powerful, yet simple Linux distribution. In the next chapter we'll talk about how to various
aspects of Arch Linux. See you there!
== Common Tasks ==
== Common Tasks ==
Line 353: Line 146:
Creating and managing users with command-line utilities.
Creating and managing users with command-line utilities.
Users are created with <code>adduser</code>. Users must also be added to [[groups]] to make them useful.
Users are created with <code>adduser</code>. See [[Users and Groups]] for more information.
== Networking ==
== Networking ==

Revision as of 16:34, 6 December 2012

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Arch Handbook#)


This handbook has only just been started. It's currently a rather bare outline. Please edit it and make it better! Look at the FreeBSD Handbook as a style guide.

Most sections should be a summary, with a link to the main article on the subject.

Getting Started


Arch linux is a lightweight and flexible linux distribution that tries to Keep It Simple. There are official packages optimized for the i686 and x86-64 architectures. There is also a community-operated package repository. See the pages in this category

Installing Arch Linux

The full install guide is here and the install CDs are available here. If you would like a more detailed installation guide, please see the Beginners' Guide.

Linux Basics

A few basics on the file system and command line, for people starting Unix/Linux with Arch.

How to change directory:

cd /name/of/directory


cd /etc/pacman.d

How to make a Directory:

mkdir /path/to/new/directory


mkdir /home/archuser/newfolder

How to remove an (empty) directory:

rmdir /path/to/empty/directory

How to remove a non-empty directory:

rmdir --ignore-fail-on-non-empty /path/to/non_empty/directory

How to List files in a directory:

All Files: (except hidden files)


All files: (including hidden files)

ls -a

All files, hidden files and their properties:

ls -la

Files with the .avi file extension only:

ls *.avi

How to move a file:

mv /path/to/old/file.ext /path/to/new/file.ext


mv /home/archuser/compressed.zip /home/archuser/myfiles/compressed2.zip

How to copy a file:

cp /path/to/file.txt /path/to/copied/file.txt

How to remove a file:

rm /path/to/file.txt


rm /home/archuser/file.txt

How to show the contents of a file:

cat /path/to/file.txt

How to make a File/Script Executable:

chmod +x /path/to/script.sh

How to (search the entire filesystem for) a file called euwfh.avi

cd /
find -name euwfh.avi

How to mount a partition:

mount /dev/sdX1 /media/mountpoint


mount /dev/sda1 /media/folder

How to Show How much Space is Left/used on (all mounted) partitions:

df -h

How to show all running processes:

ps -A

How to stop an annoying process called "EvilTrojan":

killall EvilTrojan

How to show an unintelligible manual for a program "ultracompressor"

man ultracompressor

Installing, removing, updating and managing software: pacman

See pacman.

Graphical Desktop Environments

Template:Graphical user interface overview

Common Tasks

Desktop Applications

Web browsers, office suites, etc.


Video players, music jukeboxes, photo management, how to get codecs.


CUPS installation and configuration, finding drivers.

System Administration

Configuration and Tuning

A lot of the configuration of Arch is done in /etc/rc.conf. This may sound daunting , but it is well commented and allows you to set modules for auto-loading and blacklisting, along with daemons and some network configuration. Details on some common configuration (init, cron).

Users and Basic Account Management

Creating and managing users with command-line utilities.

Users are created with adduser. See Users and Groups for more information.


Network Configuration

How networks are set up in Arch.


Mail, web, SSH server installation and configuration.


See Firewalls, iptables, Simple Stateful Firewall.