https://wiki.archlinux.org/api.php?action=feedcontributions&user=ArchEd&feedformat=atomArchWiki - User contributions [en]2024-03-28T19:00:42ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User:ArchEd&diff=644850User:ArchEd2020-12-12T13:54:43Z<p>ArchEd: Created page with "elken everywhere else."</p>
<hr />
<div>elken everywhere else.</div>ArchEdhttps://wiki.archlinux.org/index.php?title=Steam&diff=644849Steam2020-12-12T13:51:47Z<p>ArchEd: Add docs for having Steam start minimised</p>
<hr />
<div>[[Category:Gaming]]<br />
[[de:Steam]]<br />
[[fi:Steam]]<br />
[[ja:Steam]]<br />
[[zh-hans:Steam]]<br />
{{Related articles start}}<br />
{{Related|Steam/Troubleshooting}}<br />
{{Related|Steam/Game-specific troubleshooting}}<br />
{{Related|Gaming}}<br />
{{Related|Gamepad}}<br />
{{Related|List of games}}<br />
{{Related articles end}}<br />
[http://store.steampowered.com/about/ Steam] is a popular game distribution platform by Valve.<br />
<br />
{{Note|Steam for Linux only supports Ubuntu LTS.[https://support.steampowered.com/kb_article.php?ref&#61;1504-QHXN-8366] Thus, do not turn to Valve for support for issues with Steam on Arch Linux.}}<br />
<br />
== Installation ==<br />
<br />
Enable the [[multilib]] repository and [[install]] the {{Pkg|steam}} package.<br />
<br />
The following requirements must be fulfilled in order to run Steam on Arch Linux:<br />
<br />
* Installed 32-bit version [[Xorg#Driver installation|OpenGL graphics driver]].<br />
* Generated [[Locale#Generating locales|en_US.UTF-8]] locale, preventing invalid pointer error.<br />
* The GUI heavily uses the Arial font. See [[Microsoft fonts]]. An alternative is to use {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|fonts provided by Steam]] instead.<br />
* Install {{Pkg|wqy-zenhei}} to add support for Asian languages.<br />
<br />
=== SteamCMD ===<br />
<br />
Install {{AUR|steamcmd}} for the command-line version of [https://developer.valvesoftware.com/wiki/SteamCMD Steam].<br />
<br />
=== Alternative Flatpak installation ===<br />
<br />
Steam can also be installed with [[Flatpak]] as {{ic|com.valvesoftware.Steam}} from [https://flathub.org/ Flathub]. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:<br />
<br />
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo<br />
flatpak --user install flathub com.valvesoftware.Steam<br />
flatpak run com.valvesoftware.Steam<br />
<br />
The Flatpak application currently does not support themes. Also you currently can't run games via {{ic|optirun}}/{{ic|primusrun}}, see [https://github.com/flatpak/flatpak/issues/869 Issue#869] for more details.<br />
<br />
By default Steam won't be able to access your home directory, you can run the following command to allow it, so that it behaves like on Ubuntu or SteamOS:<br />
<br />
flatpak override com.valvesoftware.Steam --filesystem=$HOME<br />
<br />
==== Asian Font Problems with Flatpak ====<br />
<br />
If you are having problem getting Asian fonts to show in game, it's because org.freedesktop.Platform does not include it. First try mounting your local font :<br />
<br />
flatpak run --filesystem=~/.local/share/fonts --filesystem=~/.config/fontconfig com.valvesoftware.Steam<br />
<br />
If that doesn't work, consider this hack: make the fonts available by directly copying the font files into org.freedesktop.Platform's directories, e.g.<br />
<br />
# replace ? with your version and hash<br />
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.avail<br />
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.d <br />
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/share/fonts<br />
<br />
== Directory structure ==<br />
<br />
The default Steam install location is {{ic|~/.local/share/Steam}}. If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the {{ic|~/.steam/root}} symlink to refer to the install location.<br />
<br />
=== Library folders ===<br />
<br />
Every Steam application has a unique AppID, which you can find out by looking at its [http://store.steampowered.com/ Steam Store] page path.<br />
<br />
Steam installs games into a directory under {{ic|''LIBRARY''/steamapps/common/}}. {{ic|''LIBRARY''}} normally is <br />
{{ic|~/.steam/root}} but you can also have multiple library folders (''Steam > Settings > Downloads > Steam Library Folders'').<br />
<br />
In order for Steam to recognize a game it needs to have an<br />
{{ic|appmanifest_''AppId''.acf}} file in {{ic|''LIBRARY''/steamapps/}}. The appmanifest file uses the <br />
[https://developer.valvesoftware.com/wiki/KeyValues KeyValues] format and its {{ic|installdir}} property<br />
determines the game directory name.<br />
<br />
== Usage ==<br />
<br />
steam [ -options ] [ steam:// URL ]<br />
<br />
For the available command-line options see the [https://developer.valvesoftware.com/wiki/Command_Line_Options#Steam_.28Windows.29 Command Line Options article on the Valve Developer Wiki].<br />
<br />
Steam also accepts an optional Steam URL, see the [https://developer.valvesoftware.com/wiki/Steam_browser_protocol Steam browser procotol].<br />
<br />
== Launch options ==<br />
<br />
When you launch a Steam game, Steam executes its '''launch command''' in a [[Bash]] shell.<br />
To let you alter the launch command Steam provides '''launch options''',<br />
which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on ''Set Launch Options''.<br />
<br />
By default Steam simply appends your option string to the launch command. To set environment variables or<br />
pass the launch command as an argument to another command you can use the {{ic|%command%}} substitute.<br />
<br />
=== Examples ===<br />
<br />
* only arguments: {{ic|-foo}}<br />
* environment variables: {{ic|1=FOO=bar BAZ=bar %command% -baz}}<br />
* completely different command: {{ic|othercommand # %command%}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Start Minimized ===<br />
<br />
It's possible to have Steam start minimized to the system tray, rather than taking focus. Simply add {{ic|-silent}} to the list of arguments in the autostart file.<br />
<br />
{{hc|~/.config/autostart/steam.desktop|<nowiki><br />
...<br />
Exec=/usr/bin/steam -silent<br />
...</nowiki>}}<br />
<br />
=== Fsync patch ===<br />
<br />
Valve has [https://steamcommunity.com/app/221410/discussions/0/3158631000006906163/ released] a special kernel patch that should help increase FPS in massively-threaded applications. There are few methods to get and use this patch:<br />
<br />
* Use binary kernel provided directly from Valve. See [[Unofficial user repositories#valveaur]] and once you add this repository, kernel packages {{AUR|linux-fsync}} and {{AUR|linux-fsync-headers}} become available. You will likely need to replace some regular packages (e.g. {{pkg|nvidia}}) with [[DKMS]] packages (e.g. {{pkg|nvidia-dkms}}) as well.<br />
* Install {{AUR|linux-fsync}} kernel.<br />
* Install {{Pkg|linux-zen}} kernel that includes the fsync patches since the 5.2 release[https://github.com/zen-kernel/zen-kernel/commit/f39367fdbc68e8b1e623239d13db6efaa5a67ae1]<br />
* Install {{AUR|linux-pf}} or {{AUR|linux-pf-git}} kernel.<br />
<br />
=== Proton Steam-Play ===<br />
<br />
Valve developed a compatibility tool for Steam Play based on Wine and additional components. It allows you to launch many Windows games (see [https://www.protondb.com/ compatibility list]).<br />
<br />
It's open-source and available on [https://github.com/ValveSoftware/Proton/ Github]. Steam will install its own versions of Proton when Steam Play is enabled.<br />
<br />
Proton needs to be enabled on Steam client : {{ic|Steam > Settings > Steam Play}}. You can enable Steam Play for games that have and have not been whitelisted by Valve in that dialog.<br />
<br />
If needed, to force enable Proton or a specific version of Proton for a game, right click on the game, click {{ic|Properties > General > Force the use of a specific Steam Play compatibility tool}}, and select the desired version. Doing so can also be used to force games that have a Linux port to use the Windows version.<br />
<br />
You can also install Proton from AUR with {{AUR|proton}} or {{AUR|proton-git}}, but extra setup is required for them to work with Steam. See the Proton Github for details on how Steam recognizes Proton installs.<br />
<br />
=== Big Picture Mode without a window manager ===<br />
<br />
To start Steam in Big Picture Mode from a [[Display manager]], you can either:<br />
<br />
* Install {{AUR|steamos-compositor}}<br />
* Alternatively, install {{AUR|steamos-compositor-plus}}, which hides the annoying color flashing on startup of Proton games and adds a fix for games that start in the background<br />
* Manually add a Steam entry (''but you lose the steam compositor advantages: mainly you '''can't''' control Big Picture mode with keyboard or gamepad''):<br />
<br />
create a {{ic|/usr/share/xsessions/steam-big-picture.desktop}} file with the following contents: <br />
<br />
{{hc|/usr/share/xsessions/steam-big-picture.desktop|<nowiki><br />
[Desktop Entry]<br />
Name=Steam Big Picture Mode<br />
Comment=Start Steam in Big Picture Mode<br />
Exec=/usr/bin/steam -bigpicture<br />
TryExec=/usr/bin/steam<br />
Icon=<br />
Type=Application</nowiki>}}<br />
<br />
=== Steam skins ===<br />
<br />
The Steam interface can be customized using skins. Skins can overwrite interface-specific files in {{ic|~/.steam/root}}.<br />
<br />
To install a skin:<br />
<br />
# Place its directory in {{ic|~/.steam/root/skins}}.<br />
# Open ''Steam > Settings > Interface'' and select it.<br />
# Restart Steam.<br />
<br />
An extensive list of skins can be found in [http://forums.steampowered.com/forums/showthread.php?t=1161035 this Steam forums post].<br />
<br />
{{Note|Using an outdated skin may cause visual errors.}}<br />
<br />
==== Creating skins ====<br />
<br />
Nearly all Steam styles are defined in {{ic|~/.steam/root/resource/styles/steam.styles}} (the file is over 3,500 lines long). For a skin to be recognized it needs its own {{ic|resource/styles/steam.styles}}.<br />
When a Steam update changes the official {{ic|steam.styles}} your skin may become outdated, potentially resulting in visual errors.<br />
<br />
See {{ic|~/.steam/root/skins/skins_readme.txt}} for a primer on how to create skins.<br />
<br />
=== Changing the Steam notification position ===<br />
<br />
The default Steam notification position is bottom right.<br />
<br />
You can change the Steam notification position by altering {{ic|Notifications.PanelPosition}} in<br />
<br />
* {{ic|resource/styles/steam.styles}} for desktop notifications, and<br />
* {{ic|resource/styles/gameoverlay.styles}} for in-game notifications<br />
<br />
Both files are overwritten by Steam on startup and {{ic|steam.styles}} is only read on startup.<br />
<br />
{{Note|Some games do not respect the setting in {{ic|gameoverlay.styles}} e.g. XCOM: Enemy Unknown.}}<br />
<br />
==== Use a skin ====<br />
<br />
You can create a skin to change the notification position to your liking. For example to change the position to top right:<br />
<br />
$ cd ~/.steam/root/skins<br />
$ mkdir -p Top-Right/resource<br />
$ cp -r ~/.steam/root/resource/styles Top-Right/resource<br />
$ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*<br />
<br />
==== Live patching ====<br />
<br />
{{ic|gameoverlay.styles}} can be overwritten while Steam is running, allowing you to have game-specific notification positions.<br />
<br />
{{hc|~/.steam/notifpos.sh|<br />
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles<br />
}}<br />
<br />
And the [[#Launch options]] should be something like:<br />
<br />
~/.steam/notifpos.sh TopLeft && %command%<br />
<br />
=== Steam Remote Play ===<br />
<br />
{{Note|Steam In-Home Streaming [https://store.steampowered.com/news/51761/ has become Steam Remote Play].}}<br />
<br />
Steam has built-in support for [http://store.steampowered.com/streaming/ remote play].<br />
<br />
See [https://steamcommunity.com/sharedfiles/filedetails/?id=680514371 this Steam Community guide] on how to setup a headless streaming server on Linux.<br />
<br />
=== Steam Controller ===<br />
<br />
Normally a Steam controller requires the use of the Steam-overlay. In non-Steam native Linux games however the overlay may not be practical. For that, while the Steam client is running it will maintain a "desktop configuration". With your Steam controller, configure the desktop configuration for it as a generic XBOX controller. As long as the Steam client is running you can then use your Steam controller in other games, such as GOG games, as an XBOX controller. Make sure to select your type of controller to map to in "general controller settings".<br />
<br />
== Troubleshooting ==<br />
<br />
See [[Steam/Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/Steam Gentoo Wiki article]<br />
* [https://pcgamingwiki.com/wiki/The_Big_List_of_DRM-Free_Games_on_Steam The Big List of DRM-Free Games on Steam] at PCGamingWiki<br />
* [http://steam.wikia.com/wiki/List_of_DRM-free_games List of DRM-free games] at Wikia<br />
* [http://store.steampowered.com/browse/linux Steam Linux store]<br />
* [https://github.com/ValveSoftware/Proton/ Proton] Compatibility tool for Steam Play based on Wine and additional components.</div>ArchEdhttps://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=221645Beginners' guide2012-09-05T17:18:23Z<p>ArchEd: /* Locale */</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the keymap ===<br />
<br />
{{Tip|This step is optional for the vast majority of users and it can be used at any point during the instalation. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the wifi password, etc.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB_United_States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard_layouts|here]] for a comprehensive list.<br />
<br />
{{Keypress|Alt + Shift}} activates it.<br />
<br />
Don't worry if some of the letters show up as white squares or as other symbols. It's probably just the console font missing those glyphs. The glyph codes are correct and if you press the correct keys they will show up fine when ''(or if)'' you set up a graphical environment later.<br />
<br />
=== Establish an internet connection ===<br />
<br />
The {{ic|dhcpcd}} network daemon is started automatically at boot and it will attempt to start a wired connection, if available. Try pinging a website to see if it was successful. And since Google is always on...<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, you will need to set up the network manually, as explained below.<br />
<br />
Otherwise, move on to [[#Prepare_the_storage_drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need wired connectivity (Ethernet) during the installation process. <br />
<br />
If your computer is connected to an Ethernet network, in most cases, you will have one interface, called {{ic|eth0}}. If you have additional network cards (apart from the one integrated on the motherboard, for example), their name will follow the sequence {{ic|eth1}}, {{ic|eth2}}, etc.<br />
<br />
You need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you're on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface, e.g. for {{ic|eth0}}:<br />
<br />
# ip link set eth0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add <ip address>/<subnetmask> dev <interface><br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev eth0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via <ip address><br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of 3 {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Configuring Network]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (WiFi) 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. Note that the following quick-start procedure ''executed at this point in the installation'' will initialize your wireless hardware for use ''in the live environment of the installation media''. These steps (or some other form of wireless management) '''must be repeated from the actual installed system after booting into it'''.<br />
<br />
Also note that these steps are optional if wireless connectivity is unnecessary at this point in the installation; wireless functionality may always be established later.<br />
<br />
{{Note|The following examples use {{ic|wlan0}} for the interface and {{ic|linksys}} for the ESSID. Remember to change these values according to your setup.}}<br />
<br />
The basic procedure will be:<br />
<br />
* (optional) Identify the wireless interface:<br />
<br />
# lspci | grep -i net<br />
<br />
Or, if using a USB adapter:<br />
<br />
# lsusb<br />
<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with {{ic|iwconfig}}:<br />
<br />
{{hc|# iwconfig|<nowiki><br />
lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0</nowiki>}}<br />
<br />
{{ic|wlan0}} is the available wireless interface in this example. <br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
* Bring the interface up with:<br />
<br />
# ip link set wlan0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If the wireless chipset requires firmware, you are likely to receive this error when bringing the interface up:<br />
<br />
{{hc|# ip link set wlan0 up|<br />
SIOCSIFFLAGS: No such file or directory}}<br />
<br />
If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset.<br />
<br />
Example output from an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{pkg|netcfg}}'s wifi-menu to connect to a network:<br />
<br />
# wifi-menu wlan0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
If you have a modem or a router in bridge mode, run:<br />
<br />
# pppoe-setup<br />
<br />
* Type in the username that the ISP provided you with.<br />
* Press {{Keypress|Enter}} for "eth0".<br />
* Press {{Keypress|Enter}} for "no", so that it stays up continuously.<br />
* Type {{ic|server}} (since this is usually the case).<br />
* Press {{Keypress|1}} for a firewall.<br />
* Type in the password that the ISP provided you with.<br />
* Press {{Keypress|y}} at the end.<br />
<br />
To use these settings and connect to your ISP, run:<br />
<br />
# pppoe-start<br />
<br />
For an ''analog'' modem, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. '''[[Proxy|Click here]]''' for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, ran from a "live" Linux distribution such as [[Wikipedia:Parted_Magic|Parted Magic]], [[Wikipedia:Ubuntu_(operating_system)|Ubuntu]], [[Wikipedia:Linux_Mint|Linux Mint]], etc. See [[Partitioning]] for some general tips and make sure to format the partitions with a filesystem (e.g. '''ext4''', '''btrfs''', etc) before rebooting.<br />
<br />
If you have already done so, proceed to [[#Mount_the_partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools:<br />
<br />
* [[Wikipedia:cfdisk|cfdisk]] – supports only [[MBR]] partition tables.<br />
<br />
* [[Wikipedia:gdisk|gdisk]] – supports only [[GPT]] partition tables.<br />
<br />
* [[Wikipedia:parted|parted]] – supports both.<br />
<br />
This example uses '''cfdisk''', but it can be easily followed using '''gdisk''', which will allow for GPT partitioning.<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
{{Note|If you are not dual booting with Windows, then it is advisable to use [[GPT]] instead of [[MBR]]. GPT partitioning can only be done with '''gdisk''' or '''parted'''. Read [[GPT]] for the list of advantages.}}<br />
<br />
# cfdisk /dev/sda<br />
<br />
The example system will contain a 15GB root ({{ic|/}}) partition, a 1GB {{ic|swap}} partition, and a {{ic|/home}} partition for the remaining space.<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
{{Note|If you have a UEFI motherboard you will need another partition to host the UEFI System partition. Read [[Unified_Extensible_Firmware_Interface#Create_an_UEFI_System_Partition_in_Linux|this article]].}}<br />
<br />
;Root:<br />
<br />
* Choose New (or press {{Keypress|N}}).<br />
* Press {{Keypress|Enter}} for Primary.<br />
* Type "15440".<br />
* Press {{Keypress|Enter}} for Beginning.<br />
* Press {{Keypress|Enter}} for Bootable.<br />
<br />
;Swap:<br />
<br />
* Press the down arrow to move to the free space area and choose New (or press {{Keypress|N}}).<br />
* Press {{Keypress|Enter}} for Primary.<br />
* Type "1024".<br />
* Press {{Keypress|Enter}} for Beginning.<br />
* Choose Type (or press {{Keypress|T}}).<br />
* Press any key to scroll down the list.<br />
* Press {{Keypress|Enter}} for {{ic|82}}.<br />
<br />
;Home:<br />
<br />
* Press the down arrow to move to the free space area and choose New (or press {{Keypress|N}}).<br />
* Press {{Keypress|Enter}} for Primary.<br />
* Press {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
<br />
Here's how it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15440<br />
sda2 Primary Linux swap / Solaris 1024<br />
sda3 Primary Linux 133000*<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to quit without saving changes and then restart cfdisk.<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit cfdisk without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda3<br />
<br />
Format and activate the swap partition:<br />
<br />
# mkswap /dev/sda2<br />
# swapon /dev/sda2<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To see the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
Pay attention, because the mounting order is important.<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount any other separate partition (/home, /boot, /var, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda3 /mnt/home<br />
# mkdir /mnt/boot<br />
# mount /dev/sda''x'' /mnt/boot<br />
<br />
=== Select installation mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|2=<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
## Score: #, Country<br />
Server = http://mirror.example.xyz/archlinux/$repo/os/$arch<br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it's usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|Use the [http://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
# pacstrap /mnt base base-devel<br />
<br />
* {{Grp|base}}: Software packages from the [core] repo to provide the minimal base environment.<br />
<br />
* {{Grp|base-devel}}: Extra tools from [core] such as {{ic|make}}, and {{ic|automake}}. Most beginners should choose to install it, as it will likely be needed to expand the system. The ''base-devel'' group will be required to install software from the [[Arch User Repository]].<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
{{Note|If pacman fails to verify your packages, check your system time. If the system date is invalid (e.g. it shows year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, either by doing so manually or with the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. If you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively. It's also a good idea to check it before continuing:<br />
<br />
{{Note|If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
Only the "/" partition needs "1" for the last field. Everything else should have "2" or "0" (see [[Fstab#Field_definitions|Field definitions]]).<br />
<br />
=== Chroot into the system ===<br />
<br />
Next we [[chroot]] into our newly installed system.<br />
<br />
# arch-chroot /mnt<br />
<br />
=== Configure the base system ===<br />
<br />
{{Tip|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 />
{{ic|/etc/rc.conf}} is the configuration file for Arch's initscripts, and in the past used to also contain configurations for other parts of the system. Unless you are using an alternate init system like [[systemd]], this file specifies which daemons to start during boot-up and some networking and storage information.<br />
<br />
{{Note|Using the legacy configuration options in {{ic|rc.conf}} for system configuring still works (for now) with the default init system, but the new configuration files take precedence and using them is recommended. The new files will also work for configuring [[systemd]].}}<br />
<br />
{| class="wikitable"<br />
|-<br />
! scope="col"| Configuration<br />
! scope="col"| Configuration file(s)<br />
! scope="col"| Legacy [https://projects.archlinux.org/initscripts.git/tree/rc.conf?id=97f0cd6751e8d22c14d7492cdc2186cf41157ba6 rc.conf] section<br />
|-<br />
| align="center"|Hostname<br />
| align="left"|{{ic|/etc/hostname}}<br />
{{ic|/etc/hosts}}<br />
| align="center"|{{ic|NETWORKING}}<br />
|-<br />
| align="center"|Console fonts and keymap<br />
| align="left"|{{ic|/etc/vconsole.conf}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Locale<br />
| align="left"|{{ic|/etc/locale.conf}}<br />
{{ic|/etc/locale.gen}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Timezone<br />
| align="left"|{{ic|/etc/timezone}}<br />
{{ic|/etc/localtime}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Hardware clock<br />
| align="left"|{{ic|/etc/adjtime}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Kernel modules<br />
| align="left"|{{ic|/etc/modules-load.d/}}<br />
| align="center"|{{ic|HARDWARE}}<br />
|-<br />
| align="center"|Daemons<br />
| align="left"|{{ic|/etc/rc.conf}}<br />
| align="center"|{{ic|DAEMONS}}<br />
|-<br />
| align="center"|Wired network<br />
| align="left"|{{ic|/etc/rc.conf}}<br />
| align="center"|{{ic|NETWORKING}}<br />
|}<br />
<br />
Configuration files can be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
For this, you can use the editor [[Nano]]. Press {{Keypress|Ctrl+X}} and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename, or you can press {{Keypress|N}} to exit without saving.<br />
<br />
==== Hostname ====<br />
<br />
Add your ''hostname'' in {{ic|/etc/hostname}}:<br />
<br />
# echo '''myhostname''' > /etc/hostname<br />
<br />
Set it to your liking (e.g. ''arch''). This is the name of your computer. And add it to {{ic|/etc/hosts}}, as well:<br />
<br />
{{Warning|This format, including {{ic|localhost}} and your actual hostname, is required for program compatibility. Errors in these entries may cause poor network performance and/or certain programs to open very slowly, or not work at all.}}<br />
<br />
{{hc|# nano /etc/hosts|<br />
127.0.0.1 localhost.localdomain localhost '''myhostname'''<br />
::1 localhost.localdomain localhost '''myhostname'''<br />
<br />
#192.168.1.100 '''myhostname'''.domain.org '''myhostname''' #Uncomment if you use a static IP and remove this comment.}}<br />
<br />
{{Note|{{ic|::1}} is the IPv6 equivalent of {{ic|127.0.0.1}} and should be added.}}<br />
<br />
{{Tip|For convenience, you may also use {{ic|/etc/hosts}} aliases for hosts on your network, and/or on the Web.<br />
<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
<br />
The above example would allow you access a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
==== Console fonts and keymap ====<br />
<br />
To edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=us<br />
FONT=<br />
FONT_MAP=}}<br />
<br />
* {{ic|KEYMAP}} – If you want, you can use the one from the beginning of the install process: [[#Change_the_keymap|Change the keymap]], but the default ({{ic|us}}) is fine for the vast majority of keyboards. Please note that this setting is only valid for your TTYs, not any graphical window managers or '''Xorg'''.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe.<br />
<br />
* {{ic|FONT_MAP}} – Defines the console map to load with the setfont program at boot. Possible maps are found in {{ic|/usr/share/kbd/consoletrans}}, if needed. The default (blank) is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Timezone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
If you are using systemd's timedated, you might wish to also edit the file {{ic|/etc/timezone}} and write your {{ic|Zone}}/{{ic|Subzone}}.<br />
<br />
'''Example:'''<br />
<br />
{{hc|# nano /etc/timezone|<br />
Europe/Minsk}}<br />
<br />
Read {{ic|man tzset}} for more options.<br />
<br />
The need for {{ic|/etc/timezone}} might go away in the future [http://cgit.freedesktop.org/systemd/systemd/commit/?id=9cb48731b29f508178731b45b0643c816800c05e].<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. For a comprehensive list of locales and what they stand for, see [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 here].<br />
<br />
If you would like to receive system messages in English during the install process and after rebooting, keep reading. Otherwise, see the [[#Example_for_languages_other_than_English|example]].<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English, as long as you choose their [[Wikipedia:UTF-8|UTF-8]] encoding.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file doesn't exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
{{Note|This file must be readable by regular users, so don't set any weird permissions for it. It is read when a user logs in.}}<br />
<br />
# echo "LANG=en_US.UTF-8" > /etc/locale.conf<br />
<br />
To use other {{ic|LC_*}} variables, first run {{ic|locale}} to see the available options. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
{{Warning|Using the {{ic|LC_ALL}} variable is strongly discouraged because it overrides everything.}}<br />
<br />
{{Note|Some people have reported errors using this, whereby {{ic|locale -a}} and {{ic|locale}} was incorrectly reporting the locale and would generate the {{ic|bsdcpio: Failed to set default locale.}} error. This can be fixed by <br />
{{ic|export "LANG&#61;locale"}} <br />
where "locale" is the user's locale.}}<br />
<br />
===== Example for languages other than English =====<br />
<br />
If you would like to receive system messages in some other language than English during the install process and after rebooting ''(German, in this example)'', the above procedures are:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
# echo "LANG=de_DE.UTF-8" > /etc/locale.conf<br />
# export LANG=de_DE.UTF-8<br />
<br />
==== Hardware clock ====<br />
<br />
{{Note|Make sure that {{ic|HARDWARECLOCK}} isn't set in {{ic|/etc/rc.conf}}.}}<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC_in_Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''. If you want such functionality (NTP sync), you should use [[ntpd]] on your Arch Linux installation instead.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and remove any time-related daemons from {{ic|/etc/rc.conf}}. This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight_savings_time|DTS]] kicks in. So please don't ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|All needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example can be found [[VirtualBox#Auto-start_modules|here]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Daemons ====<br />
<br />
{{Tip|The {{ic|DAEMONS}} line need not be changed at this time, but it is useful to explain what daemons are, as they will be addressed later in this guide.}}<br />
<br />
[[Wikipedia:Daemon (computing)|Daemons]] are programs that run in the background, waiting for events to occur and offering services. A few good examples are: a web server that waits for a request to deliver a page (e.g. {{ic|httpd}}), an SSH server waiting for a user to log in (e.g. {{ic|sshd}}), a daemon which writes system messages to a log file (e.g. {{ic|syslog-ng}}), a BitTorrent client (e.g. {{ic|rtorrent}}, {{ic|deluged}}), a music player (e.g. {{ic|mpd}}), a login manager (e.g. {{ic|gdm}}, {{ic|slim}}), a firewall (e.g. {{ic|iptables}}), etc. While these are full-featured applications, their work is usually not that visible. Their main advantage is that even if Xorg crashes (or is absent from the system), they will continue to work.<br />
<br />
Daemons can be added to the {{ic|DAEMONS}} line in {{ic|/etc/rc.conf}} and they will start when the system boots, in the order that they are placed. Their names are the equivalent scripts from {{ic|/etc/rc.d/}}.<br />
<br />
{{hc|# nano /etc/rc.conf|2=<br />
DAEMONS=(network @syslog-ng netfs @crond)}}<br />
<br />
* If a script name is prefixed with a bang ({{ic|!}}), it is not run.<br />
<br />
* If a script is prefixed with an "at" symbol ({{ic|@}}), it is run in the background; the startup sequence will not wait for successful completion of this daemon before continuing to the next (this may shorten system boot time). Do not background daemons that are needed by other daemons. For example, {{ic|mpd}} depends on {{ic|network}}, so backgrounding {{ic|network}} may cause {{ic|mpd}} to break.<br />
<br />
* Edit this line whenever new system services are installed, if starting them automatically during boot is desired.<br />
<br />
A list of available services (and their running status) can be found using the command:<br />
<br />
# rc.d list<br />
<br />
=== Configure the network ===<br />
<br />
You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described [[#Establish_an_internet_connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Configuring Network]] and [[Wireless Setup]].}}<br />
<br />
==== Wired ====<br />
<br />
If you only use a single fixed wired network connection, you can use the {{ic|network}} daemon, a simple solution for both dynamic and static IP addressing.<br />
<br />
First, ensure that the daemon is listed in the {{ic|DAEMONS}} array:<br />
<br />
{{hc|# nano /etc/rc.conf|2=<br />
DAEMONS=(... network ...)}}<br />
<br />
Then configure the {{ic|NETWORKING}} section of {{ic|/etc/rc.conf}} as follows, depending on your IP addressing type:<br />
<br />
; Dynamic IP<br />
<br />
Assuming the network interface to activate at start is {{ic|eth0}}, use this configuration:<br />
<br />
interface=eth0<br />
address=<br />
netmask=<br />
gateway=<br />
<br />
Your DNS server addresses will be automatically filled in by the {{ic|dhcpcd}} daemon.<br />
<br />
; Static IP<br />
<br />
If you have a static IP address, use this configuration:<br />
<br />
interface=eth0<br />
address=192.168.0.2<br />
netmask=255.255.255.0<br />
broadcast=192.168.0.255<br />
gateway=192.168.0.1<br />
<br />
You will also need to add your name servers' (DNS) IP addresses and your local domain name to your {{ic|/etc/resolv.conf}} like this:<br />
<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com<br />
<br />
{{Tip|The {{ic|network}} daemon is suitable for systems connecting wired to a single network. For multiple network configurations (e.g. using a laptop), it is recommended to use a network manager program, such as [[netcfg]], which has been designed to manage both wired and wireless connections.}}<br />
<br />
==== Wireless ====<br />
<br />
The {{ic|network}} daemon is not sufficient to handle wireless networking. You will need to install other programs to configure and manage wireless network profiles, such as [[netcfg]].<br />
<br />
[[NetworkManager]] and [[Wicd]] are other popular alternatives.<br />
<br />
* Install the required packages:<br />
<br />
# pacman -S wireless_tools netcfg<br />
<br />
If you use WPA/WPA2 encryption, install:<br />
<br />
# pacman -S wpa_supplicant wpa_actiond<br />
<br />
If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless_Setup#Drivers_and_firmware|here]]), install the package containing your firmware. For example:<br />
<br />
# pacman -S zd1211-firmware<br />
<br />
* Connect to the network with {{ic|wifi-menu}} (optionally checking the interface name with {{ic|ip link}}, but usually it's {{ic|wlan0}}), which will generate a profile file in {{ic|/etc/network.d}} named after the SSID. There are also templates available in {{ic|/etc/network.d/examples/}} for manual configuration.<br />
<br />
# wifi-menu<br />
<br />
* Add {{ic|net-auto-wireless}} to the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}, daemon which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
{{Note|[[Netcfg]] also provides {{ic|net-auto-wired}}, which can be used in conjunction with {{ic|net-auto-wireless}}.}}<br />
<br />
{{hc|# nano /etc/rc.conf|2=<br />
DAEMONS=(... net-auto-wireless ...)}}<br />
<br />
* Make sure that the correct wireless interface (usually {{ic|wlan0}}) is set in {{ic|/etc/conf.d/netcfg}}:<br />
<br />
{{hc|# nano /etc/conf.d/netcfg|2=<br />
WIRELESS_INTERFACE="wlan0"}}<br />
<br />
It is also possible to define a list of network profiles that should be automatically connected, using the {{ic|AUTO_PROFILES}} variable in {{ic|/etc/conf.d/netcfg}}. If {{ic|AUTO_PROFILES}} is not set, all known wireless networks will be tried.<br />
<br />
==== Direct Modem Connection ====<br />
<br />
For xDSL, analog modem (dial-up) and ISDN, see [[Direct Modem Connection]] for detailed instructions.<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
Configure {{ic|/etc/mkinitcpio.conf}} as needed (see [[mkinitcpio]]) and create an initial ramdisk with<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Tip|Most users can simply accept the defaults provided in the {{ic|/etc/mkinitcpio.conf}} file.}}<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
Install either Syslinux or GRUB. There is no need to install both. Syslinux is considered to be easier to understand and to configure because it has only one configuration file. In spite of GRUB's many configuration files ''(for which the recommended method is to re-generate the {{ic|grub.cfg}} file each time you change anything in one of those files)'', using GRUB could make it more comfortable to transition to BURG in the future, a much more [http://code.google.com/p/burg/wiki/Screenshots customizable] GRUB fork. Of course, Syslinux can also be customized. [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 (*)]<br />
<br />
==== Syslinux ====<br />
<br />
{{Note|Syslinux does not yet support [[UEFI]].}}<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the files ({{ic|-i}}), mark the partition ''active'' with the ''boot'' flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -iam<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as we did in [[#Prepare_the_storage_drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|<nowiki><br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...</nowiki>}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
==== GRUB ====<br />
<br />
For BIOS motherboards:<br />
<br />
# pacman -S grub-bios<br />
# grub-install --target=i386-pc --recheck /dev/sda<br />
<br />
For UEFI motherboards:<br />
<br />
# pacman -S grub-efi-x86_64<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
{{Note|In rare cases you may need to use {{ic|grub-efi-i386}} instead; on older macs for instance, where Apple hardware uses some kind of mixture between UEFI v1.x and v2.x. In such cases, GRUB would only work with 32 bit modules, even though the CPU may be 64 bit.}}<br />
<br />
{{Note|GRUB is not the only UEFI bootloader available. See [[UEFI Bootloaders]].}}<br />
<br />
To prevent a (harmless) error message at boot time:<br />
<br />
# mkdir -p /boot/grub/locale<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Create the {{ic|grub.cfg}} file:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} before running the next command:<br />
# pacman -S os-prober<br />
}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them.<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Exit the install, and reboot:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it!}}<noinclude>{{Beginners' Guide navigation}}</noinclude></div>ArchEdhttps://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=221644Beginners' guide2012-09-05T17:15:41Z<p>ArchEd: /* Locale */</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the keymap ===<br />
<br />
{{Tip|This step is optional for the vast majority of users and it can be used at any point during the instalation. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the wifi password, etc.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB_United_States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard_layouts|here]] for a comprehensive list.<br />
<br />
{{Keypress|Alt + Shift}} activates it.<br />
<br />
Don't worry if some of the letters show up as white squares or as other symbols. It's probably just the console font missing those glyphs. The glyph codes are correct and if you press the correct keys they will show up fine when ''(or if)'' you set up a graphical environment later.<br />
<br />
=== Establish an internet connection ===<br />
<br />
The {{ic|dhcpcd}} network daemon is started automatically at boot and it will attempt to start a wired connection, if available. Try pinging a website to see if it was successful. And since Google is always on...<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, you will need to set up the network manually, as explained below.<br />
<br />
Otherwise, move on to [[#Prepare_the_storage_drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need wired connectivity (Ethernet) during the installation process. <br />
<br />
If your computer is connected to an Ethernet network, in most cases, you will have one interface, called {{ic|eth0}}. If you have additional network cards (apart from the one integrated on the motherboard, for example), their name will follow the sequence {{ic|eth1}}, {{ic|eth2}}, etc.<br />
<br />
You need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you're on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface, e.g. for {{ic|eth0}}:<br />
<br />
# ip link set eth0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add <ip address>/<subnetmask> dev <interface><br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev eth0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via <ip address><br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of 3 {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Configuring Network]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (WiFi) 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. Note that the following quick-start procedure ''executed at this point in the installation'' will initialize your wireless hardware for use ''in the live environment of the installation media''. These steps (or some other form of wireless management) '''must be repeated from the actual installed system after booting into it'''.<br />
<br />
Also note that these steps are optional if wireless connectivity is unnecessary at this point in the installation; wireless functionality may always be established later.<br />
<br />
{{Note|The following examples use {{ic|wlan0}} for the interface and {{ic|linksys}} for the ESSID. Remember to change these values according to your setup.}}<br />
<br />
The basic procedure will be:<br />
<br />
* (optional) Identify the wireless interface:<br />
<br />
# lspci | grep -i net<br />
<br />
Or, if using a USB adapter:<br />
<br />
# lsusb<br />
<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with {{ic|iwconfig}}:<br />
<br />
{{hc|# iwconfig|<nowiki><br />
lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0</nowiki>}}<br />
<br />
{{ic|wlan0}} is the available wireless interface in this example. <br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
* Bring the interface up with:<br />
<br />
# ip link set wlan0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If the wireless chipset requires firmware, you are likely to receive this error when bringing the interface up:<br />
<br />
{{hc|# ip link set wlan0 up|<br />
SIOCSIFFLAGS: No such file or directory}}<br />
<br />
If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset.<br />
<br />
Example output from an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{pkg|netcfg}}'s wifi-menu to connect to a network:<br />
<br />
# wifi-menu wlan0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
If you have a modem or a router in bridge mode, run:<br />
<br />
# pppoe-setup<br />
<br />
* Type in the username that the ISP provided you with.<br />
* Press {{Keypress|Enter}} for "eth0".<br />
* Press {{Keypress|Enter}} for "no", so that it stays up continuously.<br />
* Type {{ic|server}} (since this is usually the case).<br />
* Press {{Keypress|1}} for a firewall.<br />
* Type in the password that the ISP provided you with.<br />
* Press {{Keypress|y}} at the end.<br />
<br />
To use these settings and connect to your ISP, run:<br />
<br />
# pppoe-start<br />
<br />
For an ''analog'' modem, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. '''[[Proxy|Click here]]''' for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, ran from a "live" Linux distribution such as [[Wikipedia:Parted_Magic|Parted Magic]], [[Wikipedia:Ubuntu_(operating_system)|Ubuntu]], [[Wikipedia:Linux_Mint|Linux Mint]], etc. See [[Partitioning]] for some general tips and make sure to format the partitions with a filesystem (e.g. '''ext4''', '''btrfs''', etc) before rebooting.<br />
<br />
If you have already done so, proceed to [[#Mount_the_partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools:<br />
<br />
* [[Wikipedia:cfdisk|cfdisk]] – supports only [[MBR]] partition tables.<br />
<br />
* [[Wikipedia:gdisk|gdisk]] – supports only [[GPT]] partition tables.<br />
<br />
* [[Wikipedia:parted|parted]] – supports both.<br />
<br />
This example uses '''cfdisk''', but it can be easily followed using '''gdisk''', which will allow for GPT partitioning.<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
{{Note|If you are not dual booting with Windows, then it is advisable to use [[GPT]] instead of [[MBR]]. GPT partitioning can only be done with '''gdisk''' or '''parted'''. Read [[GPT]] for the list of advantages.}}<br />
<br />
# cfdisk /dev/sda<br />
<br />
The example system will contain a 15GB root ({{ic|/}}) partition, a 1GB {{ic|swap}} partition, and a {{ic|/home}} partition for the remaining space.<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
{{Note|If you have a UEFI motherboard you will need another partition to host the UEFI System partition. Read [[Unified_Extensible_Firmware_Interface#Create_an_UEFI_System_Partition_in_Linux|this article]].}}<br />
<br />
;Root:<br />
<br />
* Choose New (or press {{Keypress|N}}).<br />
* Press {{Keypress|Enter}} for Primary.<br />
* Type "15440".<br />
* Press {{Keypress|Enter}} for Beginning.<br />
* Press {{Keypress|Enter}} for Bootable.<br />
<br />
;Swap:<br />
<br />
* Press the down arrow to move to the free space area and choose New (or press {{Keypress|N}}).<br />
* Press {{Keypress|Enter}} for Primary.<br />
* Type "1024".<br />
* Press {{Keypress|Enter}} for Beginning.<br />
* Choose Type (or press {{Keypress|T}}).<br />
* Press any key to scroll down the list.<br />
* Press {{Keypress|Enter}} for {{ic|82}}.<br />
<br />
;Home:<br />
<br />
* Press the down arrow to move to the free space area and choose New (or press {{Keypress|N}}).<br />
* Press {{Keypress|Enter}} for Primary.<br />
* Press {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
<br />
Here's how it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15440<br />
sda2 Primary Linux swap / Solaris 1024<br />
sda3 Primary Linux 133000*<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to quit without saving changes and then restart cfdisk.<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit cfdisk without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda3<br />
<br />
Format and activate the swap partition:<br />
<br />
# mkswap /dev/sda2<br />
# swapon /dev/sda2<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To see the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
Pay attention, because the mounting order is important.<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount any other separate partition (/home, /boot, /var, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda3 /mnt/home<br />
# mkdir /mnt/boot<br />
# mount /dev/sda''x'' /mnt/boot<br />
<br />
=== Select installation mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|2=<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
## Score: #, Country<br />
Server = http://mirror.example.xyz/archlinux/$repo/os/$arch<br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it's usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|Use the [http://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
# pacstrap /mnt base base-devel<br />
<br />
* {{Grp|base}}: Software packages from the [core] repo to provide the minimal base environment.<br />
<br />
* {{Grp|base-devel}}: Extra tools from [core] such as {{ic|make}}, and {{ic|automake}}. Most beginners should choose to install it, as it will likely be needed to expand the system. The ''base-devel'' group will be required to install software from the [[Arch User Repository]].<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
{{Note|If pacman fails to verify your packages, check your system time. If the system date is invalid (e.g. it shows year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, either by doing so manually or with the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. If you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively. It's also a good idea to check it before continuing:<br />
<br />
{{Note|If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
Only the "/" partition needs "1" for the last field. Everything else should have "2" or "0" (see [[Fstab#Field_definitions|Field definitions]]).<br />
<br />
=== Chroot into the system ===<br />
<br />
Next we [[chroot]] into our newly installed system.<br />
<br />
# arch-chroot /mnt<br />
<br />
=== Configure the base system ===<br />
<br />
{{Tip|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 />
{{ic|/etc/rc.conf}} is the configuration file for Arch's initscripts, and in the past used to also contain configurations for other parts of the system. Unless you are using an alternate init system like [[systemd]], this file specifies which daemons to start during boot-up and some networking and storage information.<br />
<br />
{{Note|Using the legacy configuration options in {{ic|rc.conf}} for system configuring still works (for now) with the default init system, but the new configuration files take precedence and using them is recommended. The new files will also work for configuring [[systemd]].}}<br />
<br />
{| class="wikitable"<br />
|-<br />
! scope="col"| Configuration<br />
! scope="col"| Configuration file(s)<br />
! scope="col"| Legacy [https://projects.archlinux.org/initscripts.git/tree/rc.conf?id=97f0cd6751e8d22c14d7492cdc2186cf41157ba6 rc.conf] section<br />
|-<br />
| align="center"|Hostname<br />
| align="left"|{{ic|/etc/hostname}}<br />
{{ic|/etc/hosts}}<br />
| align="center"|{{ic|NETWORKING}}<br />
|-<br />
| align="center"|Console fonts and keymap<br />
| align="left"|{{ic|/etc/vconsole.conf}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Locale<br />
| align="left"|{{ic|/etc/locale.conf}}<br />
{{ic|/etc/locale.gen}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Timezone<br />
| align="left"|{{ic|/etc/timezone}}<br />
{{ic|/etc/localtime}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Hardware clock<br />
| align="left"|{{ic|/etc/adjtime}}<br />
| align="center"|{{ic|LOCALIZATION}}<br />
|-<br />
| align="center"|Kernel modules<br />
| align="left"|{{ic|/etc/modules-load.d/}}<br />
| align="center"|{{ic|HARDWARE}}<br />
|-<br />
| align="center"|Daemons<br />
| align="left"|{{ic|/etc/rc.conf}}<br />
| align="center"|{{ic|DAEMONS}}<br />
|-<br />
| align="center"|Wired network<br />
| align="left"|{{ic|/etc/rc.conf}}<br />
| align="center"|{{ic|NETWORKING}}<br />
|}<br />
<br />
Configuration files can be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
For this, you can use the editor [[Nano]]. Press {{Keypress|Ctrl+X}} and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename, or you can press {{Keypress|N}} to exit without saving.<br />
<br />
==== Hostname ====<br />
<br />
Add your ''hostname'' in {{ic|/etc/hostname}}:<br />
<br />
# echo '''myhostname''' > /etc/hostname<br />
<br />
Set it to your liking (e.g. ''arch''). This is the name of your computer. And add it to {{ic|/etc/hosts}}, as well:<br />
<br />
{{Warning|This format, including {{ic|localhost}} and your actual hostname, is required for program compatibility. Errors in these entries may cause poor network performance and/or certain programs to open very slowly, or not work at all.}}<br />
<br />
{{hc|# nano /etc/hosts|<br />
127.0.0.1 localhost.localdomain localhost '''myhostname'''<br />
::1 localhost.localdomain localhost '''myhostname'''<br />
<br />
#192.168.1.100 '''myhostname'''.domain.org '''myhostname''' #Uncomment if you use a static IP and remove this comment.}}<br />
<br />
{{Note|{{ic|::1}} is the IPv6 equivalent of {{ic|127.0.0.1}} and should be added.}}<br />
<br />
{{Tip|For convenience, you may also use {{ic|/etc/hosts}} aliases for hosts on your network, and/or on the Web.<br />
<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
<br />
The above example would allow you access a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
==== Console fonts and keymap ====<br />
<br />
To edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=us<br />
FONT=<br />
FONT_MAP=}}<br />
<br />
* {{ic|KEYMAP}} – If you want, you can use the one from the beginning of the install process: [[#Change_the_keymap|Change the keymap]], but the default ({{ic|us}}) is fine for the vast majority of keyboards. Please note that this setting is only valid for your TTYs, not any graphical window managers or '''Xorg'''.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe.<br />
<br />
* {{ic|FONT_MAP}} – Defines the console map to load with the setfont program at boot. Possible maps are found in {{ic|/usr/share/kbd/consoletrans}}, if needed. The default (blank) is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Timezone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
If you are using systemd's timedated, you might wish to also edit the file {{ic|/etc/timezone}} and write your {{ic|Zone}}/{{ic|Subzone}}.<br />
<br />
'''Example:'''<br />
<br />
{{hc|# nano /etc/timezone|<br />
Europe/Minsk}}<br />
<br />
Read {{ic|man tzset}} for more options.<br />
<br />
The need for {{ic|/etc/timezone}} might go away in the future [http://cgit.freedesktop.org/systemd/systemd/commit/?id=9cb48731b29f508178731b45b0643c816800c05e].<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. For a comprehensive list of locales and what they stand for, see [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 here].<br />
<br />
If you would like to receive system messages in English during the install process and after rebooting, keep reading. Otherwise, see the [[#Example_for_languages_other_than_English|example]].<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English, as long as you choose their [[Wikipedia:UTF-8|UTF-8]] encoding.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file doesn't exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
{{Note|This file must be readable by regular users, so don't set any weird permissions for it. It is read when a user logs in.}}<br />
<br />
# echo "LANG=en_US.UTF-8" > /etc/locale.conf<br />
<br />
To use other {{ic|LC_*}} variables, first run {{ic|locale}} to see the available options. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
{{Warning|Using the {{ic|LC_ALL}} variable is strongly discouraged because it overrides everything.}}<br />
<br />
{{Note|Some people have reported errors using this, whereby {{ic|locale -a}} was incorrectly reporting the locale. This can be fixed by <br />
{{ic|export "LANG&#61;locale"}} <br />
where "locale" is the user's locale.}}<br />
<br />
===== Example for languages other than English =====<br />
<br />
If you would like to receive system messages in some other language than English during the install process and after rebooting ''(German, in this example)'', the above procedures are:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
# echo "LANG=de_DE.UTF-8" > /etc/locale.conf<br />
# export LANG=de_DE.UTF-8<br />
<br />
==== Hardware clock ====<br />
<br />
{{Note|Make sure that {{ic|HARDWARECLOCK}} isn't set in {{ic|/etc/rc.conf}}.}}<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC_in_Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''. If you want such functionality (NTP sync), you should use [[ntpd]] on your Arch Linux installation instead.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and remove any time-related daemons from {{ic|/etc/rc.conf}}. This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight_savings_time|DTS]] kicks in. So please don't ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|All needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example can be found [[VirtualBox#Auto-start_modules|here]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Daemons ====<br />
<br />
{{Tip|The {{ic|DAEMONS}} line need not be changed at this time, but it is useful to explain what daemons are, as they will be addressed later in this guide.}}<br />
<br />
[[Wikipedia:Daemon (computing)|Daemons]] are programs that run in the background, waiting for events to occur and offering services. A few good examples are: a web server that waits for a request to deliver a page (e.g. {{ic|httpd}}), an SSH server waiting for a user to log in (e.g. {{ic|sshd}}), a daemon which writes system messages to a log file (e.g. {{ic|syslog-ng}}), a BitTorrent client (e.g. {{ic|rtorrent}}, {{ic|deluged}}), a music player (e.g. {{ic|mpd}}), a login manager (e.g. {{ic|gdm}}, {{ic|slim}}), a firewall (e.g. {{ic|iptables}}), etc. While these are full-featured applications, their work is usually not that visible. Their main advantage is that even if Xorg crashes (or is absent from the system), they will continue to work.<br />
<br />
Daemons can be added to the {{ic|DAEMONS}} line in {{ic|/etc/rc.conf}} and they will start when the system boots, in the order that they are placed. Their names are the equivalent scripts from {{ic|/etc/rc.d/}}.<br />
<br />
{{hc|# nano /etc/rc.conf|2=<br />
DAEMONS=(network @syslog-ng netfs @crond)}}<br />
<br />
* If a script name is prefixed with a bang ({{ic|!}}), it is not run.<br />
<br />
* If a script is prefixed with an "at" symbol ({{ic|@}}), it is run in the background; the startup sequence will not wait for successful completion of this daemon before continuing to the next (this may shorten system boot time). Do not background daemons that are needed by other daemons. For example, {{ic|mpd}} depends on {{ic|network}}, so backgrounding {{ic|network}} may cause {{ic|mpd}} to break.<br />
<br />
* Edit this line whenever new system services are installed, if starting them automatically during boot is desired.<br />
<br />
A list of available services (and their running status) can be found using the command:<br />
<br />
# rc.d list<br />
<br />
=== Configure the network ===<br />
<br />
You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described [[#Establish_an_internet_connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Configuring Network]] and [[Wireless Setup]].}}<br />
<br />
==== Wired ====<br />
<br />
If you only use a single fixed wired network connection, you can use the {{ic|network}} daemon, a simple solution for both dynamic and static IP addressing.<br />
<br />
First, ensure that the daemon is listed in the {{ic|DAEMONS}} array:<br />
<br />
{{hc|# nano /etc/rc.conf|2=<br />
DAEMONS=(... network ...)}}<br />
<br />
Then configure the {{ic|NETWORKING}} section of {{ic|/etc/rc.conf}} as follows, depending on your IP addressing type:<br />
<br />
; Dynamic IP<br />
<br />
Assuming the network interface to activate at start is {{ic|eth0}}, use this configuration:<br />
<br />
interface=eth0<br />
address=<br />
netmask=<br />
gateway=<br />
<br />
Your DNS server addresses will be automatically filled in by the {{ic|dhcpcd}} daemon.<br />
<br />
; Static IP<br />
<br />
If you have a static IP address, use this configuration:<br />
<br />
interface=eth0<br />
address=192.168.0.2<br />
netmask=255.255.255.0<br />
broadcast=192.168.0.255<br />
gateway=192.168.0.1<br />
<br />
You will also need to add your name servers' (DNS) IP addresses and your local domain name to your {{ic|/etc/resolv.conf}} like this:<br />
<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com<br />
<br />
{{Tip|The {{ic|network}} daemon is suitable for systems connecting wired to a single network. For multiple network configurations (e.g. using a laptop), it is recommended to use a network manager program, such as [[netcfg]], which has been designed to manage both wired and wireless connections.}}<br />
<br />
==== Wireless ====<br />
<br />
The {{ic|network}} daemon is not sufficient to handle wireless networking. You will need to install other programs to configure and manage wireless network profiles, such as [[netcfg]].<br />
<br />
[[NetworkManager]] and [[Wicd]] are other popular alternatives.<br />
<br />
* Install the required packages:<br />
<br />
# pacman -S wireless_tools netcfg<br />
<br />
If you use WPA/WPA2 encryption, install:<br />
<br />
# pacman -S wpa_supplicant wpa_actiond<br />
<br />
If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless_Setup#Drivers_and_firmware|here]]), install the package containing your firmware. For example:<br />
<br />
# pacman -S zd1211-firmware<br />
<br />
* Connect to the network with {{ic|wifi-menu}} (optionally checking the interface name with {{ic|ip link}}, but usually it's {{ic|wlan0}}), which will generate a profile file in {{ic|/etc/network.d}} named after the SSID. There are also templates available in {{ic|/etc/network.d/examples/}} for manual configuration.<br />
<br />
# wifi-menu<br />
<br />
* Add {{ic|net-auto-wireless}} to the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}, daemon which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
{{Note|[[Netcfg]] also provides {{ic|net-auto-wired}}, which can be used in conjunction with {{ic|net-auto-wireless}}.}}<br />
<br />
{{hc|# nano /etc/rc.conf|2=<br />
DAEMONS=(... net-auto-wireless ...)}}<br />
<br />
* Make sure that the correct wireless interface (usually {{ic|wlan0}}) is set in {{ic|/etc/conf.d/netcfg}}:<br />
<br />
{{hc|# nano /etc/conf.d/netcfg|2=<br />
WIRELESS_INTERFACE="wlan0"}}<br />
<br />
It is also possible to define a list of network profiles that should be automatically connected, using the {{ic|AUTO_PROFILES}} variable in {{ic|/etc/conf.d/netcfg}}. If {{ic|AUTO_PROFILES}} is not set, all known wireless networks will be tried.<br />
<br />
==== Direct Modem Connection ====<br />
<br />
For xDSL, analog modem (dial-up) and ISDN, see [[Direct Modem Connection]] for detailed instructions.<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
Configure {{ic|/etc/mkinitcpio.conf}} as needed (see [[mkinitcpio]]) and create an initial ramdisk with<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Tip|Most users can simply accept the defaults provided in the {{ic|/etc/mkinitcpio.conf}} file.}}<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
Install either Syslinux or GRUB. There is no need to install both. Syslinux is considered to be easier to understand and to configure because it has only one configuration file. In spite of GRUB's many configuration files ''(for which the recommended method is to re-generate the {{ic|grub.cfg}} file each time you change anything in one of those files)'', using GRUB could make it more comfortable to transition to BURG in the future, a much more [http://code.google.com/p/burg/wiki/Screenshots customizable] GRUB fork. Of course, Syslinux can also be customized. [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 (*)]<br />
<br />
==== Syslinux ====<br />
<br />
{{Note|Syslinux does not yet support [[UEFI]].}}<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the files ({{ic|-i}}), mark the partition ''active'' with the ''boot'' flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -iam<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as we did in [[#Prepare_the_storage_drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|<nowiki><br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...</nowiki>}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
==== GRUB ====<br />
<br />
For BIOS motherboards:<br />
<br />
# pacman -S grub-bios<br />
# grub-install --target=i386-pc --recheck /dev/sda<br />
<br />
For UEFI motherboards:<br />
<br />
# pacman -S grub-efi-x86_64<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
<br />
{{Note|In rare cases you may need to use {{ic|grub-efi-i386}} instead; on older macs for instance, where Apple hardware uses some kind of mixture between UEFI v1.x and v2.x. In such cases, GRUB would only work with 32 bit modules, even though the CPU may be 64 bit.}}<br />
<br />
{{Note|GRUB is not the only UEFI bootloader available. See [[UEFI Bootloaders]].}}<br />
<br />
To prevent a (harmless) error message at boot time:<br />
<br />
# mkdir -p /boot/grub/locale<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Create the {{ic|grub.cfg}} file:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} before running the next command:<br />
# pacman -S os-prober<br />
}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them.<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Exit the install, and reboot:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it!}}<noinclude>{{Beginners' Guide navigation}}</noinclude></div>ArchEd