- 1 Post-Installation
- 1.1 Update
- 1.1.1 Update, Sync, and Upgrade the system with pacman
- 1.1.2 Get familiar with pacman
- 1.1.3 Preparation
- 1.1.4 Check the network
- 1.1.5 /etc/pacman.conf
- 1.1.6 Mirrors
- 1.1.7 Initialize package verification
- 1.1.8 Update the System
- 1.2 Adding a User
- 1.1 Update
Congratulations, and welcome to your new Arch Linux 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.
Update, Sync, and Upgrade the system with pacman
Now we will update the system using pacman. Pacman is the package manager of Arch Linux. 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. Pacman will now be used to download software packages from remote repositories and install them onto your system.
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 tool. Try:
$ man pacman
# export MANWIDTH=80
You will need to temporarily edit the
/etc/pacman.conf file and set
Never, this will disable the signature check of the packages. And ignore warnings suggesting you to upgrade pacman.
Check the network
If you properly configured your system, you should have a working network. Try to
ping example.com to verify:
$ ping -c 3 example.com
PING example.com (126.96.36.199) 56(84) bytes of data. 64 bytes from 43-10.any.icann.org (188.8.131.52): icmp_req=1 ttl=248 time=25.6 ms 64 bytes from 43-10.any.icann.org (184.108.40.206): icmp_req=2 ttl=248 time=22.9 ms 64 bytes from 43-10.any.icann.org (220.127.116.11): icmp_req=3 ttl=248 time=23.6 ms --- example.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 22.912/24.062/25.632/1.156 ms
If you have successfully established a network connection, continue with Update, Sync, and Upgrade the system with pacman.
If three attempts to ping example.com produce an "unknown host" error, then your network is not properly configured. Troubleshoot by following the same instructions given in Beginners'_Guide/Installation#Setup_network_in_the_live_installation_environment. If you want to make the network configuration persistent, follow the instructions given in Beginners'_Guide/Installation#Configure_the_network.
To make any changes to your repository selections or pacman options, edit
Repositories are described below; enable all desired repositories by removing the # in front of the 'Include =' and '[repository]' lines.
A software repository is a storage location from which software packages may be retrieved and installed on a computer. Arch Linux package maintainers (developers and Trusted Users) maintain a number of official repositories containing software packages for essential and popular software, readily accessible via pacman. This article outlines those officially-supported repositories. See Official Repositories for more information including details about the purpose of each repository.
Most people will want to use [core], [extra] and [community]. If you want to run 32-bit applications on Arch x86_64, enable the [multilib] repository by adding the lines below to
[multilib] Include = /etc/pacman.d/mirrorlist
The Arch User Repository (AUR) holds the [community] and [unsupported] branches. Unlike the other branches, [unsupported] contains no binary packages and cannot (by design) be accessed directly by pacman. This branch is a collection of PKGBUILD bash scripts written by Arch users to build packages from source using the Arch Build System. Software in [unsupported] is generally not available in the other branches. When an [unsupported] package acquires enough popular votes, it may be moved to the [community] binary repository if one of the Trusted Users is willing to adopt and maintain it there.
Same Arch packages are stored on multiple servers across the world. Selected mirrors are listed in
/etc/pacman.d/mirrorlist, ordered by priority. Initially
/etc/pacman.d/mirrorlist contains list of all known mirrors, some of which should be enabled to proceed any further.
Choosing up-to-date mirrors
Arch Linux MirrorStatus reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc. Mirrorlist Generator uses this information to automatically rank mirrors close to your location by how up-to-date they are. Generated list can be simply inserted in
/etc/pacman.d/mirrorlist. You obviously can uncomment other mirrors based on your own guesses (remove the '#' in front of entry to uncomment it).
Using faster mirrors
To sort mirrors in the mirror list by speed one may use rankmirrors.
rankmirrors is a bash script which will attempt to detect uncommented mirrors specified in
/etc/pacman.d/mirrorlist which are closest to the installation machine based on latency. Faster mirrors will dramatically improve pacman performance, and the overall Arch Linux experience. This script may be run periodically, especially if the chosen mirrors provide inconsistent throughput and/or updates. Note that
rankmirrors does not test for throughput. Tools such as
rsync may be used to effectively test for mirror throughput after a new
/etc/pacman.d/mirrorlist has been generated.
cd to the
# cd /etc/pacman.d
Backup the existing
# cp mirrorlist mirrorlist.backup
/etc/pacman.d/mirrorlist.backup and uncomment mirrors for testing with
Optionally run the following
sed line to uncomment every mirror:
# sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup
Run the script against the mirrorlist.backup with the
-n switch and redirect output to a new
# rankmirrors -n 6 mirrorlist.backup > mirrorlist
-n 6will rank the 6 closest mirrors
mirrorlistfile from the Pacman Mirrorlist Generator, see Mirrors.
Refreshing mirror list
Force pacman to refresh all package lists with the new mirrorlist in place:
# pacman -Syy
-y flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing
pacman -Syy whenever a mirror is changed, is good practice and will avoid possible headaches.
Initialize package verification
$ pacman-key --init
To generate the master-key, entropy is needed. You should press random keys on your keyboard, move your mouse around, or switch to another console and run e.g.
ls -R /. After this command completes, run the following command to setup the keys. Take time to verify the Master Signing Keys when prompted as these are used to co-sign (and therefore trust) all other packager's keys.
$ pacman-key --populate archlinux
Update the System
Often the developers will provide important information about required configurations and modifications for known issues. The Arch Linux user is expected to consult these places before performing an upgrade:
- Arch news. For examples, as of 16 April, 2012, the following two news items are required reading:
- Announce mailing list.
Sync, refresh, and upgrade your entire new system with:
# pacman -Syu
# pacman --sync --refresh --sysupgrade
Pacman will now download a fresh copy of the master package list from the server(s) defined in
/etc/pacman.conf and perform all available upgrades. You may be prompted to upgrade pacman itself at this point. If so, respond by entering yes, and then reissue the
pacman -Syu command when finished.
Reboot if a kernel upgrade has occurred.
Pacman output is saved in
See Package Management FAQ for answers to frequently asked questions regarding updating and managing your packages.
After executing the command
pacman -Syu, the entire system will be updated. It is possible to prevent a package from being upgraded. A typical scenario would be a package for which an upgrade may prove problematic for the system. In this case, there are two options; indicate the package(s) to skip in the pacman command line using the
--ignore switch (
pacman -S --help for details) or permanently indicate the package(s) to skip in the
/etc/pacman.conf file in the
IgnorePkg array. For more information, please see the pacman wiki entry.
Please note that the power user is expected to keep the **whole** 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
/etc/pacman.conf is therefore discouraged, and should only be used sparingly, if you know what you are doing. Use of
IgnorePkg is analogous to "voiding the warranty".
The Arch rolling release model
Keep in mind that Arch is a rolling release distribution. This means the user is not required to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Issuing
pacman -Syu periodically (and noting the above warning) keeps the entire system up-to-date and on the bleeding edge. At the end of this upgrade, the system will be completely current. Remember to reboot if a kernel upgrade has occurred.
Adding a User
Add a normal user account instead, using one of the two following methods, both creating the user archie as an example:
You will be asked to enter some information in an interactive way:
Login name for new user : archie User ID ('UID') [ defaults to next available ]: Initial group [ users ]: Additional groups (comma separated) : audio,games,lp,optical,power,scanner,storage,video Home directory [ /home/archie ]: Shell [ /bin/bash ]: Expiry date (YYYY-MM-DD) :
As shown in the example, you are advised to enter values only for the Login name and the Additional groups, and leave empty all the other fields.
The list of Additional groups in the example is a typical choice for a desktop system, hence it is recommended especially for beginners:
- audio - for tasks involving sound card and related software
- games - for write permission for games in the games group
- lp - for managing printing tasks
- optical - for managing tasks pertaining to the optical drive(s)
- power - for allowing interactions with power options (e.g. shutdown with power button)
- scanner - for using a scanner
- storage - for managing storage devices
- video - for video tasks and hardware acceleration
For additional information about listed and other groups see Groups#User groups.
Now you will be presented with a preview of your new account, and the ability to cancel or continue operations: after pressing Template:Keypress the account will be created, and you will be prompted to enter additional, optional information for the new user (e.g. the full name). After that, you will be asked to enter the password for your account.
# useradd -m -g users -G audio,games,log,lp,optical,power,scanner,storage,video,wheel -s /bin/bash archie
You will have to set a password using
passwd. To enter additional information you can use the
Deleting the user account
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
# userdel -r [username]
-r option will remove the user's home directory and its content, along with the the user's mail spool.
Read Users and Groups for further information. If you want to change the name of your user or any existing user, consult the Change username page. You may also check the man pages for
Template:Beginners' Guide navigation