You are now ready to upgrade your entire system. Before you do, read through the [http://www.archlinux.org/news/ news] (and optionally the [http://archlinux.org/pipermail/arch-announce/ announce mailing list]). Often the developers will provide important information about required configurations and modifications for known issues. Consulting these pages before any upgrade is good practice.

+

{{Warning|1=System updates should be performed with care. It is very important to read and understand [https://bbs.archlinux.org/viewtopic.php?id=57205 this] before proceeding.}}

+

Before upgrading the system, read through the [http://www.archlinux.org/news/ news] (and optionally the [http://archlinux.org/pipermail/arch-announce/ announce mailing list]). Often the developers will provide important information about required configurations and modifications for known issues. The ArchLinux user is expected to consult these pages before performing an upgrade.

Sync, refresh, and upgrade your entire new system with:

Sync, refresh, and upgrade your entire new system with:

Line 165:

Line 166:

=====The Arch rolling release model=====

=====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 {{ic|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. Remember to '''reboot''' if a kernel upgrade has occurred.

+

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. Issuing {{ic|pacman -Syu}} periodically (and noting the above warning) keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. Remember to '''reboot''' if a kernel upgrade has occurred.

−

{{Warning|1=System updates should be performed with care. It is very important to read and understand [https://bbs.archlinux.org/viewtopic.php?id=57205 this] before proceeding.}}

===Adding a User===

===Adding a User===

Revision as of 03:33, 11 March 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Post-Installation

This section will cover various must-do procedures after installation such as updating your new system and adding a regular, non-root user.

Update

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.

Note: Virtual consoles 1-6 are available. You may switch between them with <ALT>+F1...F6

Configure the network (if necessary)

If you properly configured your system, you should have a working network. Try to ping example.com to verify:

/etc/resolv.conf - Check this only if you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default.

Tip: Advanced instructions for configuring the network can be found in the Network article.

Wired LAN

Check your Ethernet with

$ ip addr

All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. These examples will use eth0.

Static IP

If required, you can set a new static IP with:

# ip addr add <ip>/<netmask> dev <interface>

and the default gateway with

# ip route add default via <ip>

Verify that /etc/resolv.conf contains your DNS server and add it if it is missing.
Check your network again with ping -c 3 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.

Wireless LAN

Please see Wireless Quickstart For the Live Environment for details on connecting to a wireless network. Although you are no longer running off the installation media, the commands are the same as long as you installed all related wireless packages during package selection. Remember, your wireless device may need firmware in order to operate. For troubleshooting, check the detailed Wireless Setup page.

Proxy Server

If you are behind a proxy server, edit /etc/wgetrc and set http_proxy and ftp_proxy in it.

Analog Modem, ISDN, and DSL (PPPoE)

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.

Note: If you installed via a Netinstall, many, if not all, of your packages will already be up to date. However, it is still advisable to run through this update process.

/etc/pacman.conf

To make any changes to your repository selections or pacman options, edit /etc/pacman.conf.

Repositories are described below; enable all desired repositories by removing the # in front of the 'Include =' and '[repository]' lines.

Note: 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.

Package Repositories

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 /etc/pacman.conf:

[multilib]
Include = /etc/pacman.d/mirrorlist

AUR

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 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.

Note: There are a number of pacman wrappers (AUR Helpers) available that provide seamless access to the AUR.

/etc/pacman.d/mirrorlist

Defines pacman repository mirrors and priorities.

Note: If your installation medium is old, your mirrorlist might be outdated, which might lead to problems when updating archlinux with pacman (see here for the bug report). Therefore it is a good idea to get the latest version of the mirrorlist from the pacman mirror list generator page. Copy the freshly generated list to /etc/pacman.d/mirrorlist before you continue.

Open /etc/pacman.d/mirrorlist in an editor and uncomment (remove the '#' in front) a server close to you. Then issue a complete package refresh:

# pacman -Syy

Passing two --refresh or -y flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing pacman -Syywhenever a mirror is changed, is good practice and will avoid possible headaches.

rankmirrors

Alternatively, you can 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 wget or rsync may be used to effectively test for mirror throughput after a new /etc/pacman.d/mirrorlist has been generated.

Issue the following command to completely refresh package database, upgrade and install curl:

# pacman -Syyu curl

If you get an error at this step, use the command nano /etc/pacman.d/mirrorlist and uncomment a server that suits you.

cd to the /etc/pacman.d/ directory:

# cd /etc/pacman.d

Backup the existing /etc/pacman.d/mirrorlist:

# cp mirrorlist mirrorlist.backup

Edit mirrorlist.backup and uncomment all mirrors on the same continent or within geographical proximity to test with rankmirrors.

# nano mirrorlist.backup

Run the script against the mirrorlist.backup with the -n switch and redirect output to a new /etc/pacman.d/mirrorlist file:

# rankmirrors -n 6 mirrorlist.backup > mirrorlist

Note: -n 6: will rank the 6 closest mirrors

Force pacman to refresh all package lists with the new mirrorlist in place:

# pacman -Syy

Mirrorcheck for up-to-date packages

Since rankmirrors does not take into account how up-to-date a mirror's package list is, it is important to note that one or more of the mirrors it selects as fastest may still be out-of-date. ArchLinux MirrorStatus reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc. One may wish to manually inspect /etc/pacman.d/mirrorlist, ensuring that the file contains only up-to-date mirrors if having the latest package versions is a priority.

Alternatively, the Mirrorlist Generator can automatically rank mirrors close to your location by how up-to-date they are.

Tip: For a script that automates the process of getting and installing a mirrorlist file from the Pacman Mirrorlist Generator, see Mirrors.

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

Tip: If you find the lines of text to be too long and going all the way across your screen, you can export the $MANWIDTH environment variable and create a .profile file in your root's home folder for subsequent logins:

# export MANWIDTH=80

For more information, have a look at the pacman wiki entry at your own leisure, or check out the pacman rosetta entry for a comparison to other popular package managers.

Update the System

Warning: System updates should be performed with care. It is very important to read and understand this before proceeding.

Before upgrading the system, read through the news (and optionally the announce mailing list). Often the developers will provide important information about required configurations and modifications for known issues. The ArchLinux user is expected to consult these pages before performing an upgrade.

Sync, refresh, and upgrade your entire new system with:

# pacman -Syu

or:

# 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, say yes, and then reissue the pacman -Syu command when finished.

Reboot if a kernel upgrade has occurred.

Note: Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information. See Pacnew and Pacsave Files for more details.

Ignoring 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 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.

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. Issuing pacman -Syu periodically (and noting the above warning) keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. Remember to reboot if a kernel upgrade has occurred.

Adding a User

Linux is a multi-user environment. You should not perform everyday tasks using the root account, it is very poor practice and extremely dangerous: the root account should be used for administrative tasks only. Add a normal user account instead, using one of the two following methods, both creating the user archie as an example:

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

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 hardware acceleration

wheel - for using sudo

games - needed for write permission for games in the games group

power - used with power options (e.g. shutdown with power button)

scanner - for using a scanner

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.