Difference between revisions of "Beginners' guide/Post-installation"

From ArchWiki
Jump to: navigation, search
(Test X)
m (Configure X: fixed link)
(36 intermediate revisions by 17 users not shown)
Line 2: Line 2:
 
[[Category:Getting and installing Arch]]
 
[[Category:Getting and installing Arch]]
 
[[Category:About Arch]]
 
[[Category:About Arch]]
 +
[[ar:Beginners' Guide/Post-installation]]
 
[[es:Beginners' Guide/Extra]]
 
[[es:Beginners' Guide/Extra]]
 
[[hr:Beginners' Guide/Extra]]
 
[[hr:Beginners' Guide/Extra]]
Line 9: Line 10:
 
[[ko:Beginners' Guide/Extra]]
 
[[ko:Beginners' Guide/Extra]]
 
[[pl:Beginners' Guide/Extra]]
 
[[pl:Beginners' Guide/Extra]]
 +
[[pt:Beginners' Guide/Extra]]
 
[[ro:Ghidul începătorilor/Extra]]
 
[[ro:Ghidul începătorilor/Extra]]
 
[[ru:Beginners' Guide/Extra]]
 
[[ru:Beginners' Guide/Extra]]
 
[[sr:Beginners' Guide/Extra]]
 
[[sr:Beginners' Guide/Extra]]
[[pt:Beginners' Guide/Extra]]
+
[[zh-CN:Beginners' Guide/Post-installation]]
[[zh-CN:Beginners' Guide/Extra]]
+
[[zh-TW:Beginners' Guide/Extra]]
 
{{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.}}
 
{{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.}}
 
</noinclude>
 
</noinclude>
== Extra ==
+
== 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 to be built into whatever you wish or require for your purposes.
  
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. Most people are interested in a desktop system, complete with sound and graphics: this part of the guide provides a brief overview of the procedures to acquire these extras.
+
=== User management ===
  
Go ahead and login with your user account.
+
Add any user accounts you require besides root, as described in [[Users and Groups#User management|User management]]. It is not good practice to use the root account for regular use, or expose it via [[SSH]] on a server. The root account should only be used for administrative tasks.
  
 
=== Package management ===
 
=== Package management ===
  
See [[pacman]] and [[FAQ#Package Management]] for answers regarding installing, updating, and managing packages.
+
Pacman is the Arch Linux '''pac'''kage '''man'''ager. See [[pacman]] and [[FAQ#Package Management]] for answers regarding installing, updating, and managing packages.
 +
 
 +
Because of [[The Arch Way#Code-correctness over convenience]] it is imperative to keep up to date with changes in Arch Linux that require manual intervention  '''before''' upgrading your system.
 +
Subscribe to the [https://mailman.archlinux.org/mailman/listinfo/arch-announce/ arch-announce mailing list] or check the front page [https://www.archlinux.org/ Arch news] every time before you update.  Alternatively, you may find it useful to subscribe to [https://www.archlinux.org/feeds/news/ this RSS feed] or follow [https://twitter.com/archlinux @archlinux] on Twitter.
 +
 
 +
If you installed Arch Linux x86_64, you may want to [[multilib|enable the [multilib] repository]] if you plan on using 32-bit applications.
 +
 
 +
See [[Official Repositories]] for details about the purpose of each repository.
  
 
=== Service management ===
 
=== Service management ===
Line 36: Line 45:
 
[[ALSA]] usually works out-of-the-box. It just needs to be unmuted. Install {{Pkg|alsa-utils}} (which contains {{ic|alsamixer}}) and follow [[Advanced Linux Sound Architecture#Unmuting the channels|these]] instructions.
 
[[ALSA]] usually works out-of-the-box. It just needs to be unmuted. Install {{Pkg|alsa-utils}} (which contains {{ic|alsamixer}}) and follow [[Advanced Linux Sound Architecture#Unmuting the channels|these]] instructions.
  
ALSA is included with the kernel and it is recommended to try it first. However, if it does not work, or if you are not satisfied with the quality, [[OSS]] is a viable alternative. If you have advanced audio requirements, take a look at [[Sound system]] for an overview of various articles.
+
ALSA is included with the kernel and it is recommended. If it does not work, [[OSS]] is a viable alternative. If you have advanced audio requirements, take a look at [[Sound system]] for an overview of various articles.
  
 
=== '''G'''raphical '''U'''ser '''I'''nterface ===
 
=== '''G'''raphical '''U'''ser '''I'''nterface ===
Line 46: Line 55:
 
To install the base [[Xorg]] packages:
 
To install the base [[Xorg]] packages:
  
  # pacman -S xorg-server xorg-xinit xorg-server-utils
+
  # pacman -S xorg-server xorg-server-utils xorg-xinit
  
 
Install [[Wikipedia:Mesa (computer graphics)|mesa]] for 3D support:
 
Install [[Wikipedia:Mesa (computer graphics)|mesa]] for 3D support:
Line 54: Line 63:
 
==== Install a video driver ====
 
==== Install a video driver ====
  
{{Note|If you installed Arch as a VirtualBox guest, you don't need to install a video driver. See [[VirtualBox#Arch Linux guests|Arch Linux guests]] for installing and setting up Guest Additions, and jump to the [[#Configure X|configuration]] part below.}}
+
{{Note|If you installed Arch as a VirtualBox guest, you do not need to install a video driver. See [[VirtualBox#Arch Linux guests|Arch Linux guests]] for installing and setting up Guest Additions, and jump to the [[#Configure X|configuration]] part below.}}
  
If you don't know which video chipset is available on your machine, run:
+
The Linux kernel includes open-source video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11.
 +
 
 +
If you do not know which video chipset is available on your machine, run:
  
 
  $ lspci | grep VGA
 
  $ lspci | grep VGA
Line 68: Line 79:
 
  # pacman -S xf86-video-vesa
 
  # pacman -S xf86-video-vesa
  
In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required:
+
In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required. See [[Xorg#Driver installation]] for a table of most frequently used video drivers.
 
+
{| class="wikitable"  style="text-align:center"
+
|-
+
! Brand !! Type !! Driver !! [[Multilib]] Package<br>(for 32-bit applications on Arch x86_64) !! Documentation
+
|-
+
| rowspan="2" bgcolor=#f7e3e3| '''<span style="color: #e62c2c;">AMD/ATI</span>'''
+
| Open source || {{Pkg|xf86-video-ati}} || {{Pkg|lib32-ati-dri}} || [[ATI]]
+
|-
+
| Proprietary || {{Pkg|catalyst-dkms}} || {{Pkg|lib32-catalyst-utils}} || [[AMD Catalyst]]
+
|-
+
| rowspan="2" bgcolor=#e3ecf7| '''<span style="color: #2a6dc8;">Intel</span>'''
+
| rowspan="2"| Open source
+
| {{Pkg|xf86-video-intel}} || {{Pkg|lib32-intel-dri}} || [[Intel Graphics]]
+
|-
+
| {{Pkg|xf86-video-i740}} || – || (legacy driver)
+
|-
+
| rowspan="3" bgcolor=#e3f7e6| '''<span style="color: #409044;">Nvidia</span>'''
+
| rowspan="2"| Open source
+
| {{Pkg|xf86-video-nouveau}}<br><span style="color: gray; font-size: 0.8em">(+ {{Pkg|nouveau-dri}} for 3D support)</span> || {{Pkg|lib32-nouveau-dri}} || [[Nouveau]]
+
|-
+
| {{Pkg|xf86-video-nv}} || – || (legacy driver)
+
|-
+
| Proprietary || {{Pkg|nvidia}} || {{Pkg|lib32-nvidia-utils}} || [[NVIDIA]]
+
|-
+
| bgcolor=#f7f2e3| '''<span style="color: #9a4e16;">SiS</span>'''
+
| Open source || {{Pkg|xf86-video-sis}}<br/>{{Pkg|xf86-video-sisimedia}}<br/>{{Pkg|xf86-video-sisusb}} || – || [[SiS]]
+
|}
+
  
 
==== Install input drivers ====
 
==== Install input drivers ====
Line 113: Line 97:
 
Xorg features auto-detection and therefore can function without an {{ic|xorg.conf}}. If you still wish to manually configure X Server, please see the [[Xorg]] wiki page.
 
Xorg features auto-detection and therefore can function without an {{ic|xorg.conf}}. If you still wish to manually configure X Server, please see the [[Xorg]] wiki page.
  
Here you may set a [[Xorg#Setting keyboard layout with hot-plugging|keyboard layout]] if you do not use a standard [[Wikipedia:File:KB United States-NoAltGr.svg|US]] keyboard.
+
You may need to [[Keyboard Configuration in Xorg|configure keyboard layout]] if you do not use a standard [[Wikipedia:File:KB United States-NoAltGr.svg|US]] keyboard.
  
 
{{Note|The {{ic|XkbLayout}} key may differ from the keymap code you used with the {{ic|loadkeys}} command. A list of many keyboard layouts and variants can be found in {{ic|/usr/share/X11/xkb/rules/base.lst}} (after the line beginning with {{ic|! layout}}). For instance, the layout {{ic|gb}} corresponds to "English (UK)", whereas for the console it was {{ic|loadkeys uk}}.}}
 
{{Note|The {{ic|XkbLayout}} key may differ from the keymap code you used with the {{ic|loadkeys}} command. A list of many keyboard layouts and variants can be found in {{ic|/usr/share/X11/xkb/rules/base.lst}} (after the line beginning with {{ic|! layout}}). For instance, the layout {{ic|gb}} corresponds to "English (UK)", whereas for the console it was {{ic|loadkeys uk}}.}}
  
==== 測試 X ====
+
==== Test X ====
  
{{提示|以下為非必需步驟。若您是第一次安裝 Arch Linux、或是將 Arch 安裝在不熟悉的硬體上時,建議做個測試。}}
+
{{Tip|These steps are optional. Test if you are installing Arch Linux for the first time, or if you are installing on new and unfamiliar hardware.}}
  
{{註記|如果您的輸入裝置在測試中不起作用,請從 {{Grp|xorg-drivers}} 群組安裝需要的驅動後再試一遍。完整的可用輸入驅動清單可從呼叫 pacman 搜尋得到 ({{Keypress|Q}} 離開)
+
{{Note|If your input devices are not working during this test, install the needed driver from the {{Grp|xorg-drivers}} group, and try again. For a complete list of available input drivers, invoke a pacman search (press {{ic|Q}} to exit):
  
 
  $ pacman -Ss xf86-input <nowiki>|</nowiki> less
 
  $ pacman -Ss xf86-input <nowiki>|</nowiki> less
  
若您不需要[[Wikipedia:Hot-plugging|熱插拔]]功能,只需安裝 {{Pkg|xf86-input-keyboard}} {{Pkg|xf86-input-mouse}},否則(建議)使用 {{ic|evdev}} 做為輸入驅動。}}
+
You only need {{Pkg|xf86-input-keyboard}} or {{Pkg|xf86-input-mouse}} if you plan on disabling [[Wikipedia:Hot-plugging|hot-plugging]], otherwise, {{ic|evdev}} will act as the input driver (recommended).}}
  
安裝預設環境:
+
Install the default environment:
  
 
  # pacman -S xorg-twm xorg-xclock xterm
 
  # pacman -S xorg-twm xorg-xclock xterm
  
若您在安裝 Xorg 前新增了非 root 的使用者帳號,該帳號的家目錄下會出現 {{ic|.xinitrc}} 模版檔,必須將它刪除或註解掉。若選擇刪除,'''X''' 將以上述安裝的預設環境啟動。
+
If Xorg was installed before creating the non-root user, there will be a template {{ic|.xinitrc}} file in your home directory that needs to be either deleted or commented out. Simply deleting it will cause '''X''' to run with the default environment installed above.
  
 
  $ rm ~/.xinitrc
 
  $ rm ~/.xinitrc
  
{{註記|當登入時,X 必須從同一台 tty 上執行,以保存 logind 階段。此由預設的 {{ic|/etc/X11/xinit/xserverrc}} 控制。}}
+
{{Note|X must always be run on the same tty where the login occurred, to preserve the logind session. This is handled by the default {{ic|/etc/X11/xinit/xserverrc}}.}}
  
執行下列指令,啟動(測試) Xorg 階段:
+
To start the (test) Xorg session, run:
  
 
  $ startx
 
  $ startx
  
螢幕將出現幾個可移動的視窗,且您的滑鼠應該可以使用。如果您認為 '''X''' 執行的可圈可點、沒有問題,可以在 '''X''' 下的終端機輸入 {{ic|exit}} 離開 '''X''' 環境,回到文字模式。
+
A few movable windows should show up, and your mouse should work. Once you are satisfied that '''X''' installation was a success, you may exit out of '''X''' by issuing the {{ic|exit}} command into the prompts until you return to the console.
  
 
  $ exit
 
  $ exit
  
若螢幕變成一片漆黑,可以試著切換到不同的虛擬終端機 ({{Keypress|Ctrl+Alt+F2}}),並以 root 身分登入(鍵入 "root"、按 {{Keypress|Enter}}、打入密碼後再按 {{Keypress|Enter}} 即可)
+
If the screen goes black, you may still attempt to switch to a different virtual console (e.g. {{ic|Ctrl+Alt+F2}}), and blindly log in as root. You can do this by typing "root" (press {{ic|Enter}} after typing it) and entering the root password (again, press {{ic|Enter}} after typing it).
  
您可以試著殺掉 '''X''' 伺服器程序:
+
You may also attempt to kill the '''X''' server with:
  
 
  # pkill X
 
  # pkill X
  
沒有作用的話就直接重啟系統:
+
If this does not work, reboot blindly with:
  
 
  # reboot
 
  # reboot
  
===== 疑難排解 =====
+
===== Troubleshooting =====
  
若發生任何問題,到 {{ic|Xorg.0.log}} 檢查錯誤。以 {{ic|(EE)}} 開頭的行位代表錯誤,以 {{ic|(WW)}} 開頭則代表警告,或許能提供一些問題發生的提示。
+
If a problem occurs, look for errors in {{ic|Xorg.0.log}}. Be on the lookout for any lines beginning with {{ic|(EE)}} which represent errors, and also {{ic|(WW)}} which are warnings that could indicate other issues.
  
 
  $ grep EE /var/log/Xorg.0.log
 
  $ grep EE /var/log/Xorg.0.log
  
若看過 [[Xorg]] 文章後仍無法解決問題,需要到 Arch Linux 論壇或 IRC 頻道尋求協助的話,記得安裝 {{Pkg|wgetpaste}},讓熱心的網友能透過連結了解您的問題:
+
If you are still having trouble after consulting the [[Xorg]] article and need assistance via the Arch Linux forums or the IRC channel, be sure to install and use {{Pkg|wgetpaste}} by providing the links from:
  
 
  # pacman -S wgetpaste
 
  # pacman -S wgetpaste
Line 168: Line 152:
 
  $ wgetpaste /var/log/Xorg.0.log
 
  $ wgetpaste /var/log/Xorg.0.log
  
{{註記|在網路上詢問問題時,請記得提供所有相關資訊 (硬體、驅動程式資訊等)}}
+
{{Note|Please provide all pertinent information (hardware, driver information, etc) when asking for assistance.}}
  
 
==== Fonts ====
 
==== Fonts ====
  
At this point, you may wish to install a set of TrueType fonts, as only unscalable bitmap fonts are included by default. DejaVu is a set of high quality, general-purpose fonts with good [[Wikipedia:Unicode|Unicode]] coverage:
+
You may wish to install a set of TrueType fonts, as only unscalable bitmap fonts are included by default. However, if you use a full featured [[Desktop Environment]] like [[KDE]] , this step may not be necessary. DejaVu is a set of high quality, general-purpose fonts with good [[Wikipedia:Unicode|Unicode]] coverage:
  
 
  # pacman -S ttf-dejavu
 
  # pacman -S ttf-dejavu
Line 188: Line 172:
 
* [[Desktop_Environment|Desktop Environments]] (DE) work atop and in conjunction with X, to provide a completely functional and dynamic GUI. A DE typically provides a window manager, icons, applets, windows, toolbars, folders, wallpapers, a suite of applications and abilities like drag and drop.
 
* [[Desktop_Environment|Desktop Environments]] (DE) work atop and in conjunction with X, to provide a completely functional and dynamic GUI. A DE typically provides a window manager, icons, applets, windows, toolbars, folders, wallpapers, a suite of applications and abilities like drag and drop.
  
Instead of starting X manually with {{ic|xorg-xinit}}, see [[Display Manager]] for instructions on using a display manager, or see [[Start X at Login]] for using an existing virtual terminal as an equivalent to a display manager.
+
Instead of starting X manually with {{ic|startx}} from {{Pkg|xorg-xinit}}, see [[Display Manager]] for instructions on using a display manager, or see [[Start X at Login]] for using an existing virtual terminal as an equivalent to a display manager.
  
 
== Appendix ==
 
== Appendix ==

Revision as of 19:00, 23 October 2013

Tip: This is part of a multi-page article for The Beginners' Guide. Click here if you would rather read the guide in its entirety.

Post-installation

Your new Arch Linux base system is now a functional GNU/Linux environment ready to be built into whatever you wish or require for your purposes.

User management

Add any user accounts you require besides root, as described in User management. It is not good practice to use the root account for regular use, or expose it via SSH on a server. The root account should only be used for administrative tasks.

Package management

Pacman is the Arch Linux package manager. See pacman and FAQ#Package Management for answers regarding installing, updating, and managing packages.

Because of The Arch Way#Code-correctness over convenience it is imperative to keep up to date with changes in Arch Linux that require manual intervention before upgrading your system. Subscribe to the arch-announce mailing list or check the front page Arch news every time before you update. Alternatively, you may find it useful to subscribe to this RSS feed or follow @archlinux on Twitter.

If you installed Arch Linux x86_64, you may want to enable the [multilib] repository if you plan on using 32-bit applications.

See Official Repositories for details about the purpose of each repository.

Service management

Arch Linux uses systemd as init, which is a system and service manager for Linux. For maintaining your Arch Linux installation, it is a good idea to learn the basics about it. Interaction with systemd is done through the systemctl command. Read systemd#Basic systemctl usage for more information.

Sound

ALSA usually works out-of-the-box. It just needs to be unmuted. Install alsa-utils (which contains alsamixer) and follow these instructions.

ALSA is included with the kernel and it is recommended. If it does not work, OSS is a viable alternative. If you have advanced audio requirements, take a look at Sound system for an overview of various articles.

Graphical User Interface

Install X

The X Window System (commonly X11, or 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).

To install the base Xorg packages:

# pacman -S xorg-server xorg-server-utils xorg-xinit

Install mesa for 3D support:

# pacman -S mesa

Install a video driver

Note: If you installed Arch as a VirtualBox guest, you do not need to install a video driver. See Arch Linux guests for installing and setting up Guest Additions, and jump to the configuration part below.

The Linux kernel includes open-source video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11.

If you do not know which video chipset is available on your machine, run:

$ lspci | grep VGA

For a complete list of open-source video drivers, search the package database:

$ pacman -Ss xf86-video | less

The vesa driver is a generic mode-setting driver that will work with almost every GPU, but will not provide any 2D or 3D acceleration. If a better driver cannot be found or fails to load, Xorg will fall back to vesa. To install it:

# pacman -S xf86-video-vesa

In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required. See Xorg#Driver installation for a table of most frequently used video drivers.

Install input drivers

Udev should be capable of detecting your hardware without problems. The evdev driver (xf86-input-evdev) is the modern hot-plugging input driver for almost all devices, so in most cases, installing input drivers is not needed. At this point, evdev has already been installed as a dependency of the xorg-server package.

Laptop users (or users with a tactile screen) will need the xf86-input-synaptics package for the touchpad/touchscreen to work:

# pacman -S xf86-input-synaptics

For instructions on fine tuning or troubleshooting touchpad issues, see the Touchpad Synaptics article.

Configure X

Warning: Proprietary drivers usually require a reboot after installation. See NVIDIA or AMD Catalyst for details.

Xorg features auto-detection and therefore can function without an xorg.conf. If you still wish to manually configure X Server, please see the Xorg wiki page.

You may need to configure keyboard layout if you do not use a standard US keyboard.

Note: The XkbLayout key may differ from the keymap code you used with the loadkeys command. A list of many keyboard layouts and variants can be found in /usr/share/X11/xkb/rules/base.lst (after the line beginning with ! layout). For instance, the layout gb corresponds to "English (UK)", whereas for the console it was loadkeys uk.

Test X

Tip: These steps are optional. Test if you are installing Arch Linux for the first time, or if you are installing on new and unfamiliar hardware.
Note: If your input devices are not working during this test, install the needed driver from the xorg-drivers group, and try again. For a complete list of available input drivers, invoke a pacman search (press Q to exit):
$ pacman -Ss xf86-input | less
You only need xf86-input-keyboard or xf86-input-mouse if you plan on disabling hot-plugging, otherwise, evdev will act as the input driver (recommended).

Install the default environment:

# pacman -S xorg-twm xorg-xclock xterm

If Xorg was installed before creating the non-root user, there will be a template .xinitrc file in your home directory that needs to be either deleted or commented out. Simply deleting it will cause X to run with the default environment installed above.

$ rm ~/.xinitrc
Note: X must always be run on the same tty where the login occurred, to preserve the logind session. This is handled by the default /etc/X11/xinit/xserverrc.

To start the (test) Xorg session, run:

$ startx

A few movable windows should show up, and your mouse should work. Once you are satisfied that X installation was a success, you may exit out of X by issuing the exit command into the prompts until you return to the console.

$ exit

If the screen goes black, you may still attempt to switch to a different virtual console (e.g. Ctrl+Alt+F2), and blindly log in as root. You can do this by typing "root" (press Enter after typing it) and entering the root password (again, press Enter after typing it).

You may also attempt to kill the X server with:

# pkill X

If this does not work, reboot blindly with:

# reboot
Troubleshooting

If a problem occurs, look for errors in Xorg.0.log. Be on the lookout for any lines beginning with (EE) which represent errors, and also (WW) which are warnings that could indicate other issues.

$ grep EE /var/log/Xorg.0.log

If you are still having trouble after consulting the Xorg article and need assistance via the Arch Linux forums or the IRC channel, be sure to install and use wgetpaste by providing the links from:

# pacman -S wgetpaste
$ wgetpaste ~/.xinitrc
$ wgetpaste /etc/X11/xorg.conf
$ wgetpaste /var/log/Xorg.0.log
Note: Please provide all pertinent information (hardware, driver information, etc) when asking for assistance.

Fonts

You may wish to install a set of TrueType fonts, as only unscalable bitmap fonts are included by default. However, if you use a full featured Desktop Environment like KDE , this step may not be necessary. DejaVu is a set of high quality, general-purpose fonts with good Unicode coverage:

# pacman -S ttf-dejavu

Refer to Font Configuration for how to configure font rendering and Fonts for font suggestions and installation instructions.

Choose and install a graphical interface

The X Window System provides the basic framework for building a graphical user interface (GUI).

Note: Choosing your DE or WM is a very subjective and personal decision. Choose the best environment for your needs. You can also build your own DE with just a WM and the applications of your choice.
  • Window Managers (WM) control the placement and appearance of application windows in conjunction with the X Window System.
  • Desktop Environments (DE) work atop and in conjunction with X, to provide a completely functional and dynamic GUI. A DE typically provides a window manager, icons, applets, windows, toolbars, folders, wallpapers, a suite of applications and abilities like drag and drop.

Instead of starting X manually with startx from xorg-xinit, see Display Manager for instructions on using a display manager, or see Start X at Login for using an existing virtual terminal as an equivalent to a display manager.

Appendix

For a list of applications that may be of interest, see List of Applications.

See General Recommendations for post-installation tutorials like setting up a touchpad or font rendering.

Template:Beginners' Guide navigation