Difference between revisions of "Beginners' Guide/Post-Installation"

From ArchWiki
Jump to: navigation, search
m (Ignoring packages)
("Post-installation" subpage is alive (again?), so this should link to the lowercased subpage)
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[Beginners' guide/Post-installation]]
[[Category:Getting and installing Arch]]
[[Category:About Arch]]
[[es:Beginners' Guide/Post-Installation]]
[[hr:Beginners' Guide/Post-Installation]]
[[hu:Beginners' Guide/Post-Installation]]
[[it:Beginners' Guide/Post-Installation]]
[[ko:Beginners' Guide/Post-Installation]]
[[nl:Beginners' Guide/Post-Installatie]]
[[ro:Ghidul începătorilor/Post-instalare]]
[[ru:Beginners' Guide/Post-Installation]]
[[sr:Beginners' Guide/Post-Installation]]
[[zh-CN:Beginners' Guide/Post-Installation]]
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide|Click here]]''' if you would rather read the guide in its entirety.}}
{{Article summary start}}
{{Article summary text|This section covers essential procedures after installing a base system, such as updating your new system and adding a regular (non-root) user.}}
{{Article summary end}}
== Post-Installation ==
'''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.
Go ahead and login with the root account, because we will configure pacman and update the system as root.
{{Note|Virtual consoles 1-6 are available. You may switch between them with {{Keypress|Alt+F1}}, {{Keypress|Alt+F2}}, ... {{Keypress|Alt+F6}}.}}
=== Configure pacman ===
Pacman is the Arch Linux '''pac'''kage '''man'''ager. It is highly recommended to study and learn how to use it. Read {{ic|man pacman}}, have a look at the [[pacman]] article, or check out the [[Pacman Rosetta]] article for a comparison to other popular package managers.
==== Repositories ====
For repository selections and pacman options, edit {{ic|pacman.conf}}:
{{Note|When choosing repos, be sure to uncomment both the {{ic|[''repo_name'']}} header lines, as well as the {{ic|Include}} lines. Failure to do so will result in the selected repository being omitted! This is a very common error.}}
# nano /etc/pacman.conf
Most people will want to use {{ic|[core]}}, {{ic|[extra]}} and {{ic|[community]}}.
If you installed Arch Linux x86_64, it's recommended that you enable the {{ic|[multilib]}} repository, as well (to be able to run both 32 bit and 64 bit applications):
Include = /etc/pacman.d/mirrorlist
See [[Official Repositories]] for more information, including details about the purpose of each repository.
For software unavailable directly through pacman, see [[Arch User Repository]].
==== Mirrors ====
Mirrors are listed in {{ic|/etc/pacman.d/mirrorlist}}, ordered by priority.
{{Note|If you're using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described below.}}
* [https://archlinux.org/mirrors/status/ 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.
* [https://archlinux.org/mirrorlist/ Mirrorlist Generator] uses the above to automatically sort mirrors by various criteria. Please use HTTP mirrors. They are faster because of something called [[Wikipedia:HTTP_persistent_connection|keepalive]]. FTP is slower, because it sends out a signal each time pacman downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting_mirrors|Sorting mirrors]] and [[Reflector]].
Change them to your liking and force pacman to refresh all package lists even if they are considered to be up to date:
# pacman -Syy
Use this ''whenever a mirror is changed''. This is considered to be good practice and will avoid possible headaches.
{{Note|1=Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id=68944] and [https://bbs.archlinux.org/viewtopic.php?id=65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}
=== Update the system ===
{{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.}}
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:
* [https://archlinux.org/news/ Arch news]. If you did not read this before an upgrade and you encounter an error, check the news ''before'' you post a question on the forum!
* [https://archlinux.org/pipermail/arch-announce/ Announce mailing list].
Sync, refresh the package database, and upgrade your entire system with:
# pacman -Syu
Or, same thing:
# pacman --sync --refresh --sysupgrade
If you are prompted to upgrade pacman itself at this point, respond by pressing {{Keypress|Y}}, and then reissue the {{ic|pacman -Syu}} command when finished.
{{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.}}
{{Note|Reboot if the {{Pkg|linux}} package (the Linux kernel) was updated.}}
Keep in mind that Arch is a '''rolling release''' distribution. This means the user doesn't have to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Issuing {{ic|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.
See the [[FAQ#Package Management|Package Management]] section of the [[FAQ]] for answers regarding updating and managing packages.
==== Ignoring packages ====
After executing the command {{ic|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 using the {{ic|--ignore}} switch:
# pacman -Syu --ignore libass,filesystem
* Indicate the package(s) to skip in {{ic|pacman.conf}}:
{{hc|# nano /etc/pacman.conf|2=
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg  = libass filesystem}}
{{Note|1=At present a bug in the util-linux package will give a boot message on first install with {{hc|::Removing leftover files|
/usr/lib/tmpfiles.d/uuidd.conf Unknown user 'uuidd'}}on the console during boot (and in the boot log). See:    https://bugs.archlinux.org/task/31663?project=1&order=lastedit&sort=desc - this can be fixed by reinstalling util-linux using <code>pacman -S util-linux</code> - this will likely be fixed in an updated util-linux package at some point.}}
Please note that the user is expected to keep the '''whole''' system up-to-date with {{ic|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 {{ic|IgnorePkg}} in {{ic|/etc/pacman.conf}} is therefore discouraged, and should only be used sparingly, if you know what you are doing. Use of {{ic|IgnorePkg}} is analogous to "voiding the warranty".
=== Add a user ===
{{Warning|Linux is a multi-user operating system. You should not perform everyday tasks using the root account. It is considered a very poor practice and could be extremely dangerous. The root account should only be used for administrative tasks.}}
Add a normal user account, using one of the two following methods. The user ''archie'' is just an example.
==== Interactive method ====
The {{ic|adduser}} command will prompt for information interactively:
{{hc|# adduser|
Login name for new user []: '''archie'''
User ID ('UID') [ defaults to next available ]:
Initial group [ users ]:
Additional groups (comma separated) []: '''audio,video,storage,power,optical,lp,scanner,games'''
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 {{ic|Login name}}, {{ic|Additional groups}}, and leave the other fields empty.
The {{ic|Additional groups}} list from 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.
* '''video''' - for video tasks and hardware acceleration.
* '''storage''' - for managing storage devices.
* '''power''' - for allowing interactions with power options (e.g. shutdown with power button).
* '''optical''' - for managing tasks pertaining to the optical drive(s).
* '''lp''' - for managing printing tasks.
* '''scanner''' - for using a scanner.
* '''games''' - for write permission for games in the games group.
For additional information about listed and other groups, see [[Groups#User_groups|User groups]].
Now you will be presented with a preview of your new account, and the option to cancel or continue operations. After pressing {{Keypress|Enter}} 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.
==== Non-interactive method ====
# useradd -m -g users -G audio,video,storage,power,optical,lp,scanner,games -s /bin/bash archie
# passwd archie
To enter additional information, you can use the {{ic|chfn}} command.
==== Deleting the user account ====
In the event of an error, or if you wish to delete this user account in favor of a different name or for any other reason, use {{ic|userdel}}:
# userdel -r [username]
The {{ic|-r}} option will remove the user's home directory and its content, along with the the user's settings (the so-called "dot" files).
==== More information ====
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 {{ic|usermod(8)}} and {{ic|gpasswd(8)}}.<noinclude>
{{Beginners' Guide navigation}}</noinclude>

Revision as of 11:45, 16 February 2014