https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mihi&feedformat=atom
ArchWiki - User contributions [en]
2024-03-29T14:44:51Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=Microsoft_Surface_Book_2&diff=562161
Microsoft Surface Book 2
2019-01-07T08:08:45Z
<p>Mihi: Fix broken link</p>
<hr />
<div>[[Category:Laptops]]<br />
[[ja:Microsoft Surface Book 2]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Intel || {{G|Working}} || xf86-video-intel<br />
|-<br />
| Nvidia || {{G|Working}} || nvidia ''or'' nvidia-dkms<br />
|-<br />
| Wireless || {{G|Working}} || mwifiex<br />
|-<br />
| Audio || {{G|Working}} || snd_hda_intel<br />
|-<br />
| Touchpad || {{G|Working}} || xf86-input-synaptics<br />
|-<br />
| Touchscreen || {{G|Working}} || intel_ipts<br />
|-<br />
| Camera || {{R|Not Working}} || <br />
|-<br />
| Card Reader || {{G|Working}} ||<br />
|-<br />
| Bluetooth || {{G|Working}}|| btusb<br />
|-<br />
| Battery Stats || {{G|Working}}|| <br />
|}<br />
<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on Microsoft Surface Book 2 devices.<br />
<br />
==Compatibility==<br />
<br />
The laptop works surprisingly well with Arch Linux, but requires a kernel with modules and updated drivers, [https://github.com/jakeday/linux-surface available on Github] or in an AUR package, {{AUR|linux-surface4}} or via a separately maintained [https://github.com/dmhacker/arch-linux-surface PKGBULD on Github] (whichever you choose, make sure to check that you'll get the latest version of the jakeday kernel {{AUR|linux-surface4}} seems to be a bit behind).<br />
<br />
===What works?===<br />
{{Note|Touchscreen only works in a Window Manager or Desktop Environment that has full support for it. It's recognized as a mouse click otherwise.}} <br />
* Touchscreen <br />
** Requires kernel with modules/drivers in link above.<br />
* Pen Input<br />
** Requires kernel with modules/drivers in link above.<br />
* Removal of keyboard base<br />
** A few seconds slower in Linux than in Windows<br />
** May cause touchscreen to stop working until reboot<br />
** May cause issues with dedicated graphics (if equipped)<br />
* Keyboard function and media keys, including volume and brightness adjustment of the keyboard and screen backlights.<br />
* Wireless Networking<br />
** May need a tweak from [[#WiFi]] if Wireless Networking hardware disconnects during use<br />
* Speakers / Headphones<br />
** Speakers sometimes have a hissing noise that can be fixed, details in [[#Audio]] <br />
* Dedicated Nvidia graphics (If equipped)<br />
* Hibernation<br />
** Only when the touchscreen is disabled, see [[#Hibernation]]<br />
* ACPI, Battery stats, power saving, etc.<br />
<br />
===What doesn't work?===<br />
<br />
* Cameras<br />
<br />
===Nvidia===<br />
<br />
The Nvidia 1050 and 1060 cards in the Surface Book 2 Performance Base are recognized by the kernel and supported by `nvidia` and `nvidia-dkms` drivers. Without the kernel ({{AUR|linux-surface4}}), there '''was''' a bug which causes it to be effectively useless because when a load is put on the Nvidia graphics hardware, it immediately and severely throttles down to around 139MHz. The reason, as reported by `nvidia-smi`, is software thermal throttling. The cause is that, apparently, the fan cannot be controlled automatically, nor through `nvidia-smi` or `nvidia-settings`, even when the nvidia xorg `Coolbits` option is set to 8.<br />
<br />
==UEFI Setup and Disabling Secure Boot==<br />
<br />
Disabling Secure Boot is not necessary, but makes things easier.<br />
<br />
Follow [https://support.microsoft.com/en-us/help/4023531 The manufacturer's directions] for accessing UEFI setup:<br />
<br />
# Shut down your Surface and wait about 10 seconds to be sure it is off.<br />
# Press and hold the volume-up button on your Surface, and, at the same time, press and release the power button.<br />
# When you see the Surface logo, release the volume-up button. The UEFI menu will appear within a few seconds.<br />
<br />
==Booting==<br />
<br />
The information in [[Boot loader]]s applies here. {{Pkg|refind-efi}} and [[Systemd-boot]] work well.<br />
<br />
===Boot from USB===<br />
<br />
Booting from USB is possible by reordering boot devices in the UEFI setup.<br />
<br />
==Graphics Drivers==<br />
<br />
The standard {{Pkg|xf86-video-intel}} driver works with the Surface Book devices.<br />
<br />
For devices equipped with dedicated Nvidia graphics, the {{Pkg|nvidia}} or {{Pkg|nvidia-dkms}} driver supports the dedicated GPU.<br />
<br />
==Audio==<br />
<br />
Surface Book 2 devices exhibit a hissing noise at times. This can be fixed by installing {{pkg|alsa-utils}} and running the following commands:<br />
<br />
amixer -c 0 sset 'Auto-Mute Mode' Disabled<br />
sudo alsactl store<br />
<br />
==WiFi==<br />
<br />
Since September 2018, Surface Book 2 WiFi may power off during use. When this happens, it is not visible in lspci and rebooting is a way to get it back on. However, this behavior can be prevented (temporarily) by installing {{pkg|iw}} and running the following command as root:<br />
<br />
# iw dev wlp1s0 set power_save off<br />
<br />
To permanently fix the issue with NetworkManager, add this to your [[NetworkManager]] config. (Such as /etc/NetworkManager/NetworkManager.conf)<br />
<br />
[connection]<br />
wifi.powersave = 2<br />
[device]<br />
wifi.scan-rand-mac-address=false<br />
<br />
==Console fonts==<br />
<br />
Because of the screen's resolution, the console font is barely readable - refer to [[Linux console#Fonts]] on how to change them.<br />
<br />
Using {{pkg|terminus-font}} with 32pt looks good on Surface Book 2 on the vconsole (add <code>FONT=ter-m32n</code> to <code>/etc/vconsole.conf</code> after installing).<br />
<br />
==Hibernation==<br />
<br />
Hibernation with the jakeday kernel only works when the touchscreen firmware loading is disabled (adding <code>i915.enable_guc=0</code> to the kernel parameters).</div>
Mihi
https://wiki.archlinux.org/index.php?title=Microsoft_Surface_Book_2&diff=562060
Microsoft Surface Book 2
2019-01-06T13:06:49Z
<p>Mihi: Typo</p>
<hr />
<div>[[Category:Laptops]]<br />
[[ja:Microsoft Surface Book 2]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Intel || {{G|Working}} || xf86-video-intel<br />
|-<br />
| Nvidia || {{G|Working}} || nvidia ''or'' nvidia-dkms<br />
|-<br />
| Wireless || {{G|Working}} || mwifiex<br />
|-<br />
| Audio || {{G|Working}} || snd_hda_intel<br />
|-<br />
| Touchpad || {{G|Working}} || xf86-input-synaptics<br />
|-<br />
| Touchscreen || {{G|Working}} || intel_ipts<br />
|-<br />
| Camera || {{R|Not Working}} || <br />
|-<br />
| Card Reader || {{G|Working}} ||<br />
|-<br />
| Bluetooth || {{G|Working}}|| btusb<br />
|-<br />
| Battery Stats || {{G|Working}}|| <br />
|}<br />
<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on Microsoft Surface Book 2 devices.<br />
<br />
==Compatibility==<br />
<br />
The laptop works surprisingly well with Arch Linux, but requires a kernel with modules and updated drivers, [https://github.com/jakeday/linux-surface available on Github] or in an AUR package, {{AUR|linux-surface4}} or via a separately maintained [https://github.com/dmhacker/arch-linux-surface PKGBULD on Github] (whichever you choose, make sure to check that you'll get the latest version of the jakeday kernel {{AUR|linux-surface4}} seems to be a bit behind).<br />
<br />
===What works?===<br />
{{Note|Touchscreen only works in a Window Manager or Desktop Environment that has full support for it. It's recognized as a mouse click otherwise.}} <br />
* Touchscreen <br />
** Requires kernel with modules/drivers in link above.<br />
* Pen Input<br />
** Requires kernel with modules/drivers in link above.<br />
* Removal of keyboard base<br />
** A few seconds slower in Linux than in Windows<br />
** May cause touchscreen to stop working until reboot<br />
** May cause issues with dedicated graphics (if equipped)<br />
* Keyboard function and media keys, including volume and brightness adjustment of the keyboard and screen backlights.<br />
* Wireless Networking<br />
** May need a tweak from [[#WiFi]] if Wireless Networking hardware disconnects during use<br />
* Speakers / Headphones<br />
** Speakers sometimes have a hissing noise that can be fixed, details in [[#Audio]] <br />
* Dedicated Nvidia graphics (If equipped)<br />
* Hibernation<br />
** Only when the touchscreen is disabled, see [[#Hibernation]]<br />
* ACPI, Battery stats, power saving, etc.<br />
<br />
===What doesn't work?===<br />
<br />
* Cameras<br />
<br />
===Nvidia===<br />
<br />
The Nvidia 1050 and 1060 cards in the Surface Book 2 Performance Base are recognized by the kernel and supported by `nvidia` and `nvidia-dkms` drivers. Without the kernel ({{AUR|linux-surface4}}), there '''was''' a bug which causes it to be effectively useless because when a load is put on the Nvidia graphics hardware, it immediately and severely throttles down to around 139MHz. The reason, as reported by `nvidia-smi`, is software thermal throttling. The cause is that, apparently, the fan cannot be controlled automatically, nor through `nvidia-smi` or `nvidia-settings`, even when the nvidia xorg `Coolbits` option is set to 8.<br />
<br />
==UEFI Setup and Disabling Secure Boot==<br />
<br />
Disabling Secure Boot is not necessary, but makes things easier.<br />
<br />
Follow [https://support.microsoft.com/en-us/help/4023531 The manufacturer's directions] for accessing UEFI setup:<br />
<br />
# Shut down your Surface and wait about 10 seconds to be sure it is off.<br />
# Press and hold the volume-up button on your Surface, and, at the same time, press and release the power button.<br />
# When you see the Surface logo, release the volume-up button. The UEFI menu will appear within a few seconds.<br />
<br />
==Booting==<br />
<br />
The information in [[Boot loader]]s applies here. {{Pkg|refind-efi}} and [[Systemd-boot]] work well.<br />
<br />
===Boot from USB===<br />
<br />
Booting from USB is possible by reordering boot devices in the UEFI setup.<br />
<br />
==Graphics Drivers==<br />
<br />
The standard {{Pkg|xf86-video-intel}} driver works with the Surface Book devices.<br />
<br />
For devices equipped with dedicated Nvidia graphics, the {{Pkg|nvidia}} or {{Pkg|nvidia-dkms}} driver supports the dedicated GPU.<br />
<br />
==Audio==<br />
<br />
Surface Book 2 devices exhibit a hissing noise at times. This can be fixed by installing {{pkg|alsa-utils}} and running the following commands:<br />
<br />
amixer -c 0 sset 'Auto-Mute Mode' Disabled<br />
sudo alsactl store<br />
<br />
==WiFi==<br />
<br />
Since September 2018, Surface Book 2 WiFi may power off during use. When this happens, it is not visible in lspci and rebooting is a way to get it back on. However, this behavior can be prevented (temporarily) by installing {{pkg|iw}} and running the following command as root:<br />
<br />
# iw dev wlp1s0 set power_save off<br />
<br />
To permanently fix the issue with NetworkManager, add this to your [[NetworkManager]] config. (Such as /etc/NetworkManager/NetworkManager.conf)<br />
<br />
[connection]<br />
wifi.powersave = 2<br />
[device]<br />
wifi.scan-rand-mac-address=false<br />
<br />
==Console fonts==<br />
<br />
Because of the screen's resolution, the console font is barely readable - refer to [[Linux_console#Fonts fonts]] on how to change them.<br />
<br />
Using {{pkg|terminus-font}} with 32pt looks good on Surface Book 2 on the vconsole (add <code>FONT=ter-m32n</code> to <code>/etc/vconsole.conf</code> after installing).<br />
<br />
==Hibernation==<br />
<br />
Hibernation with the jakeday kernel only works when the touchscreen firmware loading is disabled (adding <code>i915.enable_guc=0</code> to the kernel parameters).</div>
Mihi
https://wiki.archlinux.org/index.php?title=Microsoft_Surface_Book_2&diff=562059
Microsoft Surface Book 2
2019-01-06T13:06:24Z
<p>Mihi: Hibernation and touchscreen clarification</p>
<hr />
<div>[[Category:Laptops]]<br />
[[ja:Microsoft Surface Book 2]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Intel || {{G|Working}} || xf86-video-intel<br />
|-<br />
| Nvidia || {{G|Working}} || nvidia ''or'' nvidia-dkms<br />
|-<br />
| Wireless || {{G|Working}} || mwifiex<br />
|-<br />
| Audio || {{G|Working}} || snd_hda_intel<br />
|-<br />
| Touchpad || {{G|Working}} || xf86-input-synaptics<br />
|-<br />
| Touchscreen || {{G|Working}} || intel_ipts<br />
|-<br />
| Camera || {{R|Not Working}} || <br />
|-<br />
| Card Reader || {{G|Working}} ||<br />
|-<br />
| Bluetooth || {{G|Working}}|| btusb<br />
|-<br />
| Battery Stats || {{G|Working}}|| <br />
|}<br />
<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on Microsoft Surface Book 2 devices.<br />
<br />
==Compatibility==<br />
<br />
The laptop works surprisingly well with Arch Linux, but requires a kernel with modules and updated drivers, [https://github.com/jakeday/linux-surface available on Github] or in an AUR package, {{AUR|linux-surface4}} or via a separately maintained [https://github.com/dmhacker/arch-linux-surface PKGBULD on Github] (whichever you choose, make sure to check that you'll get the latest version of the jakeday kernel {{AUR|linux-surface4}} seems to be a bit behind).<br />
<br />
===What works?===<br />
{{Note|Touchscreen only works in a Window Manager or Desktop Environment that has full support for it. It's recognized as a mouse click otherwise.}} <br />
* Touchscreen <br />
** Requires kernel with modules/drivers in link above.<br />
* Pen Input<br />
** Requires kernel with modules/drivers in link above.<br />
* Removal of keyboard base<br />
** A few seconds slower in Linux than in Windows<br />
** May cause touchscreen to stop working until reboot<br />
** May cause issues with dedicated graphics (if equipped)<br />
* Keyboard function and media keys, including volume and brightness adjustment of the keyboard and screen backlights.<br />
* Wireless Networking<br />
** May need a tweak from [[#WiFi]] if Wireless Networking hardware disconnects during use<br />
* Speakers / Headphones<br />
** Speakers sometimes have a hissing noise that can be fixed, details in [[#Audio]] <br />
* Dedicated Nvidia graphics (If equipped)<br />
* Hibernation<br />
** Only when the touchscreen is disabled, see [[#Hiberation]]<br />
* ACPI, Battery stats, power saving, etc.<br />
<br />
===What doesn't work?===<br />
<br />
* Cameras<br />
<br />
===Nvidia===<br />
<br />
The Nvidia 1050 and 1060 cards in the Surface Book 2 Performance Base are recognized by the kernel and supported by `nvidia` and `nvidia-dkms` drivers. Without the kernel ({{AUR|linux-surface4}}), there '''was''' a bug which causes it to be effectively useless because when a load is put on the Nvidia graphics hardware, it immediately and severely throttles down to around 139MHz. The reason, as reported by `nvidia-smi`, is software thermal throttling. The cause is that, apparently, the fan cannot be controlled automatically, nor through `nvidia-smi` or `nvidia-settings`, even when the nvidia xorg `Coolbits` option is set to 8.<br />
<br />
==UEFI Setup and Disabling Secure Boot==<br />
<br />
Disabling Secure Boot is not necessary, but makes things easier.<br />
<br />
Follow [https://support.microsoft.com/en-us/help/4023531 The manufacturer's directions] for accessing UEFI setup:<br />
<br />
# Shut down your Surface and wait about 10 seconds to be sure it is off.<br />
# Press and hold the volume-up button on your Surface, and, at the same time, press and release the power button.<br />
# When you see the Surface logo, release the volume-up button. The UEFI menu will appear within a few seconds.<br />
<br />
==Booting==<br />
<br />
The information in [[Boot loader]]s applies here. {{Pkg|refind-efi}} and [[Systemd-boot]] work well.<br />
<br />
===Boot from USB===<br />
<br />
Booting from USB is possible by reordering boot devices in the UEFI setup.<br />
<br />
==Graphics Drivers==<br />
<br />
The standard {{Pkg|xf86-video-intel}} driver works with the Surface Book devices.<br />
<br />
For devices equipped with dedicated Nvidia graphics, the {{Pkg|nvidia}} or {{Pkg|nvidia-dkms}} driver supports the dedicated GPU.<br />
<br />
==Audio==<br />
<br />
Surface Book 2 devices exhibit a hissing noise at times. This can be fixed by installing {{pkg|alsa-utils}} and running the following commands:<br />
<br />
amixer -c 0 sset 'Auto-Mute Mode' Disabled<br />
sudo alsactl store<br />
<br />
==WiFi==<br />
<br />
Since September 2018, Surface Book 2 WiFi may power off during use. When this happens, it is not visible in lspci and rebooting is a way to get it back on. However, this behavior can be prevented (temporarily) by installing {{pkg|iw}} and running the following command as root:<br />
<br />
# iw dev wlp1s0 set power_save off<br />
<br />
To permanently fix the issue with NetworkManager, add this to your [[NetworkManager]] config. (Such as /etc/NetworkManager/NetworkManager.conf)<br />
<br />
[connection]<br />
wifi.powersave = 2<br />
[device]<br />
wifi.scan-rand-mac-address=false<br />
<br />
==Console fonts==<br />
<br />
Because of the screen's resolution, the console font is barely readable - refer to [[Linux_console#Fonts fonts]] on how to change them.<br />
<br />
Using {{pkg|terminus-font}} with 32pt looks good on Surface Book 2 on the vconsole (add <code>FONT=ter-m32n</code> to <code>/etc/vconsole.conf</code> after installing).<br />
<br />
==Hibernation==<br />
<br />
Hibernation with the jakeday kernel only works when the touchscreen firmware loading is disabled (adding <code>i915.enable_guc=0</code> to the kernel parameters).</div>
Mihi
https://wiki.archlinux.org/index.php?title=Microsoft_Surface_Book_2&diff=561893
Microsoft Surface Book 2
2019-01-05T15:27:47Z
<p>Mihi: Updated information for Jan 2019</p>
<hr />
<div>[[Category:Laptops]]<br />
[[ja:Microsoft Surface Book 2]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Intel || {{G|Working}} || xf86-video-intel<br />
|-<br />
| Nvidia || {{G|Working}} || nvidia ''or'' nvidia-dkms<br />
|-<br />
| Wireless || {{G|Working}} || mwifiex<br />
|-<br />
| Audio || {{G|Working}} || snd_hda_intel<br />
|-<br />
| Touchpad || {{G|Working}} || xf86-input-synaptics<br />
|-<br />
| Touchscreen || {{G|Working}} || intel_ipts<br />
|-<br />
| Camera || {{R|Not Working}} || <br />
|-<br />
| Card Reader || {{G|Working}} ||<br />
|-<br />
| Bluetooth || {{G|Working}}|| btusb<br />
|-<br />
| Battery Stats || {{G|Working}}|| <br />
|}<br />
<br />
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on Microsoft Surface Book 2 devices.<br />
<br />
==Compatibility==<br />
<br />
The laptop works surprisingly well with Arch Linux, but requires a kernel with modules and updated drivers, [https://github.com/jakeday/linux-surface available on Github] or in an AUR package, {{AUR|linux-surface4}} or via a separately maintained [https://github.com/dmhacker/arch-linux-surface PKGBULD on Github] (whichever you choose, make sure to check that you'll get the latest version of the jakeday kernel {{AUR|linux-surface4}} seems to be a bit behind).<br />
<br />
===What works?===<br />
{{Note|Touchscreen only works in a Window Manager or Desktop Environment that has full support for it. It's recognized as a mouse click otherwise.}} <br />
* Touchscreen <br />
** Requires kernel with modules/drivers in link above.<br />
* Pen Input<br />
** Requires kernel with modules/drivers in link above.<br />
* Removal of keyboard base<br />
** A few seconds slower in Linux than in Windows<br />
** May cause touchscreen to stop working until reboot<br />
** May cause issues with dedicated graphics (if equipped)<br />
* Keyboard function and media keys, including volume and brightness adjustment of the keyboard and screen backlights.<br />
* Wireless Networking<br />
** May need a tweak from [[#WiFi]] if Wireless Networking hardware disconnects during use<br />
* Speakers / Headphones<br />
** Speakers sometimes have a hissing noise that can be fixed, details in [[#Audio]] <br />
* Dedicated Nvidia graphics (If equipped)<br />
** With big caveats, detailed below.<br />
<br />
===What doesn't work?===<br />
<br />
* Cameras<br />
* Battery Stats<br />
* Nvidia card is thermally throttled and the fan speed defaults to read-only zero keeping the throttle extremely low.<br />
<br />
===Nvidia===<br />
<br />
The following paragraph might not be up to date with recent jakeday kernel version (ie, there are no more problems with Nvidia cards). If you still run into the issues described below, make sure to get an updated version of the patched kernel.<br />
<br />
The Nvidia 1050 and 1060 cards in the Surface Book 2 Performance Base are recognized by the kernel and supported by `nvidia` and `nvidia-dkms` drivers. Without the kernel ({{AUR|linux-surface4}}), there was a bug which causes it to be effectively useless because when a load is put on the Nvidia graphics hardware, it immediately and severely throttles down to around 139MHz. The reason, as reported by `nvidia-smi`, is software thermal throttling. The cause is that, apparently, the fan cannot be controlled automatically, nor through `nvidia-smi` or `nvidia-settings`, even when the nvidia xorg `Coolbits` option is set to 8.<br />
<br />
==UEFI Setup and Disabling Secure Boot==<br />
<br />
Disabling Secure Boot is not necessary, but makes things easier.<br />
<br />
Follow [https://support.microsoft.com/en-us/help/4023531 The manufacturer's directions] for accessing UEFI setup:<br />
<br />
# Shut down your Surface and wait about 10 seconds to be sure it is off.<br />
# Press and hold the volume-up button on your Surface, and, at the same time, press and release the power button.<br />
# When you see the Surface logo, release the volume-up button. The UEFI menu will appear within a few seconds.<br />
<br />
==Booting==<br />
<br />
The information in [[Boot loader]]s applies here. {{Pkg|refind-efi}} and [[Systemd-boot]] work well.<br />
<br />
===Boot from USB===<br />
<br />
Booting from USB is possible by reordering boot devices in the UEFI setup.<br />
<br />
==Graphics Drivers==<br />
<br />
The standard {{Pkg|xf86-video-intel}} driver works with the Surface Book devices.<br />
<br />
For devices equipped with dedicated Nvidia graphics, the {{Pkg|nvidia}} or {{Pkg|nvidia-dkms}} driver supports the dedicated GPU.<br />
<br />
==Audio==<br />
<br />
Surface Book 2 devices exhibit a hissing noise at times. This can be fixed by installing {{pkg|alsa-utils}} and running the following commands:<br />
<br />
amixer -c 0 sset 'Auto-Mute Mode' Disabled<br />
sudo alsactl store<br />
<br />
==WiFi==<br />
<br />
Since September 2018, Surface Book 2 WiFi may power off during use. When this happens, it is not visible in lspci and rebooting is a way to get it back on. However, this behavior can be prevented (temporarily) by installing {{pkg|iw}} and running the following command as root:<br />
<br />
# iw dev wlp1s0 set power_save off<br />
<br />
To permanently fix the issue with NetworkManager, add this to your [[NetworkManager]] config. (Such as /etc/NetworkManager/NetworkManager.conf)<br />
<br />
[connection]<br />
wifi.powersave = 2<br />
[device]<br />
wifi.scan-rand-mac-address=false<br />
<br />
==Console fonts==<br />
<br />
Because of the screen's resolution, the console font is barely readable - refer to [[Linux_console#Fonts fonts]] on how to change them.<br />
<br />
Installing terminus fonts with 32pt looks good on Surface Book 2 on the vconsole.</div>
Mihi
https://wiki.archlinux.org/index.php?title=Tmux&diff=189554
Tmux
2012-03-15T09:56:57Z
<p>Mihi: Fixed historylimit (to history-limit). Added example of how to correctly bind the split commands preserving the current working directory.</p>
<hr />
<div>{{i18n|Tmux}}<br />
[[Category:Software (English)]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|This article explains how to install and configure tmux.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|GNU Screen}}<br />
{{Article summary end}}<br />
<br />
[http://tmux.sourceforge.net/ Tmux] is a "terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached." <br />
<br />
Tmux is notable as a BSD-licensed alternative to [[Screen Tips|GNU Screen]]. Although similar, there are many differences between the programs, as noted on the [http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/FAQ tmux FAQ page]. Most notably, tmux is currently under active development, in contrast to screen, which has not had a stable release since August 8, 2008.<br />
<br />
==Install==<br />
A stable version of tmux may be installed using [[pacman]]:<br />
# pacman -S tmux<br />
Alternatively, [https://aur.archlinux.org/packages.php?ID=35618 tmux-git] is available from the [[AUR]].<br />
<br />
==Configure==<br />
A user-specific configuration file should be located at {{ic|~/.tmux.conf}}, while a global configuration file should be located at {{ic|/etc/tmux.conf}}. Default configuration files can be found in {{Ic|/usr/share/tmux/}}. <br />
<br />
===Key bindings===<br />
{| style="float:right;border:1px #cccccc solid;margin:5px;padding:5px;width:200px;"<br />
|+ ''Prefix all commands with'' {{Ic|Ctrl-b}}<br />
!Cmd<br />
!Action<br />
|-<br />
|c<br />
|Create a new window<br />
|-<br />
|n<br />
|Change to next window<br />
|-<br />
|p<br />
|Change to previous window<br />
|-<br />
|"<br />
|Split pane horizontally<br />
|-<br />
|%<br />
|Split pane vertically<br />
|-<br />
|,<br />
|Rename current window<br />
|-<br />
|o<br />
|Move to next pane<br />
|}<br />
<br />
By default, command key bindings are prefixed by Ctrl-b. For example, to vertically split a window type {{Ic|Ctrl-b %}}.<br />
<br />
After splitting a window into multiple panes, you can resize a pane by the hitting prefix key (i.e. {{Ic|Ctrl-b}}) and, while continuing to hold Ctrl, press Left/Right/Up/Down. Swapping panes is achieved in the same manner, but by hitting ''o'' instead of a directional key.<br />
<br />
{{Tip|To mimic screen key bindings copy {{ic|/usr/share/tmux/screen-keys.conf}} to either of the configuration locations.}}<br />
<br />
Key bindings may be changed with the bind and unbind commands in {{ic|tmux.conf}}. For example, you can change the prefix key (i.e. {{Ic|Ctrl-b}}) to {{Ic|Ctrl-a}} by adding the following commands in your configuration file:<br />
{{bc|<br />
unbind C-b<br />
set -g prefix C-a<br />
}}<br />
<br />
Additional ways to move between windows include:<br />
Ctrl-b l (Move to the previously selected window)<br />
Ctrl-b w (List all windows / window numbers)<br />
Ctrl-b <window number> (Move to the specified window number, the default bindings are from 0 – 9)<br />
Ctrl-b q (Show pane numbers, when the numbers show up type the key to goto that pane)<br />
<br />
What if you have 10+ windows open? Tmux has a find-window option & keybinding. <br />
Ctrl-b f <window name> (Search for window name)<br />
Ctrl-b w (Select from interactive list of windows)<br />
<br />
===Browsing URL's===<br />
To browse URL's inside tmux you must have urlview installed and configured:<br />
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; run-shell "$TERMINAL -e 'cat /tmp/tmux-buffer | urlview'"<br />
<br />
=== Setting the correct term===<br />
If you are using a 256 colour terminal, you will need to set the correct term in tmux. You can do this in either the {{ic|tmux.conf}}:<br />
<br />
set -g default-terminal "screen-256color" <br />
<br />
or in your {{ic|.bashrc}} with a test like:<br />
<br />
# for tmux: export 256color<br />
[ -n "$TMUX" ] && export TERM=screen-256color<br />
<br />
If you enable xterm-keys in your {{ic|tmux.conf}}, then you need to build a custom terminfo to declare the new escape codes or applications will not know about them. Compile the following with {{ic|tic}} and you can use "xterm-screen-256color" as your TERM:<br />
<br />
# A screen- based TERMINFO that declares the escape sequences<br />
# enabled by the tmux config "set-window-option -g xterm-keys".<br />
#<br />
# Prefix the name with xterm- since some applications inspect<br />
# the TERM *name* in addition to the terminal capabilities advertised.<br />
xterm-screen-256color|GNU Screen with 256 colors bce and tmux xterm-keys,<br />
<br />
# As of Nov'11, the below keys are picked up by<br />
# .../tmux/blob/master/trunk/xterm-keys.c:<br />
kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H,<br />
kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~,<br />
kRIT=\E[1;2C,<br />
<br />
# Change this to screen-256color if the terminal you run tmux in<br />
# doesn't support bce:<br />
use=screen-256color-bce,<br />
<br />
=== Other Settings ===<br />
Set scrollback to 10000 lines with <br />
set -g history-limit 10000<br />
<br />
==Session initialization==<br />
You can have tmux open a session with preloaded windows by including those details in your {{ic|~/.tmux.conf}}:<br />
<br />
new -n WindowName Command<br />
neww -n WindowName Command<br />
neww -n WindowName Command<br />
<br />
To start a session with split windows (multiple panes), include the splitw command below the neww you would like to split; thus:<br />
<br />
new -s SessionName -n WindowName Command<br />
neww -n foo/bar foo<br />
splitw -v -p 50 -t 0 bar<br />
selectw -t 1 <br />
selectp -t 0<br />
<br />
would open 2 windows, the second of which would be named foo/bar and would be split vertically in half (50%) with foo running above bar. Focus would be in window 2 (foo/bar), top pane (foo).<br />
<br />
{{Note|Numbering for sessions, windows and panes starts at zero, unless you have specified a base-index of 1 in your {{ic|.conf}} }}<br />
<br />
To manage multiple sessions, source separate session files from your conf file:<br />
<br />
# initialize sessions<br />
bind F source-file ~/.tmux/foo<br />
bind B source-file ~/.tmux/bar<br />
<br />
==Scrolling issues==<br />
If you have issues scrolling with Shift-PageUp/Shift-PageDown in your terminal, try this:<br />
<br />
set -g terminal-overrides 'xterm*:smcup@:rmcup@'<br />
<br />
==ICCCM Selection Integration==<br />
It is possible to copy a tmux paste buffer to an ICCCM selection, and vice-versa, by defining a shell command which interfaces tmux with an X11 selection interface. The following tmux config file snippet effectively integrates {{Ic|CLIPBOARD}} with the current tmux paste buffer using xclip:<br />
<br />
{{hc|~/.tmux.conf|<br />
...<br />
##CLIPBOARD selection integration<br />
##Requires prefix key before the command key<br />
#Copy tmux paste buffer to CLIPBOARD<br />
bind C-c run "tmux show-buffer <nowiki>|</nowiki> xclip -i -selection clipboard"<br />
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer<br />
bind C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"<br />
}}<br />
<br />
If you get an output similar to {{ic| \346\227\245\346\234\254\350\252\236\343\201\247 }} when pasting utf-8 characters, try changing this line:<br />
{{bc|bind C-c run "tmux show-buffer <nowiki>|</nowiki> xclip -i -selection clipboard"}}<br />
to this:<br />
{{bc|bind C-p run "tmux save-buffer - <nowiki>|</nowiki> xclip -i -selection clipboard"}}<br />
<br />
==Tips & Tricks==<br />
<br />
===Start tmux in urxvt===<br />
Use this command to start urxvt with a started tmux session. I use this with the exec command from my .ratpoisonrc file.<br />
{{bc|<nowiki>urxvt -e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n$USER -s$USER@$HOSTNAME"</nowiki>}}<br />
<br />
===Start tmux on every shell login===<br />
<br />
Simply add the following line of bash code to your .bashrc before your aliases; the code for other shells is very similar:<br />
{{bc|<nowiki>[[ $TERM != "screen" ]] && tmux && exit</nowiki>}}<br />
<br />
{{hc|~/.bashrc|<nowiki># If not running interactively, do not do anything<br />
[[ $- != *i* ]] && return<br />
[[ $TERM != "screen" ]] && tmux && exit</nowiki>}}<br />
<br />
{{note|At first you may read screen as if we were using screen and not tmux, but tmux also uses screen for the TERM enviroment variable.}}<br />
<br />
This snippet does the same thing, but also checks tmux is installed before trying to launch it. It also tries to reattach you to an existing tmux session at logout, so that you can shut down every tmux session quickly from the same terminal at logout.<br />
{{bc|<nowiki># TMUX<br />
if which tmux 2>&1 >/dev/null; then<br />
# if no session is started, start a new session<br />
test -z ${TMUX} && tmux<br />
<br />
# when quitting tmux, try to attach<br />
while test -z ${TMUX}; do<br />
tmux attach || break<br />
done<br />
fi</nowiki>}}<br />
<br />
{{note|Instead of using the bashrc file, you can launch tmux when you start your terminal emulator. (i. e. urxvt -e tmux)}}<br />
<br />
===Split window and retain current directory===<br />
<br />
{{Note|1=With [http://tmux.svn.sourceforge.net/viewvc/tmux?view=revision&revision=2647 revision 2647] this behavior became standard.}}<br />
<br />
====Fast method====<br />
<br />
{{Note|If you have set default-path to something for another convince; it will be reset to ~/}}<br />
<br />
This command simply sets the default-path to your current path, splits the window, and resets it to your home directory. Can be easily bound to a key if you wish.<br />
<br />
tmux set default-path $(pwd) \; split-window\; set default-path ~/<br />
<br />
To bind it to | and - respectively:<br />
<br />
bind - set default-path $PWD \; split-window\; set default-path ~/<br />
bind | set default-path $PWD \; split-window -v\; set default-path ~/<br />
<br />
====cd method====<br />
<br />
{{Note|This trick tries to inject a key into your session, which only works if it is at a command prompt (i. e. fails within a program like vim, emacs, …).}}<br />
<br />
Create a excutable file as follows, for example {{ic|~/.scripts/tmux-split}}:<br />
<br />
#!/usr/bin/env bash<br />
PWD=`pwd`<br />
tmux split-window $1<br />
tmux send-keys " cd $PWD;clear"<br />
tmux send-keys "Enter"<br />
<br />
and change the configure from:<br />
<br />
bind v split-window -h<br />
bind n split-window -v<br />
<br />
to<br />
<br />
bind v send-keys " ~/mbin/split-tmux -h" \; send-keys "Enter"<br />
bind n send-keys " ~/mbin/split-tmux -v" \; send-keys "Enter"<br />
<br />
====/proc method====<br />
<br />
{{Note|This script, [http://chneukirchen.org/dotfiles/bin/tmux-neww-in-cwd borrowed from] Christian Neukirchen, reads the present pane's CWD from {{Ic|/proc/[pane's top program's $PID]/cwd}}. Some shells like zsh will not always properly update that entry.}}<br />
<br />
Pasted into e. g. {{ic|~/.scripts/tmux-split-in-cwd}}:<br />
<br />
#!/bin/sh<br />
# tmux-split-in-cwd - open a new shell with same cwd as calling pane<br />
<br />
SIP=$(tmux display-message -p "#S:#I:#P")<br />
PTY=$(tmux server-info |<br />
egrep flags=\|bytes |<br />
awk '/windows/ { s = $2 }<br />
/references/ { i = $1 }<br />
/bytes/ { print s i $1 $2 } ' |<br />
grep "$SIP" |<br />
cut -d: -f4)<br />
PTS=${PTY#/dev/}<br />
PID=$(ps -eao pid,tty,command --forest | awk '$2 == "'$PTS'" {print $1; exit}')<br />
DIR=$(readlink /proc/$PID/cwd)<br />
<br />
case "$1" in<br />
h) tmux splitw -h "cd '$DIR'; $SHELL"<br />
;;<br />
v) tmux splitw -v "cd '$DIR'; $SHELL"<br />
;;<br />
*) tmux neww "cd '$DIR'; $SHELL"<br />
;;<br />
esac<br />
<br />
{{ic|~/.tmux.conf}} could thus contain:<br />
<br />
bind | run '~/.scripts/tmux-split-in-cwd h' # horizontal split in cwd<br />
bind _ run '~/.scripts/tmux-split-in-cwd v' # vertical split in cwd<br />
bind m run '~/.scripts/tmux-split-in-cwd' # new window in cwd<br />
<br />
===Use tmux windows like tabs===<br />
<br />
The following settings added to {{ic|~/.tmux.conf}} allow to use tmux windows like tabs, such as those provided by the reference of these hotkeys — [[rxvt-unicode#urxvtq_with_tabbing|urxvt's tabbing extensions]]. An advantage thereof is that these virtual “tabs” are independent of the terminal emulator.<br />
<br />
#urxvt tab like window switching (-n: no prior escape seq)<br />
bind -n S-down new-window<br />
bind -n S-left prev<br />
bind -n S-right next<br />
bind -n C-left swap-window -t -1<br />
bind -n C-right swap-window -t +1<br />
<br />
Of course, those should not overlap with other applications' hotkeys, such as the terminal's. Given that they substitute terminal tabbing that might as well be deactivated, though.<br />
<br />
It can also come handy to supplement the EOT hotkey {{Keypress|Ctrl}}+{{Keypress|d}} with one for tmux's detach:<br />
<br />
bind-key -n C-j detach<br />
<br />
===Clients simultaneously interacting with various windows of a session===<br />
<br />
In “[http://mutelight.org/articles/practical-tmux Practical Tmux]”, Brandur Leach writes:<br />
<br />
{{Box||Screen and tmux's behaviour for when multiple clients are attached to one session differs slightly. In Screen, each client can be connected to the session but view different windows within it, but in tmux, all clients connected to one session must view the same window.<br />
<br />
This problem can be solved in tmux by spawning two separate sessions and synchronizing the second one to the windows of the first, then pointing a second new session to the first.<br />
<br />
However, this usage of tmux results in the problem that detaching from these mirrored sessions will start to litter your system with defunct sessions which can only be cleaned up with some pretty extreme micromanagement.}}<br />
<br />
{{Note|Since tmux 1.4 mirrored sessions may be set to auto-destroy with the {{Ic|destroy-unattached}} session option}}<br />
<br />
To avoid these issues he wrote the script “{{Ic|tmx}}” — the version below is slightly modified to execute “{{Ic|tmux new-window}}” if “1” is its second parameter. Invoked as {{Ic|tmx <base session name> [1]}} it launches the base session if necessary. Otherwise it will kill any “zombie” sessions, launch a new “client” session linked to the base, optionally add a new window and attach. Then it waits for detachment and kills its session.<br />
<br />
{{hc|tmx|2=<nowiki><br />
#!/bin/bash<br />
<br />
#<br />
# Modified TMUX start script from:<br />
# http://forums.gentoo.org/viewtopic-t-836006-start-0.html<br />
#<br />
# Store it to `~/bin/tmx` and issue `chmod +x`.<br />
#<br />
<br />
# Works because bash automatically trims by assigning to variables and by <br />
# passing arguments<br />
trim() { echo $1; }<br />
<br />
if [[ -z "$1" ]]; then<br />
echo "Specify session name as the first argument"<br />
exit<br />
fi<br />
<br />
# Only because I often issue `ls` to this script by accident<br />
if [[ "$1" == "ls" ]]; then<br />
tmux ls<br />
exit<br />
fi<br />
<br />
base_session="$1"<br />
# This actually works without the trim() on all systems except OSX<br />
tmux_nb=$(trim `tmux ls | grep "^$base_session" | wc -l`)<br />
if [[ "$tmux_nb" == "0" ]]; then<br />
echo "Launching tmux base session $base_session ..."<br />
tmux new-session -s $base_session<br />
else<br />
# Make sure we are not already in a tmux session<br />
if [[ -z "$TMUX" ]]; then<br />
# Kill defunct sessions first<br />
old_sessions=$(tmux ls 2>/dev/null | egrep "^[0-9]{14}.*[0-9]+\)$" | cut -f 1 -d:)<br />
for old_session_id in $old_sessions; do<br />
tmux kill-session -t $old_session_id<br />
done<br />
<br />
echo "Launching copy of base session $base_session ..."<br />
# Session is is date and time to prevent conflict<br />
session_id=`date +%Y%m%d%H%M%S`<br />
# Create a new session (without attaching it) and link to base session <br />
# to share windows<br />
tmux new-session -d -t $base_session -s $session_id<br />
if [[ "$2" == "1" ]]; then<br />
# Create a new window in that session<br />
tmux new-window<br />
fi<br />
# Attach to the new session<br />
tmux attach-session -t $session_id<br />
# When we detach from it, kill the session<br />
tmux kill-session -t $session_id<br />
fi<br />
fi<br />
</nowiki>}}<br />
<br />
A useful setting for this is<br />
<br />
setw -g aggressive-resize on<br />
<br />
added to {{ic|~/.tmux.conf}}. It causes tmux to resize a window based on the smallest client actually viewing it, not on the smallest one attached to the entire session.<br />
<br />
===Changing the configuration with tmux started===<br />
<br />
By default tmux reads {{ic|~/.tmux.conf}} only if it was not already running. To have tmux load a configuration file afterwards, execute:<br />
<br />
tmux source-file <path><br />
<br />
This can be added to {{ic|~/.tmux.conf}} as e. g.:<br />
<br />
bind r source-file <path><br />
<br />
===Template script to run program in new session resp. attach to existing one===<br />
<br />
This script checks for a program presumed to have been started by a previous run of itself. Unless found it creates a new tmux session and attaches to a window named after and running the program. If however the program was found it merely attaches to the session and selects the window.<br />
<br />
#!/bin/bash<br />
<br />
PID=$(pidof $1)<br />
<br />
if [ -z "$PID" ]; then<br />
tmux new-session -d -s main ;<br />
tmux new-window -t main -n $1 "$*" ;<br />
fi<br />
tmux attach-session -d -t main ;<br />
tmux select-window -t $1 ;<br />
exit 0<br />
<br />
A derived version to run ''irssi'' with the ''nicklist'' plugin can be found on [[Irssi#irssi_with_nicklist_in_tmux|its ArchWiki page]].<br />
<br />
== See also ==<br />
* [http://mutelight.org/articles/practical-tmux Practical Tmux] by Brandur Leach, providing a number of configuration tips<br />
* [http://www.openbsd.org/faq/faq7.html#tmux Tmux tutorial] section from the OpenBSD FAQ<br />
* [http://www.dayid.org/os/notes/tm.html Screen and tmux feature comparison] page by Dayid Alan<br />
* [http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/ Tmux tutorial Part 1] & [http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2 Part 2] blog posts on Hawk Host<br />
<br />
'''Forum threads'''<br />
* 2009-11-06 - Arch Linux - [https://bbs.archlinux.org/viewtopic.php?id=84157&p=1 Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found]</div>
Mihi
https://wiki.archlinux.org/index.php?title=VMware/Install_Arch_Linux_as_a_guest&diff=112619
VMware/Install Arch Linux as a guest
2010-07-25T11:24:03Z
<p>Mihi: Added solution for slow/unresponsive and flickering mouse in vmware.</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:Emulators (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Installing Arch Linux in VMWare}}<br />
{{out of date}}<br />
<br />
Installing Arch Linux inside a VM (e.g. in VMware running on Windows or using VMware fusion on MacOSX) works without trouble.<br />
<br />
Removing the pata and sata hooks from /etc/mkinitcpio.conf does not cause problems. VMWare emulates an scsi drive (an ancestor of sata).<br />
<br />
You may also be interested in [[VMware|installing VMware in Arch]].<br />
<br />
== VM Tools ==<br />
The VM Tools improve networking capability, cut and paste between the host and the guest under X, or access of the directories on host from the guest (called shared folders by vm ware)<br />
<br />
Install the open-vm-tools package from community<br />
pacman -S open-vm-tools<br />
and start VMware tools with:<br />
/etc/rc.d/open-vm-tools start<br />
<br />
To start them automatically at boot, add the deamon to your /etc/rc.conf daemon array<br />
DAEMONS=( ... open-vm-tools ... )<br />
<br />
== Installing X ==<br />
<br />
Beyond installing Xorg (see main article [[Xorg]]), the packages needed in order to be able to use X properly can be installed with<br />
# pacman -S xf86-input-vmmouse xf86-video-vmware<br />
and the fallback X drivers<br />
# pacman -S xf86-video-vesa<br />
<br />
Modern versions of Xorg are automatically configured. If you are using a manual configuration, set the mouse driver to "vmmouse".<br />
<br />
A client software needs to run in order for cut and paste to work, start vmware-user (it should not run as root) on login by either adding the line<br />
vmware-user&<br />
<br />
to .xinitrc or .xsession for startx or by adding the following file $HOME/.config/autostart/vmware-user.desktop<br />
[Desktop Entry]<br />
Type=Application<br />
Name=VMWare User Agent<br />
Exec=vmware-user<br />
Icon=system-run<br />
Comment=Enable Unity, DnD, etc.<br />
for e.g. gdm. Note as well that you need to install gtkmm and libnotify for vmware-user to run.<br />
<br />
''Note: If after executing '''vmware-user''' you get the following error:''<br />
vmware-user: error while loading shared libraries: libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory<br />
''You need to install gtkmm''<br />
# pacman -S gtkmm<br />
<br />
== Enable Unity ==<br />
<br />
Unity is not install by default. However, it works very well. To enable support for unity, you need to use the Arch Building System (see main article [[ABS]]).<br />
<br />
Install uriparser:<br />
<br />
# pacman -S uriparser<br />
<br />
Then modify the two packages '''open-vm-tools-modules''' and '''open-vm-tools''' available from /var/abs/community and remove --disable-unity from the configure line in the PKGBUILD file. You may need install these packages before compiling them<br />
# pacman -S kernel26-headers xorg libxss gtk2 gtkmm<br />
Then recompile them, starting with the modules, install with <br />
$ makepkg -s<br />
# pacman -U --asdeps open-vm-modules-*.pkg.tar.gz<br />
and finally the tools, install with<br />
$ makepkg -s<br />
# pacman -U open-vm-tools-*.pkg.tar.gz<br />
<br />
Reboot, Unity should be enabled once vmware-user is running.<br />
<br />
== Shared Folders with the Host ==<br />
<br />
Create a new Shared Folder by selecting '''VM -> Settings...''' from the VMware Workstation menu. Select the '''Options''' tab and then '''Shared Folder'''. Check the '''Always enabled''' option and create a new share. For Windows XP you can create a share with the Name '''C''' and the Host Path '''C:\'''.<br />
<br />
Then add the following line to you '''/etc/fstab''' file (changing uid/gid as needed):<br />
<br />
.host:/ /mnt/hgfs vmhgfs defaults,user,ttl=5,uid=root,gid=root,fmask=0133,dmask=0022 0 0<br />
<br />
Make the mount directory and mount the Shared Folders:<br />
<br />
mkdir /mnt/hgfs<br />
mount /mnt/hgfs<br />
<br />
All of your shared folders will now be visible by name under /mnt/hgfs<br />
<br />
/mnt/hgfs/<Shared Folder Name><br />
<br />
For the Windows XP '''C''' share example:<br />
<br />
ls /mnt/hgfs/C<br />
... all your Windows files under C:\ ...<br />
<br />
== Final touch ==<br />
<br />
=== A more suitable cron ===<br />
<br />
The arch guest is most likely neither running the whole time nor rebooted often. The default crond is therefore inappropriate. Change crond for incron<br />
# pacman -S incron<br />
and edit the system crontab so that it looks like<br />
!mail(no)<br />
@ 1h /usr/sbin/run-cron /etc/cron.hourly<br />
@ 1d /usr/sbin/run-cron /etc/cron.daily<br />
@ 1w /usr/sbin/run-cron /etc/cron.weekly<br />
@ 1m /usr/sbin/run-cron /etc/cron.monthly<br />
<br />
=== Prune mlocate DB ===<br />
<br />
It is also useless to add the shared directories to the locate DB. Add the shared directories to PRUNEPATHS in /etc/updatedb<br />
<br />
== Paravirtualization ==<br />
<br />
[[wikipedia:Paravirtualization|Paravirtualization]] (PV) is a modern virtualization feature\technique which is quickly (if not already) becoming an industry standard. PV works by allowing some of the processing which in an ideal virtualized environment happens inside the virtualization to be done outside of the virtualized context. This will, in most cases, greatly improve the base line performance of a virtual machine. Although in some cases, depending on many variables, it won't.<br />
<br />
With the to-date distributions of Arch and the Open VM Tools, PV works out of the box. Mainly since Arch is natively compiled for i686 unlike other Linux distributions which are usually i386.<br />
<br />
=== Installation ===<br />
<br />
Note that for the initial installation of a VM, PV must be turned off, as it requires the specialized drivers found in the Open VM Tools package.<br />
<br />
Once Arch is up and running with Open VM Tools installed, you can turn off the VM, enable PV, and then turn it back on. Everything should work smoothly.<br />
<br />
=== Verifying ===<br />
<br />
To verify that PV works properly on your Arch VM run the following command:<br />
lspci | grep Mem<br />
<br />
If PV is working you should see a line similar to this:<br />
02:03.0 Memory controller: VMware Virtual Machine Interface (rev 01)<br />
<br />
Also<br />
lsmod | grep -i vm<br />
<br />
Should output a line similar to this:<br />
vmmemctl 11111 0<br />
<br />
=== Kernel Support ===<br />
<br />
I've found claims that since version 2.6.21, support for the VMI PV protocol is embedded in the Linux kernel. This is odd to me since any attempt I've made to run any Linux with PV enabled and without some version of VMI enabled VM Tools results in the kernel not panicing but simply dieing, With sometimes an error from VMware about unsupported op-code execution. So as far as I see it that's a no on kernel support for now.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Networking ===<br />
<br />
If there is a problem with networking, it is possible that the module pcnet32 steals the network interface from vmware, disabling it works, <br />
MODULES=(!pcnet32 ...)<br />
<br />
=== Keyboard/Mouse ===<br />
<br />
If you have no keyboard or mouse in X, you might try removing the line from xorg.conf in the "ServerFlags" Section<br />
<br />
Remove Option "AutoAddDevices" "False" (alternatively you can change to true to test it)<br />
<br />
==== Mouse lags and "flickers" after upgrade ====<br />
<br />
After upgrading some packages (includein Xorg) my mouse was slow and unresponsive within vmware. The reason was that the vmmouse driver was not loaded anymore.<br />
<br />
To solve the issue I had to add<br />
Section "ServerFlags"<br />
Option "AllowEmptyInput" "off"<br />
EndSection<br />
and<br />
Section "InputDevice"<br />
Identifier "Mouse0"<br />
Driver "vmmouse"<br />
Option "Protocol" "auto"<br />
Option "Device" "/dev/input/mice"<br />
Option "ZAxisMapping" "4 5 6 7"<br />
EndSection<br />
to my xorg.conf (actually I created /etc/X11/xorg.conf.d/10-serverflags.conf and /etc/X11/xorg.conf.d/10-mouse.conf containing the configurations).</div>
Mihi
https://wiki.archlinux.org/index.php?title=Newcomers_Guide&diff=58947
Newcomers Guide
2009-01-22T22:08:22Z
<p>Mihi: Cleaned up some bad lines</p>
<hr />
<div>==Preface==<br />
[[Category:Getting and installing Arch (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Provides a highly detailed, explanatory guide to installing, configuring and using a full-featured Arch Linux system.}}<br />
{{Article summary heading|Available Languages}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|正體中文|Beginner's Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Français|Manuel_du_Débutant_(Français)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Nederlands|Beginners_Guide_(Nederlands)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Português|Guia para Principiantes(Português)}}<br />
{{i18n_entry|Русский|Руководство_для_новичков}}<br />
{{i18n_entry|Türkçe|Başlangıç Rehberi (Türkçe)}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}} (provides a more general approach)<br />
{{Article summary end}}<br />
<br />
=====Everything you ever wanted to know about Arch, but were afraid to ask=====<br />
Welcome. This self-contained document will guide you through the process of installing and configuring [[Arch Linux]]; a simple, agile and lightweight GNU/Linux distribution, <code>UNIX</code>-like operating system. Arch Linux requires a certain level of intimate knowledge of its configuration and of <code>UNIX</code>-like system methodology and for this reason, extra explanatory information is included. This guide is aimed at new Arch users, but strives to serve as a strong reference and informative base for all.<br />
<br />
'''Arch Linux distribution highlights:'''<br />
* '''[[The Arch Way | Simple]]''' design and philosophy<br />
* Community distro targeted at competent GNU/Linux users<br />
* All packages compiled for '''i686/x86-64'''<br />
* Highly customizable system assembled by the user from the ground up<br />
* '''[[The Arch boot process | BSD-style init]]''' scripts, featuring one centralized configuration file<br />
* '''Rolling Release''' model<br />
* '''[[Pacman]]''' package manager is fast, written in '''C''', lightweight and agile, with a very modest memory footprint<br />
* '''[[ABS]]''': The '''A'''rch '''B'''uild '''S'''ystem, a ports-like package building system makes it simple to create your own easily installable Arch packages from source, to use and/or share with the community on the [[AUR]]<br />
* '''[[AUR]]''': The Arch User Repository, offering many thousands of build scripts for Arch user-provided software packages<br />
<br />
Since GNU/Linux Distributions are fundamentally 'modular' by design, the guide is logically divided into 3 main components of a desktop <code>UNIX</code>-like operating system: <br />
<br />
'''[[#Part I: Install the Base System|Part I: Installing the Base system]]'''<br />
<br />
'''[[#Part II: Install X and configure ALSA|Part II: Installing X and configuring ALSA]]'''<br />
<br />
'''[[#Part III: Installing and configuring a Desktop Environment|Part III: Installing a Desktop Environment]]'''<br />
<br />
=====DON'T PANIC!=====<br />
The Arch Linux system is assembled by the ''user'', from the shell, using basic command line tools. This is '''[[The Arch Way]].''' Unlike the more rigid structures of other distributions and installers, there are no default environments nor configurations chosen for you. From the command line, ''you'' will add packages from the Arch repositories using the [[pacman]] tool via your internet connection and manually configure your installation until your system is customized to your requirements. This method allows for maximum flexibility, choice, and system resource control ''from the base up''.<br />
<br />
Arch Linux is aimed at competent GNU/Linux users who desire minimal 'code separation' from their machine.<br />
<br />
=====License=====<br />
<br />
Arch Linux, pacman, documentation, and scripts are copyright<br />
©2002-2007 by Judd Vinet, ©2007-2008 by Aaron Griffin and are licensed under the GNU General Public License Version 2.<br />
=====[[The Arch Way]]=====<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way|simple]].'' '''<br />
<br />
'Simple', in this context, shall mean 'without unnecessary additions, modifications, or complications'. In short; an elegant, minimalist approach.<br />
<br />
'''Some thoughts to keep in mind:'''<br />
<br />
*''&quot; 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior].&quot; -Aaron Griffin''<br />
*''Entia non sunt multiplicanda praeter necessitatem'' or &quot;Entities should not be multiplied unnecessarily.&quot; -Occam's razor. The term ''razor'' refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory.<br />
*''&quot;The extraordinary part of [my method] lies in its simplicity..I always believe that the simple way is the right way.&quot;'' - Bruce Lee<br />
<font color=&quot;red&quot;>'''Following this guide closely is essential in order to successfully install a properly configured Arch Linux system, so ''please'' read it thoroughly. It is strongly recommended you read each section completely before carrying out the tasks contained.'''</font><br />
* The Arch wiki is an excellent resource and should be consulted for issues [http://wiki.archlinux.org/index.php/Main_Page first]; IRC (freenode #archlinux), and the [http://bbs.archlinux.org/ forums] are also available if the answer cannot be found.<br />
<br />
<br />
Welcome to Arch! Enjoy the installation; take your time and have fun!<br />
<br />
Now, let's get started.<br />
<br />
==Part I: Install the Base System==<br />
<br />
===Obtain the latest Installation media ===<br />
<br />
You can obtain Arch's official archiso media from [http://archlinux.org/download/ here]. The latest version is 2008.06<br />
<br />
You can obtain Tobias Powalowski's 2008.12 archboot media from [http://downloads.archlinux.de/iso/archboot/2008.12/ here].<br />
<br />
*Both the Core installer and the FTP/HTTP-downloads provide only the necessary packages to create an '''Arch Linux base system'''. ''Note that the Base System does not include a GUI. It is mainly comprised of the GNU toolchain, (compiler, assembler, linker, libraries, shell, and a few useful utilities) the Linux kernel, and a few extra libraries and modules.''<br />
<br />
====CD installer====<br />
Burn the .iso to a CD with your preferred burner, and continue with [[#Boot Arch Linux Installer | Boot Arch Linux Installer]]<br />
{{Box Note| Optical drives as well as CD media quality vary greatly, but generally, using a slow burn speed is recommended for reliable burns; Some users recommend speeds '''''as low as 4x or 2x.''''' If you are experiencing unexpected behavior from the CD, try burning at the minimum speed supported by your system. }}<br />
<br />
====USB stick====<br />
<font color=&quot;red&quot;>'''WARNING''': This will destroy all data on your USB stick.</font><br />
<br />
Insert an empty or expendable USB stick, determine its path, and dump the .img to the USB stick with the <code>/bin/dd</code> program:<br />
dd if=archlinux-2008.06-[core_or_ftp]-i686.img of=/dev/sd''x''<br />
where ''if='' is the path to the img file and ''of='' is your USB device. Make sure to use /dev/sd''x'' and not /dev/sd''x1''.<br />
<br />
'''Check md5sum (optional):'''<br />
<br />
Make a note of the number of records (blocks) read in and written out, then perform the following check:<br />
dd if=/dev/sd''x'' count=''number_of_records'' status=noxfer | md5sum<br />
The md5sum returned should match the md5sum of the downloaded archlinux image file; they both should match the md5sum of the image as listed in the md5sums file in the mirror distribution site.<br />
<br />
Continue with [[#Boot Arch Linux Installer | Boot Arch Linux Installer]]<br />
<br />
===Boot Arch Linux Installer===<br />
Insert the CD or USB stick and boot from it. You may have to<br />
change the boot order in your computer BIOS or press a key (usually DEL, F1, F2, F11 or F12) during the BIOS POST phase.<br />
<br />
Memory requirements:<br />
<br />
* CORE : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
* FTP : 160 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
<br />
Choose Boot Archlive or Boot Archlive [legacy IDE] if you have trouble with libata/PATA.<br />
<br />
To change boot options press '''e''' for editing the boot lines. Many users may wish to change the resolution of the framebuffer, for more readable console output. Append:<br />
vga=773<br />
to the kernel line, followed by <ENTER>, for a 1024x768 framebuffer.<br />
<br />
Hit '''b''' to boot.<br />
<br />
The system will now boot and present a login prompt. Login as 'root' without quotes.<br />
<br />
===Changing the keymap===<br />
If you have a non-US keyboard layout you can interactively choose your keymap/console font with the command:<br />
# km<br />
or use the loadkeys command:<br />
# loadkeys ''layout''<br />
(replace ''layout'' with your keyboard layout such as &quot;<code>fr</code>&quot; or &quot;<code>be-latin1</code>&quot;)<br />
<br />
===Documentation===<br />
The guide you are now reading is available on the live system. Change to vc/2 with <ALT>+F2 and invoke <code>/usr/bin/less</code>:<br />
# less /arch/beginnersguide.txt<br />
<code>less</code> will allow you to page through the document. Change back to vc/1 with <ALT>+F1.<br />
<br />
Change back to vc/2 if you need to reference the Beginners' Guide at any time.<br />
<br />
===Start the Installation===<br />
As root, run the installer script from vc/1:<br />
# /arch/setup<br />
<br />
====Select an installation source====<br />
After a welcome screen, you will be prompted for an installation source. Choose the appropriate source for the installer you are using.<br />
* If you chose the CORE installer, continue below with [[#Prepare Hard Drive|Prepare Hard Drive]].<br />
* FTP/HTTP only: You shall be prompted to load ethernet drivers manually, if desired. Udev is quite effective at loading the required modules, so you may assume it has already done so. You may verify this by invoking ifconfig -a from vc/3. (Select OK to continue.)<br />
<br />
===Configure Network (FTP/HTTP)===<br />
Available Interfaces will be presented. If an interface and HWaddr ('''H'''ard'''W'''are '''addr'''ess) is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console.<br />
<br />
The following screen will prompt you to ''Select the interface, Probe,'' or ''Cancel''. Choose the appropriate interface and continue.<br />
<br />
The installer will then ask if you wish to use DHCP. Choosing Yes will run '''dhcpcd''' to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct.<br />
<br />
====Wireless Quickstart (If you need wireless connectivity during the installation process)====<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. A good knowledge of your wireless hardware will be of key importance to successful configuration.<br />
<br />
If you need wireless functionality from the live installer environment onwards, the basic procedure will be:<br />
* Switch to a free virtual console, e.g.: <ALT>+F3<br />
* Identify your wireless card and appropriate module with the <code>/sbin/hwdetect</code> utility. The <code>--show-net</code> switch will list your network lan and wireless chipsets as well as the corresponding driver(s). (Note that <code>hwdetect</code> does not load drivers for you.):<br />
# hwdetect --show-net<br />
* Ensure udev has loaded the module (listed in the output of hwdetect) with <code>/bin/lsmod</code>:<br />
# lsmod | grep <name_of_module><br />
* If not, probe it using <code>/sbin/modprobe</code>:<br />
# modprobe <name_of_module><br />
{{Box Note | '''''In addition to the wireless module, some wireless chipsets, like ipw2100 and ipw2200, require corresponding firmware installation. The firmware packages must be explicitly installed to your actual system to provide wireless functionality after you reboot into your installed system. (Due to the firmware installation requirement, these chipsets may not work in the live environment.) Package selection and installation is covered below. Ensure installation of both your wireless module and firmware during the package selection step! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset. This is a very common error.'''''}}<br />
<br />
* Ensure the driver has created a usable wireless kernel interface with <code>/usr/sbin/iwconfig</code>:<br />
# iwconfig<br />
(Output should show an available wireless interface)<br />
* Bring the interface up with <code>/sbin/ifconfig <interface> up</code>.<br />
<br />
An example, using an atheros card and madwifi driver:<br />
# ifconfig ath0 up<br />
(Remember, your interface may be named something else, depending on your module (driver) and chipset: wlan0, eth1, etc.)<br />
* Specify the id of the wireless network with iwconfig <interface> essid &quot;<youressid>&quot; key <yourwepkey> (give the essid (the 'network name') of the network in quotes), e.g.:<br />
# iwconfig ath0 essid &quot;linksys&quot; key 0241baf34c<br />
* Acquire an IP address with <code>/sbin/dhcpcd <interface> </code>. e.g.:<br />
# dhcpcd ath0<br />
* Ensure you can route using <code>/bin/ping</code>:<br />
# ping -c 3 www.google.com<br />
Done.<br />
<br />
After the initial Arch installation is complete, you may wish to refer to [[Wireless Setup]] to ensure a permanent configuration solution for your system.<br />
<br />
Return to vc/1 with <ALT>+F1. Continue with [[#Prepare Hard Drive|Prepare Hard Drive]]<br />
<br />
===Prepare Hard Drive===<br />
<br />
<font color=&quot;red&quot;> '''WARNING:''' '''''Partitioning hard drives can destroy data. You are strongly cautioned and advised to backup your critical data if applicable.'''''</font><br />
<br />
Verify your current disk identities and layout by invoking <code>/sbin/fdisk</code> with the <code>-l</code> (lower-case L) switch.<br />
<br />
Open another virtual console (<ALT>+F3) and enter:<br />
# fdisk -l<br />
Take note of the disk(s)/partition(s) you wish to utilize for your Arch installation.<br />
<br />
Switch back to the installation script with <ALT>+F1<br />
<br />
Select the first menu entry &quot;Prepare Hard Drive&quot;.<br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides your disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. ''You will be prompted to modify the size to you requirement.''<br />
* swap partition, default size 256MB. ''You will be prompted to modify the size to you requirement.''<br />
* A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but note that ''both / and /home shall share the same fs type'' if choosing the Auto Prepare option.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the <font color=&quot;red&quot;>warning</font> presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
This option will allow for the most robust and customized partitioning solution for your personal needs.<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#Select Packages|Select Packages]]''' below.''<br />
<br />
====Partition Hard Drives====<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted).<br />
*There exist 3 types of disk partitions:<br />
#Primary<br />
#Extended<br />
#Logical<br />
'''Primary''' partitions can be bootable, and are limited to 4. If a partitioning scheme requires more than 4 partitions, we are forced to use an '''extended''' partition which will contain '''logical''' partitions.<br />
<br />
Extended partitions are not usable by themselves; they are merely a &quot;container&quot; for logical partitions. If required, a hard disk shall contain only one extended partition; which shall then be sub-divided into logical partitions.<br />
<br />
When partitioning a disk, one can observe this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on your hard drive where virtual ram resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM.<br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually quite sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forget a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example.<br />
{{Box Note|If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least '''equal''' in size to the amount of physical RAM, and some Arch users even recommend oversizing it beyond the amount of physical RAM by 10-15%, to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements.<br />
<br />
Filesystem candidates for separate partitions include:<br />
<br />
'''/''' (root) ''The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory &quot;/&quot;, even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system.''<br />
<br />
'''/boot''' ''This directory contains the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files.''<br />
<br />
'''/home''' ''User data and user specific configuration files for applications are stored in each user's home directory in a file that starts with the '.' character (a &quot;dot file&quot;).''<br />
<br />
'''/usr''' ''While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system update/upgrade. Any information that is host-specific or varies with time is stored elsewhere.''<br />
<br />
'''/tmp''' ''directory for programs that require temporary files''<br />
<br />
'''/var''' ''contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc.''<br />
{{Box Note | Besides /boot, directories essential for booting are: '/bin', '/dev', '/etc', '/lib', '/proc' and '/sbin'. Therefore, they must not reside on a separate partition from /.}}<br />
'''''There are several advantages for using discrete filesystems, rather than combining all into one partition''''':<br />
<br />
* Security: Each filesystem may be configured in /etc/fstab as 'nosuid', 'nodev', 'noexec', 'readonly', etc.<br />
* Stability: A user, or malfunctioning program can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem remain unaffected.<br />
* Speed: A filesystem which gets written to frequently may become somewhat fragmented. (An effective method of avoiding fragmentation is to ensure that each filesystem is never in danger of filling up completely.) Separate filesystems remain unaffected, and each can be defragmented separately as well.<br />
* Integrity: If one filesystem becomes corrupted, separate filesystems remain unaffected.<br />
* Versatility: Sharing data across several systems becomes more expedient when independent filesystems are used. Separate filesystem types may also be chosen based upon the nature of data and usage.<br />
In this example, we shall use separate partitions for /, /var, /home, and a swap partition.<br />
<br />
{{Box Note | /var contains many small files. You may wish to take this into consideration when choosing a filesystem type for it, (if you choose to create its own separate partition).}}<br />
<br />
=====How big should my partitions be?=====<br />
This question is best answered based upon individual needs. If you have little or no experience with partitioning, you may wish to simply create one partition for root, and one partition for swap. Or, follow the example closely, and consider these guidelines to provide a frame of reference:<br />
* The root filesystem (/) in the example will contain the /usr directory, which can become moderately large, depending upon how much software is installed.<br />
<br />
* The /var filesystem will contain, among other data, the [[ABS]] tree and the pacman cache. Keeping cached packages is useful and versatile; it provides the ability to downgrade packages if needed. /var tends to grow in size; the pacman cache can grow large over long periods of time, but can be safely cleared if needed. 6-8 Gigs on a desktop system should therefore be sufficient for /var. Servers tend to have extremely large /var filesystems.<br />
* The /home filesystem is typically where user data, downloads, and multimedia reside. On a desktop system, /home is typically the largest filesystem on the drive by a large margin.<br />
* An extra 25% of space added to each filesystem will provide a cushion for unforeseen occurrence, expansion, and serve as a preventive against fragmentation.<br />
'''''From the guidelines above, the example system shall contain a ~15GB root (/) partition, ~6GB /var, 1GB swap, and a /home containing the remaining disk space.'''''<br />
<br />
=====cfdisk=====<br />
Start by creating the primary partition that will contain the '''root''', (/) filesystem.<br />
<br />
Choose '''N'''ew -> Primary and enter the desired size for root (/). Put the partition at the beginning of the disk.<br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition shall appear as sda1 in our example.<br />
<br />
Now create a primary partition for /var, designating it as '''T'''ype 83 Linux. The created /var partition shall appear as sda2<br />
<br />
Next, create a partition for swap. Select an appropriate size and specify the '''T'''ype as 82 (Linux swap / Solaris). The created swap partition shall appear as sda3.<br />
<br />
Lastly, create a partition for your /home directory. Choose another primary partition and set the desired size.<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition shall appear as sda4.<br />
<br />
Example:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Primary Linux 15440 #root<br />
sda2 Primary Linux 6256 #/var<br />
sda3 Primary Linux swap / Solaris 1024 #swap<br />
sda4 Primary Linux 140480 #/home<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk. Choose '''Q'''uit to leave the partitioner.<br />
Choose Done to leave this menu and continue with &quot;Set Filesystem Mountpoints&quot;.<br />
<br />
{{Box Note | Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.}}<br />
<br />
====Set Filesystem Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). At this time, you will be asked to specify the filesystem type.<br />
<br />
=====Filesystem Types=====<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each has its own advantages, disadvantages, and unique idiosyncrasies. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' ''Second Extended Filesystem''- Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.'' Generally regarded as a good choice for /boot/.<br />
<br />
2. '''ext3''' ''Third Extended Filesystem''- Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. ''Extremely'' stable, mature, and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
'''High Performance Filesystems:'''<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput based on an unconventional and creative algorithm. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is fast at formatting, yet comparatively slow at mounting. Quite mature and stable. ReiserFS is not actively developed at this time (Reiser4 is the new Reiser filesystem). Generally regarded as a good choice for /var/.<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem- The first filesystem to offer journaling. JFS had many years of use in the IBM AIX® OS before being ported to Linux. JFS currently uses the least CPU resources of any GNU/Linux filesystem. Very fast at formatting, mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline I/O scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS, but very mature and stable.<br />
<br />
5. '''XFS''' - Another early journaling filesystem originally developed by Silicon Graphics for the IRIX OS and ported to Linux. XFS offers very fast throughput on large files and large filesystems. Very fast at formatting and mounting. Generally benchmarked as slower with many small files, in comparison to other filesystems. XFS is very mature and offers online defragmentation ability.<br />
<br />
===== A note on Journaling=====<br />
All above filesystems, except ext2, use [http://en.wikipedia.org/wiki/Journaling_file_system journaling]. Journaling file systems are fault-resilient file systems that use a journal to log changes before they're committed to the file system to avoid metadata corruption in the event of a crash. Note that not all journaling techniques are alike; specifically, only ext3 offers ''data-mode journaling'', (though, not by default), which journals ''both'' data ''and'' meta-data (but with significant speed penalty). The others only offer ''ordered-mode journaling'', which journals meta-data only. While all will return your filesystem to a valid state after recovering from a crash, ''data-mode journaling'' offers the greatest protection against file system corruption and data loss but can suffer from performance degradation, as all data is written twice (first to the journal, then to the disk). Depending upon how important your data is, this may be a consideration in choosing your filesystem type.<br />
<br />
'''''Moving on...'''''<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, sda2 and sda4 remain. For sda2, choose a filesystem type and mount it as /var. Finally, choose the filesystem type for sda4, and mount it as /home. Return to main menu.<br />
<br />
===Select Packages===<br />
<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
* 2008.06 installation media: Package category BASE is now installed by default.<br />
<br />
Package selection is split into two stages. First, you will select the base package category, then you will be presented will the full lists of packages, allowing you to fine-tune your selections. Use the space bar to select and unselect.<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories.<br />
<br />
{{Box Note | If you are going to require connection to a wireless network with WPA encryption, consider installing netcfg2 (as well as wireless_tools), which will enable you to do so.}}<br />
<br />
Once you're done selecting the packages you need, leave the selection<br />
screen and continue to the next step, Install Packages.<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system.<br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See vc/5 for output, vc/1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (<ALT>+F3, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure the System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.''<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system.<br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'.<br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able and willing to manually configure /etc/rc.conf, /etc/mkinitcpio, /etc/fstab, and other system-critical configuration files from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
'''The initramfs'''<br />
<br />
The initial ram filesystem, or initramfs, is a temporary file system used by the kernel during boot. It is used for making preparations, like hardware detection and module loading, before the real root file system can be mounted. Therefore, an initramfs allows for the use of a generic modular kernel for a wide variety of hardware, and without the need to compile a custom kernel for each end user.<br />
<br />
You will be prompted by a series of questions related to the configuration of your initramfs. You will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. Choosing 'yes' for any of the above will cause the installer script to place the appropriate hook(s) within the <code>/etc/mkinitcpio.conf</code> file.<br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or, if you are familiar with it, [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vim]. You will be presented with a menu including the main configuration files for your system.<br />
<br />
{{Box Note | ''It is very important at this point to edit, or at the very least, to verify by opening, every configuration file.'' The installer script relies on your input to create these files on your installation. A common error is to skip over these critical steps of configuration.}}<br />
<br />
=====Can the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and auto-configuration, Arch presents the user all pertinent configuration files during installation for the purposes of ''transparency and system resource control''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use and maintain your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files.<br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users.<br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on boot and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''USEDIRECTISA''': Use direct I/O request instead of /dev/rtc for hwclock<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or '''X'''.<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program at boot. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe.<br />
** '''USECOLOR'''=: Select &quot;yes&quot; if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE=&quot;en_US.utf8&quot;<br />
HARDWARECLOCK=&quot;localtime&quot;<br />
USEDIRECTISA=&quot;no&quot;<br />
TIMEZONE=&quot;US/Eastern&quot;<br />
KEYMAP=&quot;us&quot;<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR=&quot;yes&quot;<br />
<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to &quot;yes&quot; will use '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to &quot;no&quot; will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc.<br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below.<br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted.<br />
# Scan hardware and load required modules at boot<br />
MOD_AUTOLOAD=&quot;yes&quot;<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0=&quot;dhcp&quot; if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. If using '''DHCP''', you can usually ignore this variable, though some users have reported the need to define it.<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. If using '''DHCP''', you can usually leave this variable commented out with the bang (!), but again, some users require the gateway and ROUTES defined. If you experience networking issues with pacman, for instance, you may want to return to these variables.<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME=&quot;arch&quot;<br />
#eth0=&quot;eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255&quot;<br />
eth0=&quot;dhcp&quot;<br />
INTERFACES=(eth0)<br />
gateway=&quot;default gw 192.168.0.1&quot;<br />
ROUTES=(!gateway)<br />
{{Box Note | Arch uses the '''dhcpcd''' DHCP client. Alternatively, '''dhclient''' is available from the [extra] repository via pacman.}}<br />
<br />
* '''DAEMONS''' section<br />
<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed.<br />
*If a script is prefixed with an &quot;at&quot; symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during boot is desired.<br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You do not have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide.<br />
A ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor.<br />
<br />
*<font color=&quot;blue&quot;>'''Tip:</font> All Arch daemons reside under /etc/rc.d/'''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's filesystem. The '''/etc/fstab''' file is most commonly used by the '''mount''' command. The mount command takes a filesystem on a device, and adds it to the main system heirarchy that you see when you use your system. '''mount -a''' is called from /etc/rc.sysinit, about 3/4 of the way through the boot process, and reads /etc/fstab to determine which options should be used when mounting the specified devices therein. If '''noauto''' is appended to a filesystem in /etc/fstab, '''mount -a''' will not mount it at boot.<br />
<br />
An example '''/etc/fstab''':<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /media/cdrom auto ro,user,noauto,unhide 0 0<br />
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /media/fl auto user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-933.. / jfs defaults,noatime 0 1<br />
/dev/disk/by-uuid/7ef-223.. /home jfs defaults,noatime 0 2<br />
/dev/disk/by-uuid/530-1e-.. swap swap defaults 0 0<br />
/dev/disk/by-uuid/4fe-110.. /var reiserfs defaults,noatime,notail 0 2<br />
{{Box Note | The 'noatime' option disables writing read access times to the metadata of files and may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency. 'notail' disables the ReiserFS tailpacking feature, for added performance at the cost of slightly less efficient disk usage.}}<br />
{{Box Note | It may be beneficial to make a note of the UUID of the root (/) partition, as this may be required during GRUB configuration.}}<br />
<br />
* The first field, '''<file system>''', describes the block device or remote filesystem to be mounted. For regular mounts, this field will contain a link to a block device node (as created by mknod which is called by udev at boot) for the device to be mounted; for instance, '/dev/cdrom' or '/dev/sda1'. Instead of giving the device explicitly, the Arch installer indicates the filesystem that is to be mounted by its UUID by default.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability. ''If you do not need nor wish to use UUID, simply change your fstab to use whatever naming convention desired.'' (See [[Persistent block device naming| this wiki article]] for more information on persistent block device naming. )}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
* The second field, '''<dir>''', describes the mount point for the filesystem. For swap partitions, this field should be specified as 'swap'; (Swap partitions are not actually mounted.)<br />
<br />
* The third field, '''<type>''', describes the type of the filesystem. The Linux kernel supports many filesystem types. (For the filesystems currently supported by the running kernel, see /proc/filesystems). An entry 'swap' denotes a file or partition to be used for swapping. An entry 'ignore' causes the line to be ignored. This is useful to show disk partitions which are currently unused.<br />
<br />
* The fourth field, '''<options>''', describes the mount options associated with the filesystem. It is formatted as a comma separated list of options. It contains at least the type of mount plus any additional options appropriate to the filesystem type. For documentation on the available options for non-nfs file systems, see mount(8).<br />
<br />
* The fifth field, '''<dump>''', is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. dump is a backup utility. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be backed up. ''Note that dump is not installed by default.''<br />
<br />
* The sixth field, '''<pass>''', is used by the fsck(8) program to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a <pass> of 1, and other filesystems should have a <pass> of 2 or 0. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to use parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''[[Configuring mkinitcpio | /etc/mkinitcpio]].conf'''=====<br />
Editing this configuration is unnecessary at this point; this information is provided for explanation.<br />
<br />
This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or &quot;initrd&quot;) for your system. The initrd is a gzipped image that is read by the kernel during boot. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your boot continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
'''mkinitcpio''' is the next generation of '''initramfs creation'''. It has many advantages over the old '''mkinitrd''' and '''mkinitramfs''' scripts.<br />
<br />
* It uses '''klibc''' and '''kinit''' which are developed by Linux kernel devs to provide a small and lightweight base for early userspace.<br />
* It can use '''udev''' for hardware autodetection at runtime, thus prevents you from having tons of unnecessary modules loaded.<br />
* Its hook-based init script is easily extendable with custom hooks, which can easily be included in pacman packages without having to modifiy mkinitcpio itself.<br />
* It already supports '''lvm2''', '''dm-crypt''' for both legacy and luks volumes, '''raid''', '''swsusp''' and '''suspend2''' resuming and booting from '''usb mass storage''' devices.<br />
* Many features can be configured from the kernel command line without having to rebuild the image.<br />
* The '''mkinitcpio''' script makes it possible to include the image in a kernel, thus making a self-contained kernel image is possible.<br />
* Its flexibility makes recompiling a kernel unnecessary in many cases.<br />
'''mkinitcpio''' was developed by Aaron Griffin and Tobias Powalowski with some help from the community.<br />
<br />
===== /etc/modprobe.conf=====<br />
It is unnecessary to configure this file at this time.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules<br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [http://wiki.archlinux.org/index.php/Network#For_DHCP_IP Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish.<br />
An example, using OpenDNS:<br />
nameserver 208.67.222.222<br />
nameserver 208.67.220.220<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*<font color=&quot;blue&quot;>'''TIP''':</font> For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add the appropriate parameters: <br />
<br />
* let everyone connect to you<br />
sshd: ALL<br />
<br />
* restrict it to a certain ip<br />
sshd: 192.168.0.1<br />
<br />
* OR restrict for an IP range<br />
sshd: 10.0.0.0/255.255.255.0<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
The '''/usr/sbin/locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering &quot;peculiar&quot; text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file remains untouched. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a &quot;The current locale is invalid...&quot; error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO].<br />
<br />
====GRUB====<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient, but verify its contents to ensure accuracy (specifically, ensure that the root (/) partition is specified by UUID on line 3). You may want to alter the resolution of the console by adding a vga=<number> kernel argument corresponding to your desired virtual console resolution. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0) <br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
{{Box Note | ''The linux kernel, 'vmlinuz', is so named because it incorporated '''v'''irtual '''m'''emory capability early in its development. The '''z''' denotes a zipped (compressed) image.''}}<br />
<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. &quot;Arch Linux (Main)&quot; will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': '''GRUB''''s root; the drive and partition where the kernel (/boot) resides, according to system BIOS. (More accurately, where GRUB's stage2 file resides). '''NOT necessarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, and enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, according to BIOS, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root'''''.<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''). If not already specified, you should enter the name of the partition, according to the UUID numbering scheme, using the ''/dev/disk/by-uuid/xxxx-xxxx-xxxx'' format. This UUID was found in the previous section regarding configuration of ''/etc/fstab''.<br />
<br />
*An easy way to distinguish the 2 appearances of 'root' in /boot/grub/menu.lst is to remember that the first root statement ''informs GRUB where the kernel resides'', whereas the second root= kernel argument ''tells the kernel where the root filesystem (/) resides''.<br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''&quot;vga=773&quot;''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root. Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
===Reboot===<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, and reboot:<br />
<br />
# reboot<br />
(Be sure to remove the installer CD)<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
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. <br />
<br />
Login with the root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
# ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an &quot;unknown host&quot; error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
# ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. <br />
*'''Static IP'''<br />
<br />
If required, you can set a new static IP with:<br />
# ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
# route add default gw <ip address of the gateway><br />
Verify that /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.com. If everything is working now, adjust /etc/rc.conf as described above for static IP. <br />
*'''DHCP'''<br />
If you have a DHCP server/router in your network try:<br />
# dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
* Ensure the driver has created a usable interface:<br />
# iwconfig<br />
* Bring the interface up with <code>ifconfig <interface> up</code>. e.g.:<br />
# ifconfig ath0 up<br />
* (Optional) Scan for available access points:<br />
# iwlist ath0 scan | less<br />
* Specify the id of the wireless network with <code>iwconfig <interface> essid <youressid></code>. Or, if using WEP; <code>iwconfig <interface> essid <youressid> key <yourwepkey></code>, e.g.:<br />
# iwconfig ath0 essid linksys key 0241baf34c<br />
* Request an IP address with <code>dhcpcd <interface></code>. e.g.:<br />
# dhcpcd ath0<br />
* Ensure you can route:<br />
$ ping -c 3 www.google.com<br />
Done.<br />
<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you will not need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
# modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
# isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
# /etc/rc.d/adsl start<br />
<br />
and<br />
<br />
# /etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically 'dial in' on boot-up, add adsl to your DAEMONS array, and put a ! before the network entry, since the network is handled by adsl now.<br />
<br />
===Update, Sync and Upgrade the system with [[pacman]]===<br />
Now we will update the system using [[pacman]]. <br />
<br />
====What is pacman ?====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in ''C'' and is designed from the ground up to be lightweight with a very modest memory footprint, fast, simple, and versatile. 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. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed many times faster than their Bzipped counterparts, and are therefore installed much more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
====Configuring pacman====<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following 4 repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) It contains all the packages that MUST be in perfect working order to make sure your system continues to run. These are the absolute system-critical packages. Developer maintained.<br />
<br />
*''The Core installation media simply contains an installer script, and a snapshot of the core repository at the time of release.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE, and Apache, for instance, can be found here. Developer maintained.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core] or [extra] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. <br />
<br />
<font color=&quot;blue&quot;>*If enabled, [testing] must be the first repo listed in your ''pacman.conf'' file.</font><br />
<br />
<font color=&quot;red&quot;>'''WARNING''': '''''Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''</font><br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than eight thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki> '''''[[AUR Helpers]]''''' can help you seamlessly access AUR.<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
# nano /etc/pacman.conf<br />
Example:<br />
#<br />
# /etc/pacman.conf<br />
#<br />
# See the pacman.conf(5) manpage for option and repository directives<br />
<br />
#<br />
# GENERAL OPTIONS<br />
#<br />
[options]<br />
# The following paths are commented out with their default values listed.<br />
# If you wish to use different paths, uncomment and update the paths.<br />
#RootDir = /<br />
#DBPath = /var/lib/pacman/<br />
#CacheDir = /var/cache/pacman/pkg/<br />
#LogFile = /var/log/pacman.log<br />
HoldPkg = pacman glibc<br />
# If upgrades are available for these packages they will be asked for first<br />
SyncFirst = pacman<br />
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u<br />
#XferCommand = /usr/bin/curl %u > %o<br />
<br />
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
#IgnorePkg =<br />
#IgnoreGroup =<br />
<br />
#NoUpgrade =<br />
#NoExtract =<br />
<br />
# Misc options (all disabled by default)<br />
#NoPassiveFtp<br />
#UseSyslog<br />
#ShowSize<br />
#UseDelta<br />
#TotalDownload<br />
#<br />
# REPOSITORIES<br />
# - can be defined here or included from another file<br />
# - pacman will search repositories in the order defined here<br />
# - local/custom mirrors can be added here or in separate files<br />
# - repositories listed first will take precedence when packages<br />
# have identical names, regardless of version number<br />
# - URLs will have $repo replaced by the name of the current repo<br />
#<br />
# Repository entries are of the format:<br />
# [repo-name]<br />
# Server = ServerName<br />
# Include = IncludePath<br />
#<br />
# The header [repo-name] is crucial - it must be present and<br />
# uncommented to enable the repo.<br />
# <br />
<br />
# Testing is disabled by default. To enable, uncomment the following<br />
# two lines. You can add preferred servers immediately after the header,<br />
# and they will be used before the default mirrors.<br />
#[testing]<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist <br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
# An example of a custom package repository. See the pacman manpage for<br />
# tips on creating your own repositories.<br />
#[custom]<br />
#Server = file:///home/custompkgs<br />
<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''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.'' '''<br />
<br />
=====/etc/pacman.d/mirrorlist=====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
# nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
# pacman -Syy<br />
Passing two --refresh or -y flags forces a refresh of all package lists even if they are considered by pacman to be up to date. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
<br />
=====Ignoring packages=====<br />
When you execute the command &quot;pacman -Syu&quot;, your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the package(s) you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the package(s) you want to skip in your /etc/pacman.conf file :<br />
IgnorePkg = openoffice-base wine awesome <br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed package build scripts are also available in the [[AUR]]. <br />
<br />
You are expected to keep your 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.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also &quot;protect&quot; your configuration/system files from being overwritten during &quot;pacman -Su&quot; using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
===Update System===<br />
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 fixes for known issues. Consulting these pages before any upgrade is good practice. <br />
<br />
Sync, refresh, and upgrade your entire new system with:<br />
# pacman -Syu<br />
you may also use:<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
pacman will now download a fresh copy of the master package list from the server(s) defined in pacman.conf(5) 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.) <br />
<br />
Reboot if a kernel upgrade has occurred. <br />
<br />
{{Box Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.}}<br />
<br />
If the messages go by too fast to read, you can look at them later at /var/log/pacman.log.<br />
<br />
See [[Package_Management_FAQs|Package Management FAQs]] for answers to frequently asked questions regarding updating and managing your packages.<br />
<br />
====The beauty of the Arch rolling release model====<br />
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 '''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. '''Reboot''' if a kernel upgrade has occurred.<br />
<br />
====Get familiar with pacman====<br />
pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman(8) tool. Try:<br />
man pacman<br />
<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
===Add a user and setup groups===<br />
<code>UNIX</code> is a multi-user environment. You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal, non-root user account using the <code>/usr/sbin/useradd</code> program:<br />
# useradd -m -G [groups] -s [login_shell] [username] <br />
* '''-m''' Creates user home directory as /home/'''username'''. Within their home directory, a user can write files, delete them, install programs, etc. Users' home directories shall contain their data and personal configuration files, the so-called 'dot files' (their name is preceded by a dot), which are 'hidden'. (To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch.) If there is a conflict between ''user'' (under /home/username) and ''global'' configuration files, (usually under /etc/) the settings in the ''user'' file will prevail. Dotfiles likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside.<br />
* '''-G''' A list of supplementary groups which the user is also a member of. ''Each group is separated from the next by a comma, with no intervening spaces''. The default is for the user to belong only to the initial group (users). <br />
* '''-s''' The name of the user´s login shell. Leaving this field blank will cause the system to select the default login shell.<br />
Useful groups for your non-root user include:<br />
*'''audio''' - for tasks involving sound card and related software<br />
*'''floppy''' - for access to a floppy if applicable<br />
*'''lp''' - for managing printing tasks<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
*'''storage''' - for managing storage devices<br />
*'''video''' - for video tasks and 3d acceleration<br />
*'''wheel''' - for using sudo/su<br />
*'''power''' - used w/ power options (ie. shutdown w/ off button) <br />
A typical example, adding a user named &quot;archie&quot; specifying bash as the login shell:<br />
# useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash archie<br />
Next, add a password for your new user using <code>/usr/bin/passwd</code>.<br />
<br />
An example for our user, 'archie':<br />
# passwd archie<br />
(You will be prompted to provide the new <code>UNIX</code> password.)<br />
<br />
Your new non-root user has now been created, complete with a home directory and a login password.<br />
<br />
'''Alternative method, using <code>/usr/sbin/adduser</code>:'''<br />
<br />
Alternatively, you may use <code>adduser</code>, an interactive user adding program which will prompt you for the above data:<br />
# adduser<br />
<br />
See the [[Groups]] article and check the man pages for <code>usermod(8)</code> and <code>gpasswd(8)</code> for further information.<br />
<br />
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 <code>/usr/sbin/userdel</code>:<br />
# userdel -r [username]<br />
* '''-r ''' Files in the user´s home directory will be removed along with the home directory itself and the user´s mail spool.<br />
<br />
===Install and setup Sudo (Optional)===<br />
To install Sudo:<br />
# pacman -S sudo<br />
To add a user as a sudo user (a &quot;sudoer&quot;), the visudo command must be run as root. If you do not know how to use vi, you may set the EDITOR environment variable to the editor of your choice before running visudo. e.g.:<br />
# EDITOR=nano visudo<br />
If you are comfortable using vi, issue the visudo command without the EDITOR=nano variable:<br />
# visudo<br />
This will open the file /etc/sudoers in a special session of vi. visudo copies the file to be edited to a temporary file, edits it with an editor, (vi by default), and subsequently runs a sanity check. If it passes, the temporary file overwrites the original with the correct permissions. <br />
<br />
<font color=&quot;red&quot;>'''WARNING: Do not edit /etc/sudoers directly with an editor; Errors in syntax can cause annoyances (like rendering the root account unusable). You must use the ''visudo'' command to edit /etc/sudoers.'''</font><br />
<br />
To give the user full root privileges when he/she precedes a command with &quot;sudo&quot;, add the following line:<br />
USER_NAME ALL=(ALL) ALL<br />
where USER_NAME is the username of the individual.<br />
<br />
For more information, such as sudoer <TAB> completion, see [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure sound with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers.<br />
{{Box Note| Alsa is included in the Arch mainline kernel and udev will automatically probe your hardware on boot-up, loading the corresponding kernel module for your audio card. Therefore, your sound should already be working, but is muted by default.}}<br />
{{Box Note| OSS4.1 has been released under a free license and is generally considered a significant improvement over older OSS versions. If you have issues with ALSA, or simply wish to explore another option, you may choose OSS4.1 instead. Instructions can be found in [[OSS]]}} <br />
<br />
The alsa-utils package contains the alsamixer userspace tool, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
By default the kernel ships with snd_pcsp, the alsa pc speaker module. snd_pcsp is usually loaded before your &quot;actual&quot; sound card module. In most cases, it will be more convenient if this module is loaded last, as it will allow alsamixer to correctly control the desired sound card.<br />
<br />
To have snd_pcsp load last, add the following to /etc/modprobe.conf:<br />
options snd-pcsp index=2<br />
<br />
Alternatively, if you do not want snd_pcsp to load at all, blacklist it by adding the following to /etc/rc.conf:<br />
MODULES=(... !snd_pcsp)<br />
<br />
{{Box Note | You will need to unload all your sound modules and reload them for the changes to take affect. It might be easier to reboot. Your choice. }}<br />
<br />
Install the alsa-utils package:<br />
# pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, use <code>/usr/bin/gpasswd</code>. As root do:<br />
# gpasswd -a ''yourusername'' audio<br />
As '''''normal, non-root''''' user, invoke <code>/usr/bin/alsamixer</code>:<br />
# su - ''yourusername'' <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Some machines, (like the Thinkpad T61), have a '''Speaker''' channel which must be unmuted and adjusted as well. Leave alsamixer by pressing ESC. <br />
==== Sound test ====<br />
Ensure your speakers are properly connected, and test your sound configuration as normal user using <code>/usr/bin/aplay</code>:<br />
$ aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, &quot;Front, center.&quot;<br />
<br />
Exit your normal user shell and run <code>/usr/bin/alsactl</code> as root:<br />
$ exit<br />
# alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
# nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Install X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''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) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
<br />
# pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
<br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
# pacman -S xorg<br />
With newer versions of xorg, it is suggested (and possibly necessary in most cases) to install the input driver evdev, which should be installed as a dependency for xorg-server, but many seem to be lacking somehow:<br />
# pacman -S xf86-input-evdev<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
# pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
You will need knowledge of which video chipset your machine has. If you do not know, use the <code>/usr/sbin/lspci</code> program:<br />
# lspci | grep VGA<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
# pacman -Ss xf86-video | less<br />
Here is a list of '''open source''' drivers, and the corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ATI(AMD) video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' Nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' VIA S3 Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-openchrome (testing)''' via video driver (currently in testing, try openchrome in the meantime)<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
# pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
===Configure X===<br />
<br />
====What is the xorg.conf file?====<br />
<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
<br />
By default, you will not have an Xorg config file, as the newest versions of Xorg feature autodetection. ''If'' the autodetection ''works satisfactorily'' and you do not need to specify special features such as aiglx, compositing and so forth, you may forgo creating an xorg.conf file. <br />
<br />
====Create /etc/X11/xorg.conf====<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the <code>/usr/bin/Xorg</code> program with the -configure option to generate a basic config file; As root, do:<br />
# Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
====Input hotplugging====<br />
<br />
Input hotplugging is enabled in the 1.5.x series of the xorg-server package, which is now included in the extra repo.<br />
When input hotplugging is enabled, X will purge any devices setup in xorg.conf that are using the kbd and mouse driver. This may result in X appearing to freeze and result in your not being able to move your mouse or use your keyboard.<br />
<br />
There are two options to correct this:<br />
<br />
1) '''Configure input hotplugging''' by installing the xf86-input-evdev driver and configuring HAL to use the kbd/mouse drivers. Start the hal daemon before anything related to X.Org is started:<br />
/etc/rc.d/hal start<br />
Add the hal daemon to the DAEMONS array in /etc/rc.conf to start it at every boot. See the article on [[Xorg input hotplugging]] for full details.<br />
<br />
2) '''Disable input hotplugging''' by adding ''Option &quot;AutoAddDevices&quot; &quot;False&quot;'' to ServerFlags in /etc/X11/xorg.conf. This will skip devices detected by hal and will use your keyboard/mouse configuration from xorg.conf<br />
# nano /root/xorg.conf.new<br />
and add the following<br />
Section &quot;ServerFlags&quot;<br />
Option &quot;AutoAddDevices&quot; &quot;False&quot;<br />
EndSection<br />
<br />
====Test X====<br />
<br />
To test the X server, run:<br />
# X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
====In case of errors====<br />
<br />
Inspect your config file:<br />
<br />
# nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section &quot;Device&quot;<br />
<br />
...<br />
<br />
Driver &quot;savage&quot;<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section &quot;Monitor&quot;. If not, add them:<br />
Section &quot;Monitor&quot;<br />
Identifier &quot;Monitor0&quot;<br />
VendorName &quot;Monitor Vendor&quot;<br />
ModelName &quot;Monitor Model&quot;<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section &quot;Screen&quot;:<br />
Section &quot;Screen&quot;<br />
Identifier &quot;Screen0&quot;<br />
Device &quot;Card0&quot;<br />
Monitor &quot;Monitor0&quot;<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your &quot;Display&quot; subsection, at least under the Depth 24 header, e.g.:<br />
SubSection &quot;Display&quot;<br />
Viewport 0 0<br />
Depth 24<br />
Modes &quot;1024x768&quot; &quot;800x600&quot; &quot;640x480&quot;<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section &quot;Extensions&quot;<br />
Option &quot;Composite&quot; &quot;Enable&quot;<br />
EndSection<br />
Try your config again, after modifying:<br />
# X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and copy or move the generated config file to /etc/X11/:<br />
# cp /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
* Note that if your machine has a successfully configured xorg.conf under another distribution and with the same Xorg version, you may easily copy it over to your current Arch system.<br />
* If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the <code>/usr/bin/hwd</code> tool. Install with:<br />
# pacman -S hwd<br />
And run with<br />
# hwd -xa<br />
{{Box Note| At the time of this writing, hwd generates a xorg.conf with an invalid line for newer xorg packages. After using it, you need to remove or comment out the RgbPath line under Section &quot;Files&quot; via nano /etc/X11/xorg.conf or your equivalent, as root/sudo.}}<br />
<br />
* You may also try the <code>/usr/bin/xorgcfg</code> script:<br />
# xorgcfg <br />
* Lastly, you may choose <code>/usr/bin/xorgconfig</code>, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
# xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====Set the keyboard layout====<br />
=====When input hotplugging is disabled=====<br />
Add option lines in the &quot;InputDevice&quot; section of the /etc/X11/xorg.conf file specifying the keyboard layout and variant:<br />
Option &quot;XkbLayout&quot; &quot;be&quot;<br />
Option &quot;XkbVariant&quot; &quot;&quot;<br />
<br />
=====When input hotplugging is enabled=====<br />
# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/<br />
# nano /etc/hal/fdi/policy/10-keymap.fdi<br />
Edit the &quot;input.xkb.layout&quot; key and possibly the &quot;input.xkb.variant&quot; key in this file.<br />
Restart hal:<br />
# /etc/rc.d/hal restart<br />
For more info see the article on [[Xorg input hotplugging]].<br />
<br />
===Using a proprietary video driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI.<br />
<br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has several different driver packages that each match a certain subset of Cards: <br />
<br />
{{Box Note| Nvidia-71xx series proprietary drivers, which are required by extremely old cards like TNT and TNT2, have been removed because they do not work with the new Xorg that Arch makes use of, and nvidia has discontinued support for such. You should use the xf86-video-nv or xf86-video-vesa drivers instead or upgrade your card if you need 71xx.}}<br />
{{Box Note| Many suffer the same failure with 96xx as the above noted 71xx problem with the new xorg.}}<br />
<br />
'''1. nvidia-96xx''' ''slightly newer cards up to the GF 4.''<br />
<br />
'''2. nvidia-173xx''' ''Geforce FX series cards''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF FX''<br />
<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
# pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
# nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
# nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option &quot;RenderAccel&quot; &quot;true&quot;<br />
Option &quot;NoLogo&quot; &quot;true&quot;<br />
Option &quot;AGPFastWrite&quot; &quot;true&quot;<br />
Option &quot;EnablePageFlip&quot; &quot;true&quot;<br />
Make sure all instances of DRI are commented out:<br />
# Load &quot;dri&quot;<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies using <code>/sbin/depmod</code>:<br />
# depmod -a<br />
(A reboot may be necessary.)<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
# pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
# pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option &quot;AIGLX&quot; &quot;True&quot; to Section ServerFlags and Option &quot;Composite&quot; &quot;True&quot; to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to successfully start '''X''' from the command line before installing a complete desktop environment, you can do so by configuring ~/.xinitrc to invoke '''Xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages. More advanced users who are comfortable with '''X''' configuration may choose to skip this optional step.<br />
==== Configure ~/.xinitrc====<br />
<br />
One of the main functions of this file is to dictate what '''X''' Window client is invoked with the '''/usr/bin/startx''' and/or '''/usr/bin/xinit''' program ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) There are vast amounts of additional configurable specifications and commands that may also be added to ~/[[.xinitrc]] as you further customize your system. <br />
{{Box Note | '''[[.xinitrc]]''' is a so-called 'dot' (.) file. Files in a UNIX filesystem which are preceded with a dot (.) are 'hidden', and will not show up with a regular 'ls' command, usually for the sake of keeping directories tidy. Dot files may be seen by issuing '''ls -a'''. The 'rc' denotes ''Run Commands'' and simply indicates that it is a configuration file. Since it controls how a program runs, it is (although historically incorrect) also said to stand for &quot;Run Control&quot;.}}<br />
<br />
'''startx/xinit''' will start the '''X''' server and clients. To determine the client to run, '''startx/xinit''' will first look to parse a [[.xinitrc]] file in the user's home directory. In the absence of file ~/[[.xinitrc]], it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/[[.xinitrc]] file, a TWM session will start.) Further details in the [[.xinitrc]] wiki entry.<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
# su - ''yourusername''<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
* If you installed from a fresh (Core) install, it does not include the X window manager, so .xinitrc does not exist in /etc/skel. Instead, use the sample provided [[Xinitrc#A_standard_.xinitrc | here]].<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
$ cp /etc/skel/[[.xinitrc]] ~/<br />
Edit the file: <br />
$ nano ~/.xinitrc<br />
and add &quot;<code>exec xterm</code>&quot; so that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
{{Box Note | ''Be sure to have only '''one''' uncommented '''exec''' line in your ~/.xinitrc''.}}<br />
Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
====Perform the test====<br />
<br />
Test your configurations by starting '''X''' as '''normal, non-root''' user, with:<br />
<br />
$ startx<br />
or<br />
$ xinit<br />
<br />
You should have an '''xterm''' session open up. You can test your keyboard and its layout in it.<br />
<br />
You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing &quot;exit&quot;. If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works 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. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
* '''[[#LXDE|LXDE]]''' is a minimal DE based on the Openbox window manager. It provides most things you need for a modern desktop while keeping relatively low system resource usage. LXDE is a good choice for those who want a quick way of setting up a pre-configured Openbox system.<br />
<br />
If you desire a lighter, less demanding GUI to configure manually, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT include such features as panels, applets, icons, applications, etc., by default.<br />
* Lightweight floating WM's include: [[#Openbox|'''Openbox''']], [[#Fluxbox|'''Fluxbox''']], [[#fvwm2|'''fvwm2''']], '''Windowmaker, Pekwm, and TWM'''.<br />
* If you need something completely different, try '''Awesome, ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may wish to save time by installing visually pleasing, true type fonts, before installing a desktop environment/window manager. Dejavu and bitstream-vera are good, general-purpose font sets. You may also want to have the Microsoft font sets, which are especially popular on websites. <br />
<br />
Install with:<br />
# pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to specify the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell, in the future, to open your DE/WM of choice:<br />
<br />
$ nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below:<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The &quot;exec&quot; prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
* [[#GNOME|'''GNOME''']]<br />
* [[#KDE|'''KDE''']]<br />
* [[#Xfce|'''Xfce''']]<br />
* [[#LXDE|'''LXDE''']]<br />
* [[#Openbox|'''Openbox''']]<br />
* [[#Fluxbox|'''Fluxbox''']]<br />
* [[#fvwm2|'''fvwm2''']]<br />
<br />
===GNOME===<br />
====About GNOME====<br />
The '''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. The GNOME project provides two things: The GNOME desktop environment, an intuitive and attractive desktop for end-users, and the GNOME development platform, an extensive framework for building applications that integrate into the rest of the desktop.<br />
<br />
====Installation====<br />
Install the base GNOME environment with:<br />
# pacman -S gnome<br />
<br />
Additionally, you can install the extras:<br />
# pacman -S gnome-extra<br />
<br />
It's safe to choose all packages shown in the extra package. <br />
<br />
====Useful DAEMONS for GNOME====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. Some users prefer to use the '''hal''' daemon. The '''hal''' daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The '''fam''' daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. Both '''hal''' and '''fam''' can make life easier for the GNOME user. The hal and fam packages are installed when you install GNOME, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
# /etc/rc.d/hal start<br />
<br />
# /etc/rc.d/fam start<br />
<br />
Add them to your /etc/rc.conf DAEMONS section, so they will be invoked at boot:<br />
# nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
(If you prefer to log into the console and manually start X, leave out gdm.)<br />
<br />
<br />
You may want to install a graphical login manager. For GNOME, the '''gdm''' daemon is a good choice. <br />
<br />
As root:<br />
# pacman -S gdm<br />
<br />
As normal user, start X:<br />
$ startx<br />
or<br />
$ xinit<br />
If ~/.xinitrc is not configured for GNOME, you may always start it with '''xinit''', followed by the path to GNOME:<br />
$ xinit /usr/bin/gnome-session<br />
<br />
Advanced instructions for installing and configuring GNOME can be found in the [[Gnome]] article.<br />
<br />
Congratulations! Welcome to your GNOME desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
====Eye Candy====<br />
By default, GNOME does not come with many themes and icons. You may wish to install some more attractive artwork for GNOME:<br />
<br />
A nice gtk (gui widget) theme engine (includes themes) is the murrine engine. Install with:<br />
# pacman -S gtk-engine-murrine<br />
<br />
Once it has been installed, select it with System -> Preferences -> Appearance -> Theme tab.<br />
<br />
The Arch Linux repositories also have a few more nice themes and engines. Install the following to see for yourself:<br />
<br />
# pacman -S gtk-engines gtk2-themes-collection gtk-aurora-engine gtk-candido-engine gtk-rezlooks-engine<br />
<br />
You can find many more themes, icons, and wallpapers at [http://www.gnome-look.org GNOME-Look].<br />
<br />
===KDE===<br />
====About KDE====<br />
The '''K''' '''D'''esktop '''E'''nvironment. KDE is a powerful Free Software graphical desktop environment for GNU/Linux and <code>UNIX</code> workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of <code>UNIX</code>-like operating systems.<br />
<br />
====Installation====<br />
Choose one of the following, then continue below with '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
1. The package '''kde''' is the official and complete vanilla KDE 4.1 residing under the Arch [extra] repo.<br />
<br />
Install this before: <br />
# pacman -S zlib shared-mime-info<br />
Install with pacman: <br />
# pacman -S kde<br />
<br />
2. Alternatively, there exists a project called '''KDEmod''' (recently referred to collectively as the Chakra project). It is an Arch Linux exclusive, community-driven system, designed for modularity and offers a choice between KDE 3.5.10 or 4.x.x. KDEmod can be installed with pacman, after adding the proper repository to /etc/pacman.conf. The project website, including complete installation instructions, can be found at [http://kdemod.ath.cx/ http://kdemod.ath.cx/].<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. Some users prefer to use the '''hal''' daemon. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
# /etc/rc.d/hal start<br />
<br />
# /etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS array, to invoke them on boot. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
{{Box Note|If you installed KDEmod3 instead of normal KDE, use kdm3 instead of kdm.}}<br />
<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on boot by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X, leave out kdm, or comment it out with a bang, ( ! ).<br />
<br />
Now try starting your X Server as normal user:<br />
$ startx<br />
or<br />
$ xinit<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and fast. Xfce is great for older hardware, and will perform excellently on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
# pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
# pacman -S xfce4-goodies gtk2-themes-collection<br />
Note: '''xfce4-xfapplet-plugin''' (a plugin that allows the use of GNOME applets in the Xfce4 panel) is part of the '''xfce4-goodies''' group and depends on '''gnome-panel''', which in turn depends on '''gnome-desktop'''. You may wish to take this into consideration before installing, since it represents a significant number of extra dependencies.<br />
<br />
If you wish to admire 'Tips and Tricks' on login, install the '''fortune-mod''' package:<br />
# pacman -S fortune-mod<br />
<br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. Some Xfce users prefer to use the '''hal''' daemon. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
# /etc/rc.d/hal start<br />
<br />
# /etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS array, to invoke them at boot.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]. Otherwise you can login in via the console and run:<br />
<br />
$ startxfce4<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===LXDE===<br />
====About LXDE====<br />
LXDE, (for ''L''ightweight ''X''11 ''D''esktop ''E''nvironment), is a new project focused on providing a modern desktop environment which aims to be lightweight, fast, intuitive and functional while keeping system resource usage low. LXDE is quite different from other desktop environments, since each component of LXDE is a discrete and independent application, and each can be easily substituted by other programs. This modular design eliminates all unnecessary dependencies and provides more flexibility. Details and screenshots available at: http://lxde.org/ <br />
<br />
LXDE provides:<br />
# The OpenBox windowmanager<br />
# PCManFM File manager<br />
# LXpanel system panel<br />
# LXSession session manager<br />
# LXAppearance GTK+ theme switcher<br />
# GPicView image viewer<br />
# Leafpad simple text editor<br />
# XArchiver: Lightweight, fast, and desktop-independent gtk+-based file archiver<br />
# LXNM (still under development): Lightweight network manager for LXDE supporting wireless connections<br />
These lightweight and versatile tools combine for quick setup, modularity and simplicity.<br />
<br />
Install LXDE with: <br />
# pacman -S lxde<br />
Add:<br />
exec startlxde<br />
to your ~/.xinitrc and start with ''startx'' or ''xinit''<br />
<br />
Further information available at the [[LXDE]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
# pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
# pacman -S openbox<br />
Additional configuration tools are also available, if desired:<br />
# pacman -S obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
# su - ''yourusername''<br />
$ mkdir -p ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
'''rc.xml''' is the main configuration file for OpenBox. It may be manually edited, (or you can use OBconf). '''menu.xml''' configures the right-click menu.<br />
<br />
You may log into OpenBox via graphical login using KDM/GDM, or from the shell using '''startx''', in which case you will need to edit your ~/.xinitrc (as non-root user) and add the following:<br />
<br />
exec openbox-session<br />
You may also start OpenBox from the shell using '''xinit''':<br />
$ xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Some useful, lightweight programs for OpenBox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager (also provides simple icons)<br />
* PcmanFM a lightweight but versatile file manager (also provides desktop icon functionality)<br />
* iDesk (available in [[AUR]]) for providing desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
# pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
==Useful Applications==<br />
For more apps, see [[Useful Applications]].<br />
<br />
=APPENDIX=<br />
See [[Beginners Guide Appendix]]</div>
Mihi