https://wiki.archlinux.org/api.php?action=feedcontributions&user=Alsvartr&feedformat=atom
ArchWiki - User contributions [en]
2024-03-28T21:12:44Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=MATE_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=178309
MATE (Русский)
2012-01-14T11:37:01Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:Desktop environments (Русский)]]<br />
<br />
{{i18n|MATE}}<br />
<br />
Проект MATE Desktop Environment - это форк GNOME 2 и попытка его дальнейшего развития. Более подробная информация [https://bbs.archlinux.org/viewtopic.php?id=121162 находится в этой ветке форума]<br />
<br />
==Получение MATE==<br />
<br />
MATE доступен в AUR ({{Package AUR|mate-desktop-environment}}), размещён на [https://github.com/Perberos/Mate-Desktop-Environment Github] и на двух зеркалах pacman.<br />
<br />
==Установка==<br />
<br />
Для установки MATE через pacman добавьте одно из следующих зеркал в конфигурационный файл /etc/pacman.conf:<br />
<br />
[mate]<br />
Server = ftp://tridex.net/repo/archlinux/mate/$arch<br />
Server = http://tridex.net/repo/archlinux/mate/$arch<br />
<br />
{{Note|Эти зеркала поддерживаются членами сообщества.}}<br />
<br />
Затем:<br />
<br />
# pacman -Syy<br />
# pacman -S mate<br />
<br />
Очень вероятно, что будут некоторые конфликты файлов при установке. Просто переименуйте проблемные файлы или устанавливайте с флагом --force.<br />
<br />
Вам также потребуется менеджер входа (gdm, kdm, slim и т.п.) и dbus.<br />
<br />
{{Note|Сейчас многие пакеты MATE конфликтуют или замещают некоторые пакеты GNOME.}}<br />
<br />
==Запуск MATE==<br />
<br />
Перед запуском MATE убедитесь, что dbus присутствует в массиве DAEMONS файла /etc/rc.conf.<br />
<br />
===GDM (Old)===<br />
<br />
Если вы используете gdm-old из AUR, просто выберите сессию MATE из списка сессий. При первом запуске MATE убедитесь, что нажали "Только эта сессия" при запросе.<br />
<br />
===Без менеджера входа (startx)===<br />
<br />
Для того, чтобы запустить MATE без менеджера входа, Вам необходимо добавить:<br />
<br />
exec ck-launch-session mate-session<br />
<br />
в файл: ~/.xinitrc file и затем выполнить:<br />
<br />
$ startx<br />
<br />
==Ребрендинг основных приложений==<br />
<br />
Важно заметить, что многие основные приложения GNOME были переименованы для MATE, в соответствии с условиями их лицензии. Вот некоторые примеры переименования приложений GNOME -> MATE. <br />
<br />
* Nautilus переименован в '''caja'''<br />
* Metacity переименован в '''marco'''<br />
* Gconf переименован в '''mate-conf'''<br />
<br />
У остальных приложений и основных компонентов с префиксом GNOME (таких, как GNOME Panel, GNOME Menus и т.п.) были просто изменены префиксы на "MATE" (например: MATE Panel и MATE Menus).<br />
<br />
==Дополнительные приложения==<br />
<br />
Ещё не все дополнительные приложения GNOME, написанные на GTK2, были форкнуты. Следующие приложения '''доступны''' в MATE:<br />
<br />
* Totem (mate-video-player)<br />
* Eye of GNOME (mate-image-viewer)<br />
* Gedit (mate-text-editor)<br />
* File Roller (mate-extract)<br />
* GNOME Panel applets (mate-applets)<br />
* GNOME Terminal (mate-terminal)<br />
<br />
Если вы используете NetworkManager для подключения к интернету, то можете установить {{Package AUR|network-manager-applet-gtk2}} из AUR, чтобы иметь возможность использовать сетевой апплет (nm-applet) на GTK2 для панели GNOME. Вам необходимо изменить PKGBUILD так, чтобы он зависел от mate-bluetooth вместо gnome-bluetooth, чтобы предотвратить рекурсивные зависимости от gnome-desktop.<br />
<br />
==Использование Compiz Fusion без Emerald==<br />
<br />
Если вы хотите использовать Marco с [[Compiz Fusion]], установите и запустите Compiz Fusion как обычно и установите пакет ''gtk-window-decorator'', затем выполните следующие команды для создания символических ссылок:<br />
<br />
# ln -s /usr/lib/libmarco-private.so.0 /usr/lib/libmetacity-private.so.0<br />
<br />
Включите плагин декорации окон в менеджере настроек Compiz Fusion и выполните в командной строке:<br />
<br />
gtk-window-decorator --replace<br />
<br />
Тем не менее, без перекомпиляции gtk-window-decorator, необходимые ключи mateconf не будут созданы и вы будете привязанны к основным декорациям Cairo. Возможно создать эти ключи самостоятельно.<br />
<br />
==Известные проблемы==<br />
<br />
===Случаи бесконечного перезапуска файлового менеджера===<br />
<br />
После входа в систему вы можете обнаружить, что файловый менеджер Caja постоянно перезапускается и никогда не завершается. Временное исправление проблемы делается с помощью следующей команды:<br />
<br />
# ln -s /usr/lib/libgnutls.so /usr/lib/libgnutls.so.26<br />
<br />
После этого перезайдите в систему.<br />
<br />
Это также может исправить проблему с добавлением апплета часов на панель.<br />
<br />
===Qt-приложения не стилизованы под GTK2===<br />
<br />
Вы можете обнаружить, что приложения, написанные на Qt4, не наследуют темы GTK2 как должны. Это может быть исправлено просто - установкой libgnomeui с флагом --force. Вероятно, это будет исправлено в течение развития проекта MATE.<br />
<br />
===Я не могу зайти в настройки аудио!===<br />
<br />
В текущий момент нет версии mate-volume-control, так что аудио-настройки на панели недоступны. Возможно, это будет исправлено позднее, или вы можете собрать пакет самостоятельно. Так же вы можете использовать другие регуляторы громкости, например [http://aur.archlinux.org/packages.php?ID=33525 volti]<br />
<br />
===Evolution Email не работает===<br />
<br />
Пожалуйста, посмотрите [[Evolution#Using_Evolution_Outside_Of_Gnome]].</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=User:Alsvartr&diff=104700
User:Alsvartr
2010-04-25T22:02:43Z
<p>Alsvartr: Created page with 'nazarov.pn@gmail.com'</p>
<hr />
<div>nazarov.pn@gmail.com</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Music_Player_Daemon_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=72013
Music Player Daemon (Русский)
2009-07-14T16:21:33Z
<p>Alsvartr: альтернатив чему? fixed</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Звук]]<br />
[[category:Демоны и системные службы]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Русский|MPD - Music Player Daemon (Русский)}}<br />
{{i18n_entry|English|mpd}}<br />
{{i18n_entry|Nederlands|Music Player Daemon (Nederlands)}}<br />
{{i18n_entry|Polski|mpd (polski)}}<br />
{{i18n_links_end}}<br />
<br />
== Введение ==<br />
MPD - это музыкальный проигрыватель, имеющий клиент-серверную архитектуру. MPD запускается в фоне как демон, управляет плейлистами и базой данных музыки и использует очень мало ресурсов. Для взаимодействия с ним вам нужен отдельный клиент. За более подробной информацией обращайтесь на их [http://www.musicpd.org/ вебсайт]<br />
<br />
== Установка демона ==<br />
<br />
* Синхронизируемся и устанавливаем с помощью pacman:<br />
<br />
<pre><br />
pacman -Sy mpd<br />
</pre><br />
<br />
== Настройка MPD ==<br />
<br />
* Отредактируйте mpd.conf<br />
<br />
Чтобы сделать вывод аудио действительно рабочим, убедитесь, что аудиокарта и микшер настроены правильно. Смотрите /var/log/mpd/mpd.error если он все-таки не работает<br />
<br />
<pre><br />
#cp /etc/mpd.conf.example /etc/mpd.conf<br />
#{ваш редактор} /etc/mpd.conf<br />
</pre><br />
<br />
* Файл подробно документирован, за более подробной информацией о настройке MPD обратитесь по адресу http://mpd.wikia.com/wiki/Configuration<br />
<br />
* Создайте две директории, если они ещё не существуют: ~/.mpd и ~/.mpd/playlists<br />
<br />
* Создайте базу данных MPD (может потребовать много времени, зависит от размера вашей музыкальной коллекции): <br />
<br />
<pre><br />
/etc/rc.d/mpd create-db<br />
</pre><br />
<br />
* Запустите MPD:<br />
<br />
<pre><br />
/etc/rc.d/mpd start<br />
</pre><br />
<br />
* Если вы хотите, чтобы MPD стартовал при загрузке системы, отредактируйте '''/etc/rc.conf''' и добавьте '''mpd''' в список демонов.<br />
<br />
'''Примечание:''' в случае проблем с правами, возникающих при использовании ESD с MPD выполните это как root:<br />
<pre><br />
chsh -s /bin/true mpd<br />
</pre><br />
<br />
=== Советы ===<br />
<br />
Чтобы избавиться от тайм-аутов (например, когда вы приостановили музыку на длительное время) в gpmc и других клиентах, раскомментируйте и увеличьте <code> connection_timeout </code> параметр в mpd.conf.<br />
<br />
Если файлы и/или названия показываются в неправильной кодировке, раскомментируйте и измените параметры <code> filesystem_charset </code> и <code> id3v1_encoding </code>.<br />
При этом вы не сможете выбрать кодировку ID3 v2 тэгов. Чтобы это обойти, вы можете использовать [http://mpd.wikia.com/wiki/GenericDecoder#Generic_Tagreader внешний считыватель тэгов.]<br />
<br />
== Установка клиента ==<br />
<br />
* Установите различные клиентские программы:<br />
<br />
<pre><br />
pacman -Sy mpc ncmpc sonata gmpc glurp<br />
</pre><br />
<br />
'''mpc''' - консольный клиент (думаю, что рано или поздно он вам понадобится)<br />
<br />
'''ncmpc''' - NCurses клиент (очень удобен для запуска в консоли). [http://hem.bredband.net/kaw/ncmpc/ Официальный сайт ncmpc]<br />
<br />
'''sonata''' - Python GTK+ клиент. [http://sonata.berlios.de/ Официальный сайт Sonata] ''(удостоверьтесь, что репозиторий '''community'''подключен в '''/etc/pacman.conf''')''<br />
<br />
'''gmpc''' - Gnome клиент [http://gmpc.wikia.com/wiki/Gnome_Music_Player_Client Официальный сайт gmpc]<br />
<br />
'''glurp''' - GTK2.4+ клиент. Легковесный и аскетичный, ничего лишнего. [http://mpd.wikia.com/wiki/Client:Glurp Страница glurp]<br />
<br />
== Дополнительные возможности ==<br />
<br />
=== Скробблинг на Last.fm ===<br />
<br />
Для скробблинга (передачи вашей статистики прослушивания музыки) на [http://www.last.fm Last.fm] используя MPD есть несколько способов. Наиболее простой путь, если вас не смущает то, что придется всё время держать программу запущенной, это использовать Sonata, которая является графическим фронт-эндом к MPD. Sonata обладает встроенной поддержкой скробблинга на Last.fm, включаемой в её настройках.<br />
<br />
Если вы не очень заинтересованы в использовании Sonata (или в том, чтобы держать её запущенной всё время), то существуют консольные клиенты (mpdscribble и lastfmsubmitid), запускающиеся как фоновые процессы, которые собирают информацию о статусе MPD и передают её на Last.fm<br />
<br />
==== Установка и настройка mpdscribble ====<br />
<br />
Для того, чтобы установить mpdscribble, подключите репозиторий [community] и выполните:<br />
<br />
pacman -Sy mpdscribble<br />
<br />
Все настройки хранятся в файле<br />
<br />
~/.mpdscribble/mpdscribble.conf<br />
<br />
Откройте его любым текстовым редактором, его содержимое должно быть примерно таким:<br />
<br />
username = login ### имя вашего пользователя на Last.fm,<br />
password = md5-хэш_пароля_аккаунта_lastfm<br />
log = /home/user/.mpdscribble/mpdscribble.log ### путь к лог-файлу, через который очень удобно наблюдать за передаваемой статистикой<br />
cache = /home/user/.mpdscribble/cache ### путь к кэшу, в котором сохраняется информации о статистике, когда нет возможности её передать<br />
sleep = 5<br />
<br />
Чтобы получить md5-хэш от пароля вашего аккаунта на Last.fm - выполните:<br />
<br />
echo -n 'ваш_пароль' | md5sum<br />
<br />
полученная строка и будет являться md5-хэшем<br />
<br />
Для автоматического запуска mpdscribble при загрузке нужно добавить его в секцию DAEMONS в файле /etc/rc.conf<br />
<br />
==== Установка и настройка lastfmsubmitd ====<br />
<br />
Для того, чтобы установить lastfmsubmitd , подключите репозиторий [community] и выполните:<br />
<br />
pacman -Sy lastfmsubmitd<br />
<br />
lastfmsubmitd представляет из себя два демона, следовательно - два файла конфигурации<br />
<br />
Первый файл - /etc/lastfmsubmitd.conf - содержит информацию о аккаунте Last.fm и выглядит примерно так:<br />
<br />
[account]<br />
user: имя_пользователя_Last.fm<br />
password: пароль_аккаунта<br />
<br />
Второй файл - /etc/lastmp.conf - содержит информацию о MPD, его примерное содержание:<br />
<br />
[mpd]<br />
host: localhost ### название компьютера, на котором запущен MPD<br />
port: 6600 ### порт, на котором запущен MPD<br />
#password: ***** ### пароль для доступа к MPD, указывается, если требуется<br />
<br />
Для автоматического запуска при загрузке добавьте lastfmsubmitd и lastmp в секцию DAEMONS в файле /etc/rc.conf<br />
<br />
=== MPD & Alsa ===<br />
<br />
Временами, когда у вас используются другие аудиосигналы (например некоторые web-сайты с flash-роликами) MPD больше не может ничего воспроизвести? Чудес не бывает!, ошибки выглядят примерно так: (если искать их в файле /var/log/mpd.error)<br />
<br />
Error opening alsa device "hw:0,0": Device or resource busy<br />
<br />
И вот правильное решение (dmix снова спасает наши жизни), примените эти строки к файлу /etc/mpd.conf<br />
<br />
audio_output {<br />
type "alsa"<br />
name "Sound Card"<br />
options "dev=dmixer"<br />
device "plug:dmix"<br />
}<br />
<br />
и перезапустите MPD<br />
<br />
<pre><br />
/etc/rc.d/mpd restart<br />
</pre><br />
<br />
<br />
<br />
== Полезные ссылки ==<br />
<br />
[http://www.musicpd.org/ Официальный веб-сайт]<br />
<br />
[http://mpd.wikia.com/wiki/Main_Page Официальное Wiki]<br />
<br />
[http://mpd.wikia.com/wiki/Clients Упорядоченный лист клиентов для MPD]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=54914
Beginners' guide (Русский)
2008-12-05T07:49:17Z
<p>Alsvartr: /* GRUB */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
{{Box Note |'''По возможности, пользуйтесь английской версией этого документа, т.к. именно она обновляется в первую очередь, содержит все последние изменения и самую актуальную на данный момент информацию.'''}}<br />
{{Box Note|'''Уважаемые переводчики, прежде чем переводить какой-либо раздел, сравните его с английской версией ибо информация в нём могла устареть'''}}<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружение рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно, если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с большим набором софта на CD (или даже DVD), включающим стандартное Рабочее Окружение(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жёсткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. Попросту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." - Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведённые инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надёжной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезным [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставьте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфигурации загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жёсткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жёсткого диска|Подготовке жёсткого диска]].<br />
<br />
====Подготовка жёсткого диска====<br />
Выберите первый пункт меню - "Prepare Hard Drive". Вам будет предложено автоматически подготовить ваш жёсткий диск к установке Arch Linux, либо вручную переразбить и подготовить разделы.<br />
* 1. Автоматическая подготовка<br />
Установщик сам разобъёт ваш жесткий диск на следующие разделы:<br />
* Загрузочный раздел /boot c файловой системой ext2 и размером по умолчанию в 32 мегабайта. Вы сможете изменить это значение. <br />
* Раздел подкачки swap с размером по умолчанию в 256 мегабайтов. Вы также сможете изменить это значение.<br />
* Отдельные разделы для корня / и домашней директории пользователей /home. Размеры вы определяете сами. Также вам будет предоставлен выбор из файловых систем: ext2, ext3, reiserfs, xfs и jfs. Но следует учесть, что оба этих раздела должны быть отформатированы в одинаковой файловой системе.<br />
<br />
Не забывайте - автоматическая подготовка сотрёт все данные на вашем жёстком диске! Внимательно читайте предупреждение установщика.<br />
<br />
* 2. '''(Рекомендуется)''' Ручная подготовка<br />
<br />
Выберите из списка жёсткий диск, на который будет произведена установка (/dev/sd''x'').<br />
<br />
''На этом этапе более опытные пользователи могут сразу перейти к главе о '''[[#Выбор Пакетов|выборе пакетов]]'''.''<br />
<br />
=====Информация о разбивке=====<br />
Разбивка жёсткого диска заключается в создании отдельных зон (разделов) на жёстком диске. Они будут выглядеть как отдельные диски со своими файловыми системами. Разделы подразделяются на "Основные" (Primary), "Расширенные" (Extended) и "Логические" (Logical).<br />
<br />
'''Основные''' разделы могут быть загрузочными и их количество ограничено четырьмя. Больше четырёх главных разделов создать нельзя и нужно использовать '''Расширенные''' разделы, которые будут содержать '''Логические'''.<br />
<br />
Расширенные разделы не могут быть использованы сами по себе - они всего лишь "контейнеры" для логических. Жёсткий диск может содержать только один расширенный раздел, который может быть разделён на логические.<br />
<br />
Во время разбивки диска можно заметить схему нумерации разделов. Главные получают названия sda1-3, расширенный раздел - sda4, а логические, соответственно, sda5, sda6 и т.д.<br />
<br />
=====Раздел Подкачки (swap)=====<br />
Данный раздел является чем-то вроде "виртуального ОЗУ". На нем хранятся данные, которые не умещаются, либо не подходят для хранения в оперативной памяти.<br />
<br />
Исторически сложилось, что размер раздела подкачки определяется по схеме 2ХОЗУ. То есть, двойной объем оперативной памяти. Затем, с развитием компьютерной техники, данное правило не всегда стало являться необходимым. На компьютере с 512 мегабайтами памяти правило 2Х все еще действует эффективно. Однако, на машинах с 1 гигабайтом памяти обычно наиболее эффективна схема 1ХОЗУ. Если размер вашего ОЗУ больше или равен 1 гигабайту, то можно вообще обойтись без раздела подкачки, однако это не рекомендуется. Мы создадим раздел размером в 1 гигабайт в нашем примере.<br />
<br />
{{Box Note|Если вы планируете использовать технологии suspend-to-disk или hibernate, то размер раздела подкачки, по меньшей мере, должен соответствовать размеру вашей оперативной памяти. Но рекомендуется задать размер хотя бы на 15% больший, чтобы учесть появление испорченных секторов на диске (bad sectors).}}<br />
=====Схема Разбивки=====<br />
Схема разбивки разделов довольно индивидуальна и во многом зависит от предпочтений и нужд конкретного пользователя. Но, как минимум, вам нужны два раздела: один для корня ( / ), второй для раздела подкачки (swap). Однако, вы можете захотеть иметь отдельные разделы для /boot (на нем обычно находится ядро Linux), /var и /home (пользовательская директория). Обычно иметь два раздела отдельно для корня ( / ) и отдельно для /home считается хорошей практикой и более удобным и безопасным решением.<br />
В нашем примере мы создадим три отдельных раздела: для корня, для /home и один раздел подкачки swap.<br />
<br />
=====cfdisk===== <br />
Итак, начнём с создания главного раздела, содержащего корневую файловую систему.<br />
<br />
Для создания нового раздела выберите пункт '''N'''ew, затем Primary. Далее задайте желаемый размер раздела (что-то между 4 и 12 гигабайт будет хорошим выбором). Выберите только что созданный раздел и сделайте его загрузочным, выбрав пункт '''B'''ootable.<br />
<br />
Также выберите пункт '''T'''ype и задайте значение '83 Linux'. Нашему разделу должно присвоится имя sda1.<br />
<br />
Затем создадим раздел подкачки. Задайте размер между 512 мегабайт и 1 гигабайтом, выберите '''T'''ype - 82 (Linux swap / Solaris). Наш раздел должен быть теперь виден как sda2.<br />
<br />
Теперь ещё один раздел для /home. Выберите главный раздел и установите желаемый размер в зависимости от того, что пользователи вашего компьютера будут хранить в своих персональных директориях. Также, как и для корня, задайте '''T'''ype - 83 Linux. Данный раздел появится как sda3.<br />
<br />
<br />
<br />
Вот как должна выглядеть наша таблица разделов (размеры могут отличаться):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Выберите '''W'''rite и нажмите ''''yes''''. Или нажмите '''Q'''uit для выхода из программы разбивки.<br />
<br />
<br />
=====Мои IDE-диски выглядят как SCSI, почему?=====<br />
В последних версиях ядра Linux все диски (IDE, SATA, SCSI) именуются как sd''x''. Пусть это вас не волнует, это нормально.<br />
<br />
====Назначение точек монтирования====<br />
Во-первых, выберите нужный раздел под раздел подкачки (в нашем примере это sda3). Во-вторых, выберите раздел для монтирования корневой ФС (sda1 в нашем примере). Вам будет предложено выбрать желаемую файловую систему.<br />
<br />
=====Файловые системы=====<br />
<br />
Выбор файловой системы достаточно субъективен. Каждая из предложенных ФС имеет свои достоинства и недостатки, всё зависит целиком от ваших предпочтений. Далее мы кратко рассмотрим поддерживаемые ФС:<br />
<br />
1. '''[http://ru.wikipedia.org/wiki/Ext2 ext2]''' - старая и надежная файловая система для ОС GNU/Linux. Очень стабильна, но без поддержки журналирования - это значит, что в случае аппаратных сбоев или перепадов напряжения ваша информация может пострадать. Не слишком хороший выбор для корневого и /home разделов. Данная ФС может быть легко преобразована в ext3.<br />
<br />
2. '''[http://ru.wikipedia.org/wiki/Ext2 ext3]''' - наследница ext2, но с поддержкой журналирования. Она полностью совместима с ext2. Однако, по некоторым тестам немного медленнее, нежели остальные ФС. Тем не менее, очень стабильна и активно используется, поддерживается и разрабатывается сообществом GNU/Linux.<br />
<br />
3. '''[http://ru.wikipedia.org/wiki/ReiserFS ReiserFS]''' - высокопроизводительная файловая система, разработанная Гансом Райзером. Считается очень быстрой, особенно при операциях с файлами маленького размера, однако сравнительно медленно монтируется. Вполне готова к использованию и стабильна. Однако, не слишком активно разрабатывается на данный момент (все силы отданы Reiser4).<br />
<br />
4. '''[http://ru.wikipedia.org/wiki/JFS JFS]''' - '''J'''ournaled '''F'''ile'''S'''ystem, файловая система от IBM. Использует наименьшее количество ресурсов центрального процессора, нежели остальные ФС. Очень быстра в монтировании и использовании. Однако, не так широко используется, как ext или ReiserFS.<br />
<br />
5. '''[http://ru.wikipedia.org/wiki/JFS XFS]''' - журналируемая ФС, которая показывает наибольшую скорость при операциях с большими файлами. Хороший выбор для разделов с большим их количеством.<br />
<br />
Наиболее значимое отличие между ними - журналирование. Все, кроме ext2, его поддерживают, однако техника журналирования не у всех одинакова. Только ext3 поддерживает хранение в журнале данных и мета-данных (информация о директориях). Это значит, что только она в случае сбоя сможет восстановить полностью в точной мере ту информационную структуру, которая была до сбоя.<br />
<br />
Выберите и создайте ФС для корня. Далее вам будет предложено создать дополнительные разделы. В нашем примере, нам понадобится создать еще sda2. Выберите файловую систему и примонтируйте ее как /home. Нажмите Done и возвращайтесь в главное меню установщика.<br />
<br />
===Выбор пакетов===<br />
На данном этапе вам предстоит выбрать пакеты, которые будут установлены на вашу систему.<br />
* Установка из Core ISO: выберите подходящее устройство CD-ROM из списка.<br />
* Установка из FTP ISO: выберите FTP/HTTP-зеркало для получения пакетов.<br />
<br />
Процесс выбора пакетов разбит на две стадии: выбор категорий пакетов, а затем - выбор отдельных пакетов в этих категориях. С помощью клавиши пробела вы можете устанавливать и снимать выделение пакетов и категорий. Ниже приведен список категорий пакетов с объяснениями:<br />
<br />
* '''BASE:''' содержит только базовые, необходимые системные пакеты. Минимальный набор для базовой системы.<br />
*'''SUPPORT:''' здесь находятся дополнительные пакеты для работы с сетью и файловыми системами. Например, такие как gpm, fuse, dnsutils, ndiswrapper, ntfs-3g, драйвера для wi-fi адаптеров и т.п.<br />
*'''DEVEL:''' пакеты для сборки программ. То есть, GCC, autoconf, automake, make и т.п.<br />
*'''LIB:''' различные системные библиотеки - gmp, libelf, libevent и т.п.<br />
<br />
Нажмите OK и далее выберите опцию 'yes', когда вам будет предложено выбрать все пакеты по умолчанию ('Select all packages by default').<br />
<br />
Далее вам будет показан список пакетов в выбранных категориях. Для новичка будет лучшим выбором оставить всё как есть. Тогда как более опытные пользователи могут убрать ненужные им пакеты из данного списка.<br />
<br />
===Установка пакетов===<br />
Теперь выберите пункт 'Install Packages', чтобы начать установку пакетов. Вам будет предложено сохранить загруженные из источника установки пакеты в системном кэше. Это хороший выбор, который может очень вам помочь, если какой-либо новый установленный пакет будет работать не так, как надо. Тогда можно просто восстановить старую версию из кэша. Помните, что вы всегда можете очистить ваш кэш вручную при необходимости.<br />
Установщик произведет установку выбранных вами пакетов и ядра Arch Linux в вашу новую систему.<br />
<br />
*FTP ISO: менеджер пакетов [[Pacman_(Русский)|Pacman]] установит пакеты с сетевого зеркала (прогресс вы можете наблюдать на vc5, а чтобы вернуться назад к установщику - перейдите на vc1).<br />
*CORE ISO: пакеты будут установлены с оптического диска.<br />
<br />
===Конфигурация системы===<br />
''Чёткое следование и понимание следующих шагов является ключем к корректной работе системы.'' <br />
<br />
Установщик спросит вас о необходимости использования [[Hwdetect|hwdetect]] для сбора информации о параметрах компьютера. Новичку следует выбрать 'yes'. <br />
<br />
Опытные пользователи, которые хорошо знают свое железо, требующиеся модули, а так же те, что могут вручную отладить /etc/rc.conf, /etc/mkinitcpio и /etc/fstab, и т.д. с нуля могут выбрать'no'. (Не требует напоминания тот факт, что сия опция крайне сложна, выходит за рамки этого руководства и поэтому не освещается им)<br />
<br />
Далее будут заданы вопросы, необходимо ли вам будет загружаться с USB-устройств, FireWire-устройств, PCMCIA-устройств, общих папок NFS, программных RAID-массивов, LVM2 разделов, шифрованных разделов и о поддержке DSDT. Выбирайте 'yes' если вам что-то из вышеописанного требуется. В рамках нашего руководства не требуется ничего из описанного. <br />
<br />
Теперь вас спросят, какой текстовый редактор вы желаете использовать; выбирайте [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] (проще для освоения) или [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (рекомендуется, сложнее для освоения). Перед вами появится меню, включающее список наиболее важных конфигурационных файлов системы. Если вы хотите просмотреть возможные настройки, указанные в /etc/rc.conf, то просто нажмите Alt+F2, чтобы попасть в консоль, просмотрите файл и вернитесь в установщик с помощью Alt+F1. <br />
<br />
=====Почему установщик не делает это всё автоматически?=====<br />
Сокрытие процесса установки является прямой противоположностью [[Путь Arch|пути Arch]]. Пока имеет место факт, что последние версии ядра и средства определения оборудования замечательным образом поддерживают различное оборудование и автоконфигурацию, Arch будет представлять пользователю все соотвествующие конфигурационные файлы в течение установки с целью ''прозрачности''. К тому времени, как вы закончите настройку этих файлов под свои нужды, вы будете знать элементарные методы ручной настройки Arch Linux'а и будете знакомы с базовой структурой, будучи хорошо подготовленны к продуктивному использованию вашей новой системы.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux следует трациям '''*BSD''' использования '''/etc/rc.conf''' в качестве принципиального расположения системной конфигурации. Этот небольшой файл содержит обширный набор различных параметров, используемых при запуске системы. Как становится ясно из его имени, этот файл так же содержит настройки /etc/rc* файлов, а так же и вызывает эти файлы. Файл /etc/rc.conf предлагает простой, элегантный метод поточной конфигурации системных ресурсов включая широкие возможности контроля, охотно представляя их пользователям Arch Linux.<br />
<br />
* Секция '''LOCALIZATION''' <br />
** '''LOCALE'''=: Устанавливает системную локаль, которая будет использоватся для всех i18n приложений и утилит. Вы можете просмотреть список доступных локалей, введя комманду 'locale -a' в коммандой строке. Начальные настройки подходят для англоязычных пользователей (процесс локализации системы описан в [http://wiki.archlinux.org/index.php/Интернационализация соотвествующем руководстве]).<br />
<br />
** '''HARDWARECLOCK'''=: Определяет, каким образом аппаратные часы вашего компьютера, которые синхронизируются при загрузке и выключении, хранят время: '''UTC''' или '''localtime'''. UTC может сильно упростить смену часовых поясов, а так же переход на летнее/зимнее время. localtime необходим, если вы используете несколько операционных систем (скажем, у вас так же установлен Windows), которые хранят в аппаратных часах лишь localtime.<br />
** '''TIMEZONE'''=: Определяет ваш часовой пояс. Для Москвы, скажем, это "Europe/Moscow". (Все возможные часовые пояса хранятся в /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: Все возможные раскладки хранятся в /usr/share/kbd/keymaps. Учтите, что эта опция определяется только для TTY (текстовой консоли), а не графического оконого менеджера и X-ов!<br />
** '''CONSOLEFONT'''=: Возможные консольные шрифты хранятся в /usr/share/kbd/consolefonts/ если вам вдруг требуется замена. Для поддержки русского языка требуется указать "/usr/share/kbd/consolefonts/cyr-sun16".<br />
** '''CONSOLEMAP'''=: Определяет, какую console map загрузить с программой установки шрифтов при загрузке системы. Возможные map'ы можно найти в /usr/share/kbd/consoletrans, если вдруг необходимо. По умолчанию поле пустое, что считается безопасным. <br />
** '''USECOLOR'''=: Установите "yes", если у вас цветной монитор и вы хотите, что бы в консоли отображались цвета.<br />
<br />
LOCALE="ru_RU.UTF-8"<br />
HARDWARECLOCK="UTC"<br />
TIMEZONE="Europe/Moscow"<br />
KEYMAP="ru" # Или ru-mab для раскладки с переключением по Ctrl-Shift<br />
CONSOLEFONT="/usr/share/kbd/consolefonts/cyr-sun16"<br />
CONSOLEMAP=""<br />
USECOLOR="yes"<br />
<br />
* Секция '''HARDWARE'''<br />
** '''MOD_AUTOLOAD'''=: Если установлена как "yes", то '''udev''' будет автоматически проверять устройства и загружать соотвествующие модули во время загрузки системы. Установка в положение "no" возложит на пользователя возможность определят эту информацию самостоятельно или скомпилировать свое собственное ядро и модули, и т.д. <br />
** '''MOD_BLACKLIST'''=: Крайне не рекомендуется добавление blacklist'овых модулей прямо в строчку '''MODULES=''' далее. <br />
** '''MODULES'''=: Определяет дополнительные модули, если известно, что важный модуль пропущен, ('''hwdetect''' должен быть заполнен в наиболее важных модулях). Так же задайте какие-либо blacklist'овые модули, ставя перед ними восклицательный знак (!). Udev НЕ будет загружать blacklist'овые модули. К примеру, IPv6-модуль, так же как и надоедливый pc-спикер, отключены. <br />
# Сканирует устройства и загружает соотвествующие модули<br />
MOD_AUTOLOAD="yes"<br />
# Blacklist-модуль - Крайне не рекомендуется<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* Секция '''NETWORKING'''<br />
** '''HOSTNAME'''=: Задайте имя хоста (HOSTNAME) на свой вкус.<br />
** '''eth0'''=: 'Ethernet, card 0'. Задайте IP адрес интерфейса, сетевую маску и широковещательный адрес ''если'' вы используете '''статический IP'''. Задайте eth0="dhcp" если вы используете '''DHCP'''<br />
** '''INTERFACES'''=: Здесь задайте какие-либо/все интерфейсы. Если вы НЕ используете DHCP для конфигурации устройства, просто запомните, что значение переменной (имя которой должно совпадать с именем устройства, которое вы настраиваете) совпадает со строкой, которая будет следовать за коммандой "ifconfig", если вы решите настраивать устройство вручную в коммандой строке. <br />
** '''gateway'''=: Если вы используете '''статический IP''', установите адрес шлюза. Не трогайте этот параметр, если вы используете'''DHCP'''<br />
** '''ROUTES'''=: Если вы используете статический '''IP''', уберите '''!''' перед 'gateway'. Оставьте'''!''', если используете '''DHCP'''<br />
<br />
К примеру, если используется '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* Секция '''DAEMONS'''<br />
Этот массив задает список имен скриптов в /etc/rc.d/ которые будут запускаться во время загрузки системы, а так же порядок их запуска. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*Если перед именем скрипта стоит восклицательный знак (!), он не исполняется. <br />
*Если перед скриптом стоит символ "at" (выглядит как "@"), тогда он будет запущен в фоновом режиме; очередь загрузки не будет ожидать успешного завершения демона перед переходом к загрузке следующего. Полезно для ускорения загрузки системы.<br />
*Редактируете этот массив, когда устанавливаете новые системные сервисы, если желаете, чтобы они загружались во время запуска системы.<br />
<br />
Это загрузка в 'стиле BSD', с особым Arch-способом обращения, в то время как остальные обращаются с помощью symlinks к директории /etc/init.d<br />
<br />
=====О Демонах=====<br />
Потушите свечу, уберите распятие, унесите иконы. Да, разговор пойдет о Демонах, но вовсе не о тех, о которых вы подумали сначала. И, да, вам не обязательно изменять строчку [[daemons]] в этот раз, но будет полезно объяснить, кто такие Демоны, поскольку они пригодятся нам далее в этом руководстве. <br />
<br />
По аналогии с сервисами Windows, ''демоны'' это программы, работающие в фоновом режиме, ожидающие наступления определенного события и предоставляющие сервисы. Отличный пример - вебсервер, который ожидает запроса на получение страницы или SSH-сервер, ожидающий, пока кто-нибудь не попробует войти в систему. В отличие от этих "полноценных" программ, их работа не так заметна. К примеру демон, который записывает что-либо в log-файл (к примеру, syslog, metalog), демон, понижающий частоту вашего CPU, когда система ничем не занята (к примеру:cpufreq), и демоны, которые представляют вам графический вариант входа в систему (log on) (к примеру: gdm, kdm). Все эти программы могут быть добавлены в строку "daemons" и будут запущены во время загрузки операционной системы. Всячекие полезные демоны будут представлены далее в этом руководстве. (Призыв Азазеля, Велиара, Асмодея, Маммона, Балтазара и других высших демонов в этом руководстве не рассматривается).<br />
<br />
Обращаясь к истории, термин ''daemon'' был предложен программистами MIT's Project MAC. Они заимствовали имя из ''Maxwell's demon'', мысленный эксперимент, главным персонажем которого является гипотетическое разумное существо ростом c молекулу. Выдумано Джеймсом Максвеллом с целью проиллюстрировать Второе начало термодинамики. <code>UNIX</code> системы унаследовали терминологию и создали бэкроним '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Подсказка: Все демоны в Arch проживают в директории /etc/rc.d/ Звоните! :)'''''<br />
<br />
=====Про /etc/fstab=====<br />
Так называемый '''fstab''' ('''f'''ile '''s'''ystems '''tab'''le) это часть конфигурации системы, отображающая все доступные диски и дисковые разделы; показывающая, как они инициализированны/интегрированны в системную файловую систему. Данный '''/etc/fstab''' обычно используется коммандой '''mount''', которая читает /etc/fstab дабы определить, какие настройки нужно использовать для монтирования определенного устройства.<br />
<br />
<br />
К примеру, '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Измените '''fstab''' под себя, если желаете.<br />
{{Box Note | Как было писано в 2008-04rc, Arch теперь использует UUID, или Universally Unique Identifier конвертацию имен для повышения совместимости. Крайне полезно при активной работе над ядром и udev, что может повлечь случайное изменение в порядке загрузки драйверов storage-контроллеров и невозможности загрузки системы из-за kernel-panic. Почти все материнские платы имеют несколько контроллеров (SATA, IDE), и в вышеуказанных случаях, /dev/sda мог запросто стать /dev/sdb при следующей загрузке - с тех пор была введена UUID.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Отобразит разделы, отсортированные по uuid.<br />
<br />
*Если вы планируете использование '''hal''' для автоматического монтирования всякой всячины (вроде DVD дисков), вы, возможно, изволите закомментить записи, касающиеся cdrom и dvd для подготовки к установке '''hal''', который будет инсталлирован нами далее в этом руководстве.<br />
<br />
{{Box Note | '''''Опции 'noatime' и 'nodiratime' опции могут спокойно быть применены к / и /home независимо от Вашего указанного типа файловой системы для увеличенния скорости, производительности, и эффективности как для ноутбуков, так же как стационарных компьютеров.'''''}}<br />
<br />
Дополнительная информация доступна в разделе wiki: [[Fstab]].<br />
<br />
====='''/etc/mkinitcpio.conf и /etc/modprobe.conf'''=====<br />
Нам с вами не требуется настройка этих файлов на данном этапе. <br />
<br />
* '''mkinitcpio.conf''' Этот файл позволяет Вам точно настраивать начальную файловую систему (также обычно называемый начальным ram-диском или "initrd"). Файл initrd является созданным gzipp'ом образом, который был прочитан ядром во время загрузки. Цель initrd - довести систему до момента, когда она сможет обратиться к основной root'овой файловой системе. Это значит, что этот файл должен загрузить любые модули, которые потребуются для таких устройств, как IDE, SCSI или диски SATA (Или USB/FW, если вы грузитесь с USB/FW-устройства). Как только initrd загрузит соотвествующие модули, вручную или с помощью udev'а, он передает управление системе Arch'а и загрузка продолжается. По этой причине initrd должен содержать только те модули, которые необходимы для доступа к корневой файловой системе. Он не должен содержать каждый из модулей, которые вы хотели бы использовать! Большиство модулей, которые вы используете в повседневной работе, будут загружены позже через udev в течение init-процесса. <br />
<br />
* '''modprobe.conf''' используется для применения особых настроек к некоторым модулям ядра.<br />
<br />
=====/etc/resolv.conf (для статического IP)=====<br />
''Преобразователь адресов'' это набор стандартных действий в библиотеке "C" который предоставляет доступ к Internet Domain Name System (DNS). Одна из основных функций DNS - переводить текстовые URL в ip-адреса чтобы сервер понял, с какой именно машиной в Интернете/Локальной сети вы желаете установить соединение. Конфигурационный файл /etc/resolv.conf содержит информация, которая считывается преобразователем адресов во время первого вызова процессом. <br />
<br />
*''Если вы используете DHCP, вы можете спокойно игнорировать этот файл, поскольку он динамически создается и уничтожается демоном dhcpcd. Вы можете изменить этот порядок действий, установленный по умолчанию, если желаете. (Смотрите [[Network]]).''<br />
<br />
Если вы используете статический IP, задайте ваши DNS-сервера в /etc/resolv.conf (nameserver <ip-адрес>). Можете задать их сколько вам угодно, к примеру:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
Если вы используете роутер, вы, возможно, хотите задать ваши DNS-сервера в самом роутере , и просто указать на него в '''/etc/resolv.conf''', используя IP вашего роутера (который, кстати, также является вашим шлюзом в '''/etc/rc.conf'''), например:<br />
nameserver 192.168.1.1<br />
<br />
Если используется '''DHCP''', вы можете также задать ваши DNS сервера в роутере, или использовать автоматическую настройку вашим ISP (провайдером), если ваш провайдер это позволяет.<br />
<br />
=====/etc/hosts=====<br />
<br />
Этот файл создает соотвествия между IP адресами, сетевыми именами машин (hostnames) и их псевдонимами, по одному IP на строчку. Для каждого компьютера каждая одиночная линия должна содержать следующие данные:<br />
<IP-адрес> <сетевое имя компьютера> [псевдоним...]<br />
Добавьте ваше ''сетевое имя'', совпадающее с тем, что вы задали в /etc/rc.conf, так же как и псевдом, чтобы все выглядело примерно так:<br />
127.0.0.1 localhost.localdomain localhost '''''VasyaPupkin-Zade'''''<br />
{{Box Note |''Учтите, что все данные, что вы ввели, '''включая 'localhost'''', требуют программной совместимости! Слишком длинные имена, имена с нестандартными символами могут не поддерживаться некоторыми системами. Это может привести к падению производительности сети, замедленной работе/неработаспособности некоторых программ. Это крайне распространенная ошибка среди новичков.''}}<br />
<br />
Если вы используете статический IP, добавьте еще одну линию, используя синтаксис: <статический-IP> <hostname.domainname.org> <hostname> к примеру:<br />
192.168.1.100 '''''Сетевое имя вашего компьютера'''''.domain.org '''''Сетевое имя вашего компьютера'''''<br />
<br />
*'''Подсказка''': Для удобства вы также можете использовать псевдонимы /etc/hosts для компьютеров в вашей локальной сети и/или в Интернете, к примеру:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 mp3<br />
192.168.1.88 megaporn<br />
Эта простая махинация с применением черной магии позволит вам загружать google, просто введя 'g' в вашем браузере, а также соединятся с mp3 и порносерверами в вашей локальной сети, просто вводя их имена (вами и заданные), а не набирая каждый раз их IP-адреса (как часто бывает).<br />
<br />
=====/etc/hosts.deny и /etc/hosts.allow=====<br />
Изменяйте это конфигурационные файлы под свои нужды, если вы планируете использовать [[SSH|ssh]] демона. Стандартная конфигурация будет отвергать все входящие соединения (не только SSH-соединения). Отредактируйте файл '''/etc/hosts.allow '''и добавьте: <br />
sshd:all <br />
Это разрешит все входящие ssh соединения.<br />
<br />
Если же [[SSH|ssh]] демон вы не планируете использовать, не трогайте этот файл (он должен быть пустой) для повышения безопасности.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
Команда '''locale-gen''' считывает из '''/etc/locale.gen''' данные для создания определенной локали. Далее она может быть использована '''glibc''' или любой другой программой или библиотекуой, использующей локаль для рендеринга "специфического" текста, корректного отображения местных денежных знаков, формата даты и времени, алфавитных спецсимволов, и других локально-определяемых стандартов. Возможность установить стандартную локаль является огромным преимуществом <code>UNIX</code>-ообразных операционных систем.<br />
<br />
По умолчанию /etc/locale.gen является пустым файлом с закомментированной документаций. Однажды будучи отредактированным, файл больше в изменениях не нуждается. '''locale-gen''' запускается при каждом обновлении '''glibc''', создавая все заданные локали в /etc/locale.gen.<br />
<br />
Выбере локаль(локали), которые вам нужны, убрав символ # перед соотвествующей строчкой. К примеру:<br />
ru_RU.UTF-8 UTF-8 <br />
<br />
Инсталлятор запустит специальный скрипт генерации локали, который сгенерирует те, которые вы задали. Вы сможете сменить свою локаль, отредактировав /etc/locale.gen и запустив 'locale-gen' под root'ом.<br />
<br />
{{Box Note |'''''Если вы не задали локаль, это приведет к ошибке: "The current locale is invalid...". Это одна из самых распространненых ошибок пользователей ArchLinux и плодит дофига просьб о помощи на форумах. Читайте мануалы!'''''}}<br />
<br />
=====Пароль root'а=====<br />
Наконец, установите пароль суперпользователя (root'а) и, прошу ваш, НЕ ЗАБУДЬТЕ ЕГО! Вернитесь в главное меню и продолжите инталляцию bootloader'а.<br />
<br />
=====Зеркало для Pacman'а=====<br />
Выберите зеркало репозитория для '''pacman'''. <br />
*''archlinux.org ограничен по скорости - не более 50KB/s. Используйте yandex'овский репозиторий!'' <br />
<br />
Вернитесь в главное меню.<br />
<br />
===Установка загрузчика===<br />
Поскольку в нашем примере второй операционной системы на компьютере нет, нам понадобится Загрузчик. [http://www.gnu.org/software/grub/ GNU GRUB] является рекомендованным загрузчиком. Как вариант, вы можете использовать [http://lilo.go.dyndns.org/ LILO].<br />
<br />
===GRUB===<br />
Сгенерированная установщиком конфигурация '''GRUB''' в файле ('''/boot/grub/menu.lst''') должна быть вполне корректной и в общем случае в изменениях не нуждается. Только одну вещь вы можете пожелать настроить: разрешение экрана в консоли. Для этого достаточно добавить vga=<number> в строку kernel (таблица разрешений и соответствующих значений находится в самом файле menu.lst).<br />
<br />
Пример: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Трактовка:<br />
<br />
Строка 1: '''title''': Пункт выбора в меню GRUB. В нашем примере "Arch Linux (Main)" появится на экране загрузчика в момент выбора.<br />
<br />
Строка 2: '''root''': Корневая директория GRUB; Диск и раздел, где располагается ядро (/boot). '''НЕ ОБЯЗАТЕЛЬНО располагать его в корневой директории файловой системы''' (/) - он может располагаться вообще на отдельном разделе жесткого диска. Схема нумерации GRUB начинается с нуля (0), и используется по формату hd''x,x'' независимо от типа диска (IDE, SATA), заключенному в круглые скобки.<br />
<br />
В примере видно, что /boot находится на первом разделе первого диска или (hd0,0).<br />
<br />
Строка 3: '''kernel''': Строка определяет:<br />
<br />
* Путь и имя файла ядра '''''относительно расположения GRUB''''' (в пределах раздела, содержащего ядро). <br />
<br />
К примеру, /boot это просто каталог, находящийся на одном разделе с / ,а '''vmlinuz26''' (имя файла ядра) будет в '''/boot/vmlinuz26'''. ''Если /boot находится на отдельном разделе, путь и имя файла будут просто '''/vmlinuz26''', относительно корневой директории '''GRUB'''<br />
<br />
* Root= определяет раздел, содержащий корневую директорию (/) загружаемой системы (точнее раздел, содержащий '''/sbin/init'''), ''соответственно схеме нумерации UUID'' как указано в 2008-04rc, в которой используется формат /dev/disk/by-uuid/xxxx-xxxx-xxxx. <br />
<br />
* Опции ядра. <br />
<br />
К примеру, '''ro''' монтирует файловую систему с параметром "только для чтения" во время загрузки, а '''"vga=773"''' выведет фреймбуфер с разрешением 1024x768 и глубиной цвета, равной 256.<br />
<br />
Строка 4: '''initrd''': (Для загрузочного RAM диска) Путь и имя файла для загрузочного образа '''относительно корневой директории GRUB''' (в пределах раздела, содержащего ядро). Опять таки, к примеру, /boot - это просто директория, расположенная на одном разделе с / и '''kernel26.img''' является именем файла initrd; тогда путь такой: '''/boot/kernel26.img'''. ''Если /boot была бы на отдельном разделе, путь и имя файла были бы просто '''/kernel26.img''', будучи относительными к корневой директории '''GRUB'''.''<br />
<br />
Установите загрузчик '''GRUB''' в главную загрузочную запись (MBR), в нашем примере sda.<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====Прелесть Arch'овой Rolling-release'ной модели=====<br />
Запомните, что Arch это дистрибутив с '''rolling release''' моделью. Это значит, что у вас никогда не возникнет причин для переустановки или or или разбираться в очередном релизе для обновления вашей системы. Просто переодически используйте '''pacman -Syu''' и ваша система будет всегда свежа, обновлена (и хорошо пахнуть :). После данного обновления все компоненты вашей системы будут иметь текущие версии.<br />
Если было также обновлено и ядро, перезагрузитесь (команда reboot).<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Добавление пользователей и установка групп===<br />
Вам не стоит (совсем-совсем не стоит) всё делать под root'ом. Это вообще является моветоном; это опасно, в конце-концов! Root - это для задач администрирования, настройки. Так что добавьте обычного смертного пользователя:<br />
adduser<br />
В то время как большинство опций по умолчанию вам подойдут, вы можете возжелать добавить такие группы как storage, audio, video, optical, и wheel в список дополнительных групп - особенно, если Вы планируете иметь полнофункциональный интерфейс компьютера. <br />
<br />
Нижеследующие группы задаются в /etc/group. <br />
<br />
Они включают:<br />
<br />
*'''audio''' - для задач, использующих звуковую карту и подобные устройства<br />
<br />
*'''wheel''' - для использования sudo<br />
<br />
*'''storage''' - для управления накопителями данных<br />
<br />
*'''video''' - для задач, связанных с видео и 3d-ускорением<br />
<br />
*'''optical''' - для управления задачами, которые используют оптические носители<br />
<br />
*'''floppy''' - для доступа к floppy, если таковой имеется<br />
<br />
*'''lp''' - для управления задачами печати<br />
<br />
Смотрите статью [[Groups]], чтобы понять, какие группы для чего нужны. <br />
<br />
Посмотрите страницы 'man''а на тему usermod и gpasswd для получения дополнительной информации.<br />
=====Установка и найстрока Sudo=====<br />
<br />
Смотри [[Sudo]]<br />
<br />
==Часть II: Ставим X и настраиваем ALSA==<br />
<br />
<br />
===Настройка звуковой карты с помощью alsamixer===<br />
Advanced Linux Sound Architecture (известная под акронимом '''ALSA''') это компонент ядра систему Linux, призванный заменить Open Sound System (OSS) представляющий драйвера для звуковых карт. Кроме драйверов, '''ALSA''' так же предоставляет библиотеки для разработчиков, которые хотят использовать возможности драйвера на более высоком уровне API, нежели прямое взаимодействие с драйверами ядра.<br />
-----<br />
{{Box Note|udev автоматически проверит ваше устройство во время загрузки, загрузив соотвествующий драйвер для вашей звуковой карты. Ваша аудиосистема, скорее всего, уже работает, но по умолчанию звук отключен (mute).}} <br />
Пакет утилит alsa содержит alsamixer, который позволяет настраивать звук прямо из консоли. (Вы сможете загружать aslamixer также из окружения '''X''' несколько позже.)<br />
<br />
Установка пакета утилит alsa:<br />
pacman -S alsa-utils<br />
Вы добавили-то обычного пользователя в группу audio? Если нет, то сейчас самое время! Под root'ом выполните:<br />
gpasswd -a yourusername audio<br />
Завершите сеанс (exit) и снова войдите под обычным пользователем, дабы удостоверится, что группа audio загрузилась верно.<br />
<br />
Под '''''простым, не root'овым''''' пользователем, выполните: <br />
'''[root@myhost ~]#''' alsamixer<br />
Включите каналы MASTER и PCM, подведя к ним курсор стрелочками лево/право и нажатием английской '''M'''. Увеличьте громкость клавишей "вверх" (70-90% должно быть в самый раз). Закройте микшер нажатием ESC.<br />
<br />
==== Проверка звука ====<br />
Проверьте настройку вашей аудиокарты коммандой aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
Вы услышите чарующий, манящий, жаркий и нежный, искрящийся всеми цветами радуги и клубящийся утренним туманом на горе Фудзи в лучах восходящего солнца, женский голос, прозносящий: "Front, center."<br />
<br />
Теперь залогинтесь под root'ом и выполните комманду alsactl:<br />
alsactl store<br />
Это приведет к созданию '/etc/asound.state', сохраняя найстроки asla-микшера.<br />
<br />
Также, добавте ''daemon'' alsa в вашу DAEMONS-секцию (демоническая секция, а-а-а!) в /etc/rc.conf дабы настройки микшера восстанавливались при каждой загрузке автоматически.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Учтите, что демон alsa'ы просто восстанавливает уровни громкости микшера при загрузки путем чтения /etc/asound.state. Это происходит независимо от аудио-библиотеки alsa (и уровня громкости API ядра).''<br />
<br />
Дополнительную информацию можно найти в wiki-записи [[ALSA]].<br />
<br />
===Устанавливаем и настраиваем X-ы===<br />
О, великие '''X''' Window System (обычно '''X11''', или '''X''', или просто '''Иксы''') это сетевой и экранный протокол, который поддерживает оконную систему на bitmap-дисплеях. Иксы предоставляют арсенал утилит и протокол для создания Графического Интефейса Пользователя (GUI) на <code>UNIX</code>'овых операционных системах.<br />
<br />
'''X''' представляет базовый фреймворк, на примитивах, для создания GUI'овых сред: отрисовка и перемещение окон по экрану и взаимодействие с мышкой/клавиатурой. '''X''' не предоставляет пользовательский интерфейс — это поддерживает индивидуальная клиент-программа. <br />
<br />
'''X''' так назван, поскольку им предшествовала '''W''' Window System, разработанна в Стендфорском Университете. <br />
-----<br />
<br />
{{Box Note| Если вы планировали использовать '''open-source''' видео-драйвер, и если вам нужно 3d-ускорение, рекомендуется инсталлировать библиотеку libgl перед установкой Xorg:}}<br />
pacman -S libgl<br />
''(Частные видеодрайверы обеспечивают свои собственные реализации этой библиотеки)''<br />
----- <br />
Теперь мы установим основные пакеты Xorg, используя pacman. Это - первый шаг в построении GUI.<br />
<br />
pacman -S xorg<br />
3d-утилиты, такие как glxgears включены пакет '''mesa''':<br />
pacman -S mesa<br />
<br />
Теперь у нас есть основные пакеты, в которых мы нуждаемся для того, чтобы запустить '''X''' Server. Сейчас вы должны добавить драйвер для своей видеокарты (к примеру xf86-video-<имя>). Самый простой способ конфигурировать X.org, устанавливая корретные пакеты драйвера сначала, а затем генерируя /etc/X11/xorg.conf испольуя скрипт автоконфигурации, такой как Xorg - configure.<br />
<br />
Если вы хотите увидеть весь список '''open-source''' видеодрайверов, используйте: <br />
pacman -Ss xf86-video | less<br />
Вам нужно знать, какой видеочипсет на вашем компьютере. Если вы не знаете, выполните:<br />
lspci | grep VGA<br />
Здесь приведен список '''open source''' драйверов и соотвествующих графических чипсетов..<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Отмечу, что '''vesa''' драйвера являются самыми универсальными, и будут работать почти со всеми современными графическими чипсетами. Если вы не смогли найти подходящий драйвер, то уж vesa '''должна''' работать.<br />
<br />
*Если у Вас есть NVIDIA или видеоадаптер ATI, Вы можете установить проприетарных NVIDIA или ATI драйвер. '''Установка проприетарных видеодрайверов освещена в [[#Использование проприетарных графических драйверов (NVIDIA, ATI)|чуть ниже]].'''<br />
<br />
Используйте pacman для инсталляции подходящего видеодрайвера для вашей видеокарты:<br />
pacman -S xf86-video-savage<br />
(для драйвера от Savage)<br />
<br />
==Создание /etc/X11/xorg.conf==<br />
=====Что такое /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf это главный конфигурационный файл вашей '''X''' Window System, основа основ вашего '''G'''raphical '''U'''ser '''I'''nterface. Это текстовой файл, разбитый на секции и подсекции. Важными являются секции ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, и ServerLayout''. Секции могут располагаться в любом порядке, может быть несколько секций одного типа, к примеру, если у вас более одного монитора или если у вашего ноутбука кроме мышки есть еще и тачпад. <br />
------<br />
По умолчанию, у вас не будет конфигурационного xorg-файла. В последних версиях xorg он не нужен, ''если'' автоопределение ''работает нормально'' и вам не нужно вручную включать такие штуки, как aiglx и тому подобное. <br />
<br />
''Большинство людей считают, что им все равно необходимо сгенерировать этот файл.''<br />
<br />
<br />
Опытные пользователи обычно желают вручную сгенерировать свой собственный xorg.conf. Вы так же можете использовать скрипт Xorg -configure для базовой конфигурации. Под root'ом исполните:<br />
Xorg -configure<br />
Будет создан конфиг-файл в /root/xorg.conf.new <br />
<br />
Для теста сервера, введите:<br />
X -config /root/xorg.conf.new<br />
'''X''' запустится. Вы получите на экране бело-черный мышиный курсор в виде буквы '''X''', который будет откликаться на движение мышки/тачпада. Используйте CTRL-Alt-Backspace дабы покинуть '''X'''.<br />
<br />
Просмотр вашего конфиг-файла на предмет ошибок:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Убедитесь, что скрипт Xorg -configure корректно определил ваш видеодрайвер. к примеру:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "vesa"<br />
VendorName "VM Ware Inc" #если вы запускаете ArchLinux в эмуляторе VM Ware<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Убедитесь, что горизонтальная синхронизация и вертикальная частота обновления заданы под секцией "Monitor". Если нет, то задайте их:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Подходит для большиства LCD мониторов<br />
VertRefresh 50.0 - 100.0 # Подходит для большинства LCD и CRT мониторов.<br />
EndSection<br />
(Если вы точно не знаете этих настроек, откройте инструкцию от вашего монитора.)<br />
<br />
Задайте глубину цвета под секцией "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Значит, что мы установили 24битный цвет, что соотвествует true color (миллионы цветов)<br />
<br />
Также, добавьте желаемые режимы в подсекцию "Display" , в конце, под Depth 24 , к примеру:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Добавьте следующий раздел, если Вы желаете включить eye candy, который требует дополнительного расширения: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Испытайте ваш конфиг снова, после изменения:<br />
X -config /root/xorg.conf.new<br />
Убедитесь, что сессия '''X''' открылась без ошибок и переместите сгенерированный конфиг-файл в /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Подробные инструкции смотрите в статье [[Xorg]].<br />
<br />
====Алтернативный способ генерации xorg.conf====<br />
Если Xorg -configure не может сгенерировать работоспособный xorg.conf, вы можете использовать инструмент hwd. Установите его командой:<br />
pacman -S hwd<br />
И запустите:<br />
hwd -xa <br />
Наконец, вы можете выбрать xorgconfig, который расспросит вас о всех ваших устройствах и сгенерирует xorg.conf:<br />
xorgconfig<br />
Смотрите далее '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Использование частных графических драйверов (NVIDIA, ATI)===<br />
Вы можете использовать частные дрова от NVIDIA и ATI. <br />
====Графические карты от NVIDIA====<br />
Предполагается, что драйвера от NVIDIA будут, несомненно, высокого качества, предлагают быстродействующий 3D, в то время как open source драйвер '''nv''' может предложить в данное время лишь поддержку 2d. <br />
<br />
Перед тем, как ставить какой-то из драйверов, нужно понять, какой именно вам подходит. В ArchLinux есть три пакета драйверов - каждый для своего набора видеокарточек: <br />
<br />
'''1. nvidia-71xx''' ''для самых старых карт типа TNT и TNT2''<br />
<br />
'''2. nvidia-96xx''' ''для более новых карт - вплоть до GF 4''<br />
<br />
'''3. nvidia''' ''новейшие чипсеты, новее GF 4''<br />
<br />
Загляните на страницу NVIDIA чтобы выяснить, какая именно у вас карточка. Разница будет только в процессе исталляции; Настройки же едины для всех драйверов.<br />
<br />
Выберите и установите подходящий драйвер ''для вашей карточки'', к примеру: <br />
pacman -S nvidia<br />
<br />
В пакете NVIDIA есть специальная утилита для коррекции файла /etc/X11/xorg.conf под использование драйверов от NVIDIA:<br />
nvidia-xconfig<br />
<br />
Также тут есть несколько опций, которые помогают лучше настроить xorg.conf.<br />
Например,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
Для более подробной информации гляньте в nvidia-xconfig(1).<br />
<br />
Самые полезные опции в секции оборудования (учтите, что некоторые из них могут не работать на вашей системе):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Убедитесь, что все копии DRI закомментированы:<br />
# Load "dri"<br />
Проверьте и перепроверьте /etc/X11/xorg.conf чтобы убедится, что вы выставили корректную глубину цвета, частоту горизонтальной синхронизации и вертикальной развертки, а так же корректные возможные разрешения экрана.<br />
<br />
Обновите зависимости ядра:<br />
depmod -a<br />
(у меня почему-то эта фишка вообще не заработала, по сему я просто ввел reboot)<br />
<br />
Дополнительные инструкции по танцам с бубном приводятся в статье [[NVIDIA]].<br />
<br />
Смотрите далее '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====Графические карты ATI====<br />
Владельцы ATI имеют две опции драйвера. Если вы не уверены в том, какой драйвер использовать, попробуйте сначала opensource. Он покрывает большинство среднестатистических потребностей среднестатистических же пользователей; плюс с ним меньше проблем.<br />
<br />
Установите '''частный''' драйвер ATI с помощью<br />
pacman -S catalyst<br />
Используйте инструмент aticonfig для настройки xorg.conf.<br />
<br />
Установите '''open-source''''овый драйвер ATI:<br />
pacman -S xf86-video-ati<br />
На данный момент производительность opensource'ового драйвера, конечно, несравнима с частным драйвером. Также, в нем нет поддержки TV-out, dual-link DVI, и, возможно, еще ряда функций. Зато он поддерживает Aiglx и имеет лучшую поддержку dual-head support.<br />
{{Box Note| В последний версиях частного драйвера он уже поддерживает [[AIGLX]]. Для использования [[Compiz]] или [[Beryl]] добавьте опцию "AIGLX" "True" в секцию ServerFlags и опцию "Composite" "True" в секцию Extensions.}}<br />
Дополнительные инструкции по конфигурации ATI могут быть найдены в [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Рекомендуется установить пакет gnome-utils, в котором в частности содержится пакет, позволяющий делать скриншоты нажатием клавиши Print Screen :<br />
pacman -S gnome-utils<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Демон gdm автоматически загружает графическую среду. Если вы попробуете её покинуть, используя ctrl+alt+backspace, он снова её загрузит. Если в этого не хотите, а хотите загружать граф.среду вручную, то ставьте в файле rc.conf перед именем этого демона (gdm) восклицательный знак (!). <br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Мультимедия ==<br />
<br />
<br />
===Видео плеер===<br />
====VLC====<br />
VLC Player это мультимедиа плеер под Linux (хотя есть и под MacOS и под Windows). Для установки просто наберите:<br />
<br />
pacman -S vlc<br />
<br />
====Mplayer====<br />
MPlayer также мультимедийный плеер для Linux. Исталляция:<br />
<br />
pacman -S mplayer<br />
<br />
В нем также есть plug-in для Mozilla, что позволяет смотреть потоковое видео на web-страницах. Исталляция:<br />
<br />
pacman -S mplayer-plugin<br />
<br />
Если вы используете KDE, KMplayer - лучший выбор. В нем уже встроен plug-in для Konqueror для просмотра поточного видео. Инсталляция:<br />
<br />
pacman -S kmplayer<br />
<br />
====Xine====<br />
<br />
Xine это чудесный плеер, особенно для DVD.<br />
<br />
pacman -S xine-ui<br />
Библиотека libdvdcss умеет декодировать DVD (для шифрованных DVD). ''Убедитесь в легальности использования libdvdcss в вашей стране перед инсталляцией (Буахахахаха!)''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] это официальный кинопроигрыватель для GNOME базирующийся на xine-lib или GStreamer (gstreamer - по дефолту инсталлируется вместе с пакетом arch totem). Он поддерживает плейлисты, полноэкранный режим, поиск и уровень громкости, а также клавиатурную навигацию.<br />
В него встроенна дополнительная функциональность:<br />
<br />
* Установка превьюшек видео для файл-менеджера<br />
* Панель настроек Nautilus <br />
* Epiphany / Mozilla (Firefox)-плагин для просмотра порно (или видео) прямо в вашем браузере <br />
* Webcam-утилита (разрабатывается)<br />
<br />
Totem-xine это лучший выбор, если вы хотите смотреть DVD.<br />
<br />
Totem входит в пакет gnome-extra; а вот плагин Totem для web-браузера - нет.<br />
<br />
Он ставится отдельно:<br />
pacman -S totem<br />
<br />
Для установки браузерного plug-in'а:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine это отличная штука для пользователей KDE (Кед). Для инсталляции введите:<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Прочая информация==<br />
За дополнительной инфорацией обращайтесь к [http://archlinux.org.ru/ Русскоязычному сообществу Arch], а также [http://archlinux.org.ru/forum/ на русскоязычный фоум]. Также по любым вопросам обращайтесь на IRC-канал:<br />
Сервер: irc.freenode.org, канал #archlinux-ru, кодировка UTF-8.<br />
Опытные, добрые, отзывчивые админы всегда окажут вам полное содействие и помощь.<br />
=====FAQ=====<br />
Смотрите [[ЧаВо]]<br />
<br />
<br />
=====Что еще почитать?=====<br />
[http://www.cyber39.ru/os/linux/3716-linux_dlja_nachinajushhikh.html Linux для начинающих.]<br />
<br />
[http://www.cyber39.ru/2008/02/16/setevoe_administrirovanie_linux.html Сетевое администрирование Linux.]<br />
<br />
[http://www.cyber39.ru/2008/02/16/jadro_linux_3e_izd.html Ядро Linux.]<br />
<br />
[http://www.cyber39.ru/os/linux/1204-linux_polnoe_rukovodstvo.html Linux: Полное руководство.]<br />
<br />
[http://www.cyber39.ru/2008/02/13/operacionnaja_sistema_unix_nastolnyjj_spravochnik.html Операционная система UNIX. Настольный справочник.]<br />
<br />
[http://ru.wikibooks.org/wiki/Введение_в_администрирование_UNIX#.D0.92.D0.B2.D0.B5.D0.B4.D0.B5.D0.BD.D0.B8.D0.B5_.D0.B2_.D0.AE.D0.BD.D0.B8.D0.BA.D1.81 Введение в администрирование UNIX.]<br />
<br />
[http://www.cyber39.ru/os/linux/19037-linux_osnovnye_komandy_karmannyjj_spravochnik.html LINUX: Основные комманды. Карманный справочник.]<br />
<br />
[http://www.cyber39.ru/coding/cpp/16946-programmirovanie_na_c_v_linux.html Программирование на C в Linux.]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=54913
Beginners' guide (Русский)
2008-12-05T07:48:32Z
<p>Alsvartr: /* GRUB */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
{{Box Note |'''По возможности, пользуйтесь английской версией этого документа, т.к. именно она обновляется в первую очередь, содержит все последние изменения и самую актуальную на данный момент информацию.'''}}<br />
{{Box Note|'''Уважаемые переводчики, прежде чем переводить какой-либо раздел, сравните его с английской версией ибо информация в нём могла устареть'''}}<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружение рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно, если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с большим набором софта на CD (или даже DVD), включающим стандартное Рабочее Окружение(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жёсткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. Попросту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." - Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведённые инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надёжной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезным [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставьте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфигурации загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жёсткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жёсткого диска|Подготовке жёсткого диска]].<br />
<br />
====Подготовка жёсткого диска====<br />
Выберите первый пункт меню - "Prepare Hard Drive". Вам будет предложено автоматически подготовить ваш жёсткий диск к установке Arch Linux, либо вручную переразбить и подготовить разделы.<br />
* 1. Автоматическая подготовка<br />
Установщик сам разобъёт ваш жесткий диск на следующие разделы:<br />
* Загрузочный раздел /boot c файловой системой ext2 и размером по умолчанию в 32 мегабайта. Вы сможете изменить это значение. <br />
* Раздел подкачки swap с размером по умолчанию в 256 мегабайтов. Вы также сможете изменить это значение.<br />
* Отдельные разделы для корня / и домашней директории пользователей /home. Размеры вы определяете сами. Также вам будет предоставлен выбор из файловых систем: ext2, ext3, reiserfs, xfs и jfs. Но следует учесть, что оба этих раздела должны быть отформатированы в одинаковой файловой системе.<br />
<br />
Не забывайте - автоматическая подготовка сотрёт все данные на вашем жёстком диске! Внимательно читайте предупреждение установщика.<br />
<br />
* 2. '''(Рекомендуется)''' Ручная подготовка<br />
<br />
Выберите из списка жёсткий диск, на который будет произведена установка (/dev/sd''x'').<br />
<br />
''На этом этапе более опытные пользователи могут сразу перейти к главе о '''[[#Выбор Пакетов|выборе пакетов]]'''.''<br />
<br />
=====Информация о разбивке=====<br />
Разбивка жёсткого диска заключается в создании отдельных зон (разделов) на жёстком диске. Они будут выглядеть как отдельные диски со своими файловыми системами. Разделы подразделяются на "Основные" (Primary), "Расширенные" (Extended) и "Логические" (Logical).<br />
<br />
'''Основные''' разделы могут быть загрузочными и их количество ограничено четырьмя. Больше четырёх главных разделов создать нельзя и нужно использовать '''Расширенные''' разделы, которые будут содержать '''Логические'''.<br />
<br />
Расширенные разделы не могут быть использованы сами по себе - они всего лишь "контейнеры" для логических. Жёсткий диск может содержать только один расширенный раздел, который может быть разделён на логические.<br />
<br />
Во время разбивки диска можно заметить схему нумерации разделов. Главные получают названия sda1-3, расширенный раздел - sda4, а логические, соответственно, sda5, sda6 и т.д.<br />
<br />
=====Раздел Подкачки (swap)=====<br />
Данный раздел является чем-то вроде "виртуального ОЗУ". На нем хранятся данные, которые не умещаются, либо не подходят для хранения в оперативной памяти.<br />
<br />
Исторически сложилось, что размер раздела подкачки определяется по схеме 2ХОЗУ. То есть, двойной объем оперативной памяти. Затем, с развитием компьютерной техники, данное правило не всегда стало являться необходимым. На компьютере с 512 мегабайтами памяти правило 2Х все еще действует эффективно. Однако, на машинах с 1 гигабайтом памяти обычно наиболее эффективна схема 1ХОЗУ. Если размер вашего ОЗУ больше или равен 1 гигабайту, то можно вообще обойтись без раздела подкачки, однако это не рекомендуется. Мы создадим раздел размером в 1 гигабайт в нашем примере.<br />
<br />
{{Box Note|Если вы планируете использовать технологии suspend-to-disk или hibernate, то размер раздела подкачки, по меньшей мере, должен соответствовать размеру вашей оперативной памяти. Но рекомендуется задать размер хотя бы на 15% больший, чтобы учесть появление испорченных секторов на диске (bad sectors).}}<br />
=====Схема Разбивки=====<br />
Схема разбивки разделов довольно индивидуальна и во многом зависит от предпочтений и нужд конкретного пользователя. Но, как минимум, вам нужны два раздела: один для корня ( / ), второй для раздела подкачки (swap). Однако, вы можете захотеть иметь отдельные разделы для /boot (на нем обычно находится ядро Linux), /var и /home (пользовательская директория). Обычно иметь два раздела отдельно для корня ( / ) и отдельно для /home считается хорошей практикой и более удобным и безопасным решением.<br />
В нашем примере мы создадим три отдельных раздела: для корня, для /home и один раздел подкачки swap.<br />
<br />
=====cfdisk===== <br />
Итак, начнём с создания главного раздела, содержащего корневую файловую систему.<br />
<br />
Для создания нового раздела выберите пункт '''N'''ew, затем Primary. Далее задайте желаемый размер раздела (что-то между 4 и 12 гигабайт будет хорошим выбором). Выберите только что созданный раздел и сделайте его загрузочным, выбрав пункт '''B'''ootable.<br />
<br />
Также выберите пункт '''T'''ype и задайте значение '83 Linux'. Нашему разделу должно присвоится имя sda1.<br />
<br />
Затем создадим раздел подкачки. Задайте размер между 512 мегабайт и 1 гигабайтом, выберите '''T'''ype - 82 (Linux swap / Solaris). Наш раздел должен быть теперь виден как sda2.<br />
<br />
Теперь ещё один раздел для /home. Выберите главный раздел и установите желаемый размер в зависимости от того, что пользователи вашего компьютера будут хранить в своих персональных директориях. Также, как и для корня, задайте '''T'''ype - 83 Linux. Данный раздел появится как sda3.<br />
<br />
<br />
<br />
Вот как должна выглядеть наша таблица разделов (размеры могут отличаться):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Выберите '''W'''rite и нажмите ''''yes''''. Или нажмите '''Q'''uit для выхода из программы разбивки.<br />
<br />
<br />
=====Мои IDE-диски выглядят как SCSI, почему?=====<br />
В последних версиях ядра Linux все диски (IDE, SATA, SCSI) именуются как sd''x''. Пусть это вас не волнует, это нормально.<br />
<br />
====Назначение точек монтирования====<br />
Во-первых, выберите нужный раздел под раздел подкачки (в нашем примере это sda3). Во-вторых, выберите раздел для монтирования корневой ФС (sda1 в нашем примере). Вам будет предложено выбрать желаемую файловую систему.<br />
<br />
=====Файловые системы=====<br />
<br />
Выбор файловой системы достаточно субъективен. Каждая из предложенных ФС имеет свои достоинства и недостатки, всё зависит целиком от ваших предпочтений. Далее мы кратко рассмотрим поддерживаемые ФС:<br />
<br />
1. '''[http://ru.wikipedia.org/wiki/Ext2 ext2]''' - старая и надежная файловая система для ОС GNU/Linux. Очень стабильна, но без поддержки журналирования - это значит, что в случае аппаратных сбоев или перепадов напряжения ваша информация может пострадать. Не слишком хороший выбор для корневого и /home разделов. Данная ФС может быть легко преобразована в ext3.<br />
<br />
2. '''[http://ru.wikipedia.org/wiki/Ext2 ext3]''' - наследница ext2, но с поддержкой журналирования. Она полностью совместима с ext2. Однако, по некоторым тестам немного медленнее, нежели остальные ФС. Тем не менее, очень стабильна и активно используется, поддерживается и разрабатывается сообществом GNU/Linux.<br />
<br />
3. '''[http://ru.wikipedia.org/wiki/ReiserFS ReiserFS]''' - высокопроизводительная файловая система, разработанная Гансом Райзером. Считается очень быстрой, особенно при операциях с файлами маленького размера, однако сравнительно медленно монтируется. Вполне готова к использованию и стабильна. Однако, не слишком активно разрабатывается на данный момент (все силы отданы Reiser4).<br />
<br />
4. '''[http://ru.wikipedia.org/wiki/JFS JFS]''' - '''J'''ournaled '''F'''ile'''S'''ystem, файловая система от IBM. Использует наименьшее количество ресурсов центрального процессора, нежели остальные ФС. Очень быстра в монтировании и использовании. Однако, не так широко используется, как ext или ReiserFS.<br />
<br />
5. '''[http://ru.wikipedia.org/wiki/JFS XFS]''' - журналируемая ФС, которая показывает наибольшую скорость при операциях с большими файлами. Хороший выбор для разделов с большим их количеством.<br />
<br />
Наиболее значимое отличие между ними - журналирование. Все, кроме ext2, его поддерживают, однако техника журналирования не у всех одинакова. Только ext3 поддерживает хранение в журнале данных и мета-данных (информация о директориях). Это значит, что только она в случае сбоя сможет восстановить полностью в точной мере ту информационную структуру, которая была до сбоя.<br />
<br />
Выберите и создайте ФС для корня. Далее вам будет предложено создать дополнительные разделы. В нашем примере, нам понадобится создать еще sda2. Выберите файловую систему и примонтируйте ее как /home. Нажмите Done и возвращайтесь в главное меню установщика.<br />
<br />
===Выбор пакетов===<br />
На данном этапе вам предстоит выбрать пакеты, которые будут установлены на вашу систему.<br />
* Установка из Core ISO: выберите подходящее устройство CD-ROM из списка.<br />
* Установка из FTP ISO: выберите FTP/HTTP-зеркало для получения пакетов.<br />
<br />
Процесс выбора пакетов разбит на две стадии: выбор категорий пакетов, а затем - выбор отдельных пакетов в этих категориях. С помощью клавиши пробела вы можете устанавливать и снимать выделение пакетов и категорий. Ниже приведен список категорий пакетов с объяснениями:<br />
<br />
* '''BASE:''' содержит только базовые, необходимые системные пакеты. Минимальный набор для базовой системы.<br />
*'''SUPPORT:''' здесь находятся дополнительные пакеты для работы с сетью и файловыми системами. Например, такие как gpm, fuse, dnsutils, ndiswrapper, ntfs-3g, драйвера для wi-fi адаптеров и т.п.<br />
*'''DEVEL:''' пакеты для сборки программ. То есть, GCC, autoconf, automake, make и т.п.<br />
*'''LIB:''' различные системные библиотеки - gmp, libelf, libevent и т.п.<br />
<br />
Нажмите OK и далее выберите опцию 'yes', когда вам будет предложено выбрать все пакеты по умолчанию ('Select all packages by default').<br />
<br />
Далее вам будет показан список пакетов в выбранных категориях. Для новичка будет лучшим выбором оставить всё как есть. Тогда как более опытные пользователи могут убрать ненужные им пакеты из данного списка.<br />
<br />
===Установка пакетов===<br />
Теперь выберите пункт 'Install Packages', чтобы начать установку пакетов. Вам будет предложено сохранить загруженные из источника установки пакеты в системном кэше. Это хороший выбор, который может очень вам помочь, если какой-либо новый установленный пакет будет работать не так, как надо. Тогда можно просто восстановить старую версию из кэша. Помните, что вы всегда можете очистить ваш кэш вручную при необходимости.<br />
Установщик произведет установку выбранных вами пакетов и ядра Arch Linux в вашу новую систему.<br />
<br />
*FTP ISO: менеджер пакетов [[Pacman_(Русский)|Pacman]] установит пакеты с сетевого зеркала (прогресс вы можете наблюдать на vc5, а чтобы вернуться назад к установщику - перейдите на vc1).<br />
*CORE ISO: пакеты будут установлены с оптического диска.<br />
<br />
===Конфигурация системы===<br />
''Чёткое следование и понимание следующих шагов является ключем к корректной работе системы.'' <br />
<br />
Установщик спросит вас о необходимости использования [[Hwdetect|hwdetect]] для сбора информации о параметрах компьютера. Новичку следует выбрать 'yes'. <br />
<br />
Опытные пользователи, которые хорошо знают свое железо, требующиеся модули, а так же те, что могут вручную отладить /etc/rc.conf, /etc/mkinitcpio и /etc/fstab, и т.д. с нуля могут выбрать'no'. (Не требует напоминания тот факт, что сия опция крайне сложна, выходит за рамки этого руководства и поэтому не освещается им)<br />
<br />
Далее будут заданы вопросы, необходимо ли вам будет загружаться с USB-устройств, FireWire-устройств, PCMCIA-устройств, общих папок NFS, программных RAID-массивов, LVM2 разделов, шифрованных разделов и о поддержке DSDT. Выбирайте 'yes' если вам что-то из вышеописанного требуется. В рамках нашего руководства не требуется ничего из описанного. <br />
<br />
Теперь вас спросят, какой текстовый редактор вы желаете использовать; выбирайте [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] (проще для освоения) или [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (рекомендуется, сложнее для освоения). Перед вами появится меню, включающее список наиболее важных конфигурационных файлов системы. Если вы хотите просмотреть возможные настройки, указанные в /etc/rc.conf, то просто нажмите Alt+F2, чтобы попасть в консоль, просмотрите файл и вернитесь в установщик с помощью Alt+F1. <br />
<br />
=====Почему установщик не делает это всё автоматически?=====<br />
Сокрытие процесса установки является прямой противоположностью [[Путь Arch|пути Arch]]. Пока имеет место факт, что последние версии ядра и средства определения оборудования замечательным образом поддерживают различное оборудование и автоконфигурацию, Arch будет представлять пользователю все соотвествующие конфигурационные файлы в течение установки с целью ''прозрачности''. К тому времени, как вы закончите настройку этих файлов под свои нужды, вы будете знать элементарные методы ручной настройки Arch Linux'а и будете знакомы с базовой структурой, будучи хорошо подготовленны к продуктивному использованию вашей новой системы.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux следует трациям '''*BSD''' использования '''/etc/rc.conf''' в качестве принципиального расположения системной конфигурации. Этот небольшой файл содержит обширный набор различных параметров, используемых при запуске системы. Как становится ясно из его имени, этот файл так же содержит настройки /etc/rc* файлов, а так же и вызывает эти файлы. Файл /etc/rc.conf предлагает простой, элегантный метод поточной конфигурации системных ресурсов включая широкие возможности контроля, охотно представляя их пользователям Arch Linux.<br />
<br />
* Секция '''LOCALIZATION''' <br />
** '''LOCALE'''=: Устанавливает системную локаль, которая будет использоватся для всех i18n приложений и утилит. Вы можете просмотреть список доступных локалей, введя комманду 'locale -a' в коммандой строке. Начальные настройки подходят для англоязычных пользователей (процесс локализации системы описан в [http://wiki.archlinux.org/index.php/Интернационализация соотвествующем руководстве]).<br />
<br />
** '''HARDWARECLOCK'''=: Определяет, каким образом аппаратные часы вашего компьютера, которые синхронизируются при загрузке и выключении, хранят время: '''UTC''' или '''localtime'''. UTC может сильно упростить смену часовых поясов, а так же переход на летнее/зимнее время. localtime необходим, если вы используете несколько операционных систем (скажем, у вас так же установлен Windows), которые хранят в аппаратных часах лишь localtime.<br />
** '''TIMEZONE'''=: Определяет ваш часовой пояс. Для Москвы, скажем, это "Europe/Moscow". (Все возможные часовые пояса хранятся в /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: Все возможные раскладки хранятся в /usr/share/kbd/keymaps. Учтите, что эта опция определяется только для TTY (текстовой консоли), а не графического оконого менеджера и X-ов!<br />
** '''CONSOLEFONT'''=: Возможные консольные шрифты хранятся в /usr/share/kbd/consolefonts/ если вам вдруг требуется замена. Для поддержки русского языка требуется указать "/usr/share/kbd/consolefonts/cyr-sun16".<br />
** '''CONSOLEMAP'''=: Определяет, какую console map загрузить с программой установки шрифтов при загрузке системы. Возможные map'ы можно найти в /usr/share/kbd/consoletrans, если вдруг необходимо. По умолчанию поле пустое, что считается безопасным. <br />
** '''USECOLOR'''=: Установите "yes", если у вас цветной монитор и вы хотите, что бы в консоли отображались цвета.<br />
<br />
LOCALE="ru_RU.UTF-8"<br />
HARDWARECLOCK="UTC"<br />
TIMEZONE="Europe/Moscow"<br />
KEYMAP="ru" # Или ru-mab для раскладки с переключением по Ctrl-Shift<br />
CONSOLEFONT="/usr/share/kbd/consolefonts/cyr-sun16"<br />
CONSOLEMAP=""<br />
USECOLOR="yes"<br />
<br />
* Секция '''HARDWARE'''<br />
** '''MOD_AUTOLOAD'''=: Если установлена как "yes", то '''udev''' будет автоматически проверять устройства и загружать соотвествующие модули во время загрузки системы. Установка в положение "no" возложит на пользователя возможность определят эту информацию самостоятельно или скомпилировать свое собственное ядро и модули, и т.д. <br />
** '''MOD_BLACKLIST'''=: Крайне не рекомендуется добавление blacklist'овых модулей прямо в строчку '''MODULES=''' далее. <br />
** '''MODULES'''=: Определяет дополнительные модули, если известно, что важный модуль пропущен, ('''hwdetect''' должен быть заполнен в наиболее важных модулях). Так же задайте какие-либо blacklist'овые модули, ставя перед ними восклицательный знак (!). Udev НЕ будет загружать blacklist'овые модули. К примеру, IPv6-модуль, так же как и надоедливый pc-спикер, отключены. <br />
# Сканирует устройства и загружает соотвествующие модули<br />
MOD_AUTOLOAD="yes"<br />
# Blacklist-модуль - Крайне не рекомендуется<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* Секция '''NETWORKING'''<br />
** '''HOSTNAME'''=: Задайте имя хоста (HOSTNAME) на свой вкус.<br />
** '''eth0'''=: 'Ethernet, card 0'. Задайте IP адрес интерфейса, сетевую маску и широковещательный адрес ''если'' вы используете '''статический IP'''. Задайте eth0="dhcp" если вы используете '''DHCP'''<br />
** '''INTERFACES'''=: Здесь задайте какие-либо/все интерфейсы. Если вы НЕ используете DHCP для конфигурации устройства, просто запомните, что значение переменной (имя которой должно совпадать с именем устройства, которое вы настраиваете) совпадает со строкой, которая будет следовать за коммандой "ifconfig", если вы решите настраивать устройство вручную в коммандой строке. <br />
** '''gateway'''=: Если вы используете '''статический IP''', установите адрес шлюза. Не трогайте этот параметр, если вы используете'''DHCP'''<br />
** '''ROUTES'''=: Если вы используете статический '''IP''', уберите '''!''' перед 'gateway'. Оставьте'''!''', если используете '''DHCP'''<br />
<br />
К примеру, если используется '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* Секция '''DAEMONS'''<br />
Этот массив задает список имен скриптов в /etc/rc.d/ которые будут запускаться во время загрузки системы, а так же порядок их запуска. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*Если перед именем скрипта стоит восклицательный знак (!), он не исполняется. <br />
*Если перед скриптом стоит символ "at" (выглядит как "@"), тогда он будет запущен в фоновом режиме; очередь загрузки не будет ожидать успешного завершения демона перед переходом к загрузке следующего. Полезно для ускорения загрузки системы.<br />
*Редактируете этот массив, когда устанавливаете новые системные сервисы, если желаете, чтобы они загружались во время запуска системы.<br />
<br />
Это загрузка в 'стиле BSD', с особым Arch-способом обращения, в то время как остальные обращаются с помощью symlinks к директории /etc/init.d<br />
<br />
=====О Демонах=====<br />
Потушите свечу, уберите распятие, унесите иконы. Да, разговор пойдет о Демонах, но вовсе не о тех, о которых вы подумали сначала. И, да, вам не обязательно изменять строчку [[daemons]] в этот раз, но будет полезно объяснить, кто такие Демоны, поскольку они пригодятся нам далее в этом руководстве. <br />
<br />
По аналогии с сервисами Windows, ''демоны'' это программы, работающие в фоновом режиме, ожидающие наступления определенного события и предоставляющие сервисы. Отличный пример - вебсервер, который ожидает запроса на получение страницы или SSH-сервер, ожидающий, пока кто-нибудь не попробует войти в систему. В отличие от этих "полноценных" программ, их работа не так заметна. К примеру демон, который записывает что-либо в log-файл (к примеру, syslog, metalog), демон, понижающий частоту вашего CPU, когда система ничем не занята (к примеру:cpufreq), и демоны, которые представляют вам графический вариант входа в систему (log on) (к примеру: gdm, kdm). Все эти программы могут быть добавлены в строку "daemons" и будут запущены во время загрузки операционной системы. Всячекие полезные демоны будут представлены далее в этом руководстве. (Призыв Азазеля, Велиара, Асмодея, Маммона, Балтазара и других высших демонов в этом руководстве не рассматривается).<br />
<br />
Обращаясь к истории, термин ''daemon'' был предложен программистами MIT's Project MAC. Они заимствовали имя из ''Maxwell's demon'', мысленный эксперимент, главным персонажем которого является гипотетическое разумное существо ростом c молекулу. Выдумано Джеймсом Максвеллом с целью проиллюстрировать Второе начало термодинамики. <code>UNIX</code> системы унаследовали терминологию и создали бэкроним '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Подсказка: Все демоны в Arch проживают в директории /etc/rc.d/ Звоните! :)'''''<br />
<br />
=====Про /etc/fstab=====<br />
Так называемый '''fstab''' ('''f'''ile '''s'''ystems '''tab'''le) это часть конфигурации системы, отображающая все доступные диски и дисковые разделы; показывающая, как они инициализированны/интегрированны в системную файловую систему. Данный '''/etc/fstab''' обычно используется коммандой '''mount''', которая читает /etc/fstab дабы определить, какие настройки нужно использовать для монтирования определенного устройства.<br />
<br />
<br />
К примеру, '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Измените '''fstab''' под себя, если желаете.<br />
{{Box Note | Как было писано в 2008-04rc, Arch теперь использует UUID, или Universally Unique Identifier конвертацию имен для повышения совместимости. Крайне полезно при активной работе над ядром и udev, что может повлечь случайное изменение в порядке загрузки драйверов storage-контроллеров и невозможности загрузки системы из-за kernel-panic. Почти все материнские платы имеют несколько контроллеров (SATA, IDE), и в вышеуказанных случаях, /dev/sda мог запросто стать /dev/sdb при следующей загрузке - с тех пор была введена UUID.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Отобразит разделы, отсортированные по uuid.<br />
<br />
*Если вы планируете использование '''hal''' для автоматического монтирования всякой всячины (вроде DVD дисков), вы, возможно, изволите закомментить записи, касающиеся cdrom и dvd для подготовки к установке '''hal''', который будет инсталлирован нами далее в этом руководстве.<br />
<br />
{{Box Note | '''''Опции 'noatime' и 'nodiratime' опции могут спокойно быть применены к / и /home независимо от Вашего указанного типа файловой системы для увеличенния скорости, производительности, и эффективности как для ноутбуков, так же как стационарных компьютеров.'''''}}<br />
<br />
Дополнительная информация доступна в разделе wiki: [[Fstab]].<br />
<br />
====='''/etc/mkinitcpio.conf и /etc/modprobe.conf'''=====<br />
Нам с вами не требуется настройка этих файлов на данном этапе. <br />
<br />
* '''mkinitcpio.conf''' Этот файл позволяет Вам точно настраивать начальную файловую систему (также обычно называемый начальным ram-диском или "initrd"). Файл initrd является созданным gzipp'ом образом, который был прочитан ядром во время загрузки. Цель initrd - довести систему до момента, когда она сможет обратиться к основной root'овой файловой системе. Это значит, что этот файл должен загрузить любые модули, которые потребуются для таких устройств, как IDE, SCSI или диски SATA (Или USB/FW, если вы грузитесь с USB/FW-устройства). Как только initrd загрузит соотвествующие модули, вручную или с помощью udev'а, он передает управление системе Arch'а и загрузка продолжается. По этой причине initrd должен содержать только те модули, которые необходимы для доступа к корневой файловой системе. Он не должен содержать каждый из модулей, которые вы хотели бы использовать! Большиство модулей, которые вы используете в повседневной работе, будут загружены позже через udev в течение init-процесса. <br />
<br />
* '''modprobe.conf''' используется для применения особых настроек к некоторым модулям ядра.<br />
<br />
=====/etc/resolv.conf (для статического IP)=====<br />
''Преобразователь адресов'' это набор стандартных действий в библиотеке "C" который предоставляет доступ к Internet Domain Name System (DNS). Одна из основных функций DNS - переводить текстовые URL в ip-адреса чтобы сервер понял, с какой именно машиной в Интернете/Локальной сети вы желаете установить соединение. Конфигурационный файл /etc/resolv.conf содержит информация, которая считывается преобразователем адресов во время первого вызова процессом. <br />
<br />
*''Если вы используете DHCP, вы можете спокойно игнорировать этот файл, поскольку он динамически создается и уничтожается демоном dhcpcd. Вы можете изменить этот порядок действий, установленный по умолчанию, если желаете. (Смотрите [[Network]]).''<br />
<br />
Если вы используете статический IP, задайте ваши DNS-сервера в /etc/resolv.conf (nameserver <ip-адрес>). Можете задать их сколько вам угодно, к примеру:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
Если вы используете роутер, вы, возможно, хотите задать ваши DNS-сервера в самом роутере , и просто указать на него в '''/etc/resolv.conf''', используя IP вашего роутера (который, кстати, также является вашим шлюзом в '''/etc/rc.conf'''), например:<br />
nameserver 192.168.1.1<br />
<br />
Если используется '''DHCP''', вы можете также задать ваши DNS сервера в роутере, или использовать автоматическую настройку вашим ISP (провайдером), если ваш провайдер это позволяет.<br />
<br />
=====/etc/hosts=====<br />
<br />
Этот файл создает соотвествия между IP адресами, сетевыми именами машин (hostnames) и их псевдонимами, по одному IP на строчку. Для каждого компьютера каждая одиночная линия должна содержать следующие данные:<br />
<IP-адрес> <сетевое имя компьютера> [псевдоним...]<br />
Добавьте ваше ''сетевое имя'', совпадающее с тем, что вы задали в /etc/rc.conf, так же как и псевдом, чтобы все выглядело примерно так:<br />
127.0.0.1 localhost.localdomain localhost '''''VasyaPupkin-Zade'''''<br />
{{Box Note |''Учтите, что все данные, что вы ввели, '''включая 'localhost'''', требуют программной совместимости! Слишком длинные имена, имена с нестандартными символами могут не поддерживаться некоторыми системами. Это может привести к падению производительности сети, замедленной работе/неработаспособности некоторых программ. Это крайне распространенная ошибка среди новичков.''}}<br />
<br />
Если вы используете статический IP, добавьте еще одну линию, используя синтаксис: <статический-IP> <hostname.domainname.org> <hostname> к примеру:<br />
192.168.1.100 '''''Сетевое имя вашего компьютера'''''.domain.org '''''Сетевое имя вашего компьютера'''''<br />
<br />
*'''Подсказка''': Для удобства вы также можете использовать псевдонимы /etc/hosts для компьютеров в вашей локальной сети и/или в Интернете, к примеру:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 mp3<br />
192.168.1.88 megaporn<br />
Эта простая махинация с применением черной магии позволит вам загружать google, просто введя 'g' в вашем браузере, а также соединятся с mp3 и порносерверами в вашей локальной сети, просто вводя их имена (вами и заданные), а не набирая каждый раз их IP-адреса (как часто бывает).<br />
<br />
=====/etc/hosts.deny и /etc/hosts.allow=====<br />
Изменяйте это конфигурационные файлы под свои нужды, если вы планируете использовать [[SSH|ssh]] демона. Стандартная конфигурация будет отвергать все входящие соединения (не только SSH-соединения). Отредактируйте файл '''/etc/hosts.allow '''и добавьте: <br />
sshd:all <br />
Это разрешит все входящие ssh соединения.<br />
<br />
Если же [[SSH|ssh]] демон вы не планируете использовать, не трогайте этот файл (он должен быть пустой) для повышения безопасности.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
Команда '''locale-gen''' считывает из '''/etc/locale.gen''' данные для создания определенной локали. Далее она может быть использована '''glibc''' или любой другой программой или библиотекуой, использующей локаль для рендеринга "специфического" текста, корректного отображения местных денежных знаков, формата даты и времени, алфавитных спецсимволов, и других локально-определяемых стандартов. Возможность установить стандартную локаль является огромным преимуществом <code>UNIX</code>-ообразных операционных систем.<br />
<br />
По умолчанию /etc/locale.gen является пустым файлом с закомментированной документаций. Однажды будучи отредактированным, файл больше в изменениях не нуждается. '''locale-gen''' запускается при каждом обновлении '''glibc''', создавая все заданные локали в /etc/locale.gen.<br />
<br />
Выбере локаль(локали), которые вам нужны, убрав символ # перед соотвествующей строчкой. К примеру:<br />
ru_RU.UTF-8 UTF-8 <br />
<br />
Инсталлятор запустит специальный скрипт генерации локали, который сгенерирует те, которые вы задали. Вы сможете сменить свою локаль, отредактировав /etc/locale.gen и запустив 'locale-gen' под root'ом.<br />
<br />
{{Box Note |'''''Если вы не задали локаль, это приведет к ошибке: "The current locale is invalid...". Это одна из самых распространненых ошибок пользователей ArchLinux и плодит дофига просьб о помощи на форумах. Читайте мануалы!'''''}}<br />
<br />
=====Пароль root'а=====<br />
Наконец, установите пароль суперпользователя (root'а) и, прошу ваш, НЕ ЗАБУДЬТЕ ЕГО! Вернитесь в главное меню и продолжите инталляцию bootloader'а.<br />
<br />
=====Зеркало для Pacman'а=====<br />
Выберите зеркало репозитория для '''pacman'''. <br />
*''archlinux.org ограничен по скорости - не более 50KB/s. Используйте yandex'овский репозиторий!'' <br />
<br />
Вернитесь в главное меню.<br />
<br />
===Установка загрузчика===<br />
Поскольку в нашем примере второй операционной системы на компьютере нет, нам понадобится Загрузчик. [http://www.gnu.org/software/grub/ GNU GRUB] является рекомендованным загрузчиком. Как вариант, вы можете использовать [http://lilo.go.dyndns.org/ LILO].<br />
<br />
===GRUB===<br />
Сгенерированная установщиком конфигурация '''GRUB''' в файле ('''/boot/grub/menu.lst''') должна быть вполне корректной и в общем случае в изменениях не нуждается. Только одну вещь вы можете пожелать настроить: разрешение экрана в консоли. Для этого достаточно добавить vga=<number> в строку kernel (таблица разрешений и соответствующих значений находится в самом файле menu.lst).<br />
<br />
Пример: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Трактовка:<br />
<br />
Строка 1: '''title''': Пункт выбора в меню GR�UB. В нашем примере "Arch Linux (Main)" появится на экране загрузчика в момент выбора.<br />
<br />
Строка 2: '''root''': Корневая директория GRUB; Диск и раздел, где располагается ядро (/boot). '''НЕ ОБЯЗАТЕЛЬНО располагать его в корневой директории файловой системы''' (/) - он может располагаться вообще на отдельном разделе жесткого диска. Схема нумерации GRUB начинается с нуля (0), и используется по формату hd''x,x'' независимо от типа диска (IDE, SATA), заключенному в круглые скобки.<br />
<br />
В примере видно, что /boot находится на первом разделе первого диска или (hd0,0).<br />
<br />
Строка 3: '''kernel''': Строка определяет:<br />
<br />
* Путь и имя файла ядра '''''относительно расположения GRUB''''' (в пределах раздела, содержащего ядро). <br />
<br />
К примеру, /boot это просто каталог, находящийся на одном разделе с / ,а '''vmlinuz26''' (имя файла ядра) будет в '''/boot/vmlinuz26'''. ''Если /boot находится на отдельном разделе, путь и имя файла будут просто '''/vmlinuz26''', относительно корневой директории '''GRUB'''<br />
<br />
* Root= определяет раздел, содержащий корневую директорию (/) загружаемой системы (точнее раздел, содержащий '''/sbin/init'''), ''соответственно схеме нумерации UUID'' как указано в 2008-04rc, в которой используется формат /dev/disk/by-uuid/xxxx-xxxx-xxxx. <br />
<br />
* Опции ядра. <br />
<br />
К примеру, '''ro''' монтирует файловую систему с параметром "только для чтения" во время загрузки, а '''"vga=773"''' выведет фреймбуфер с разрешением 1024x768 и глубиной цвета, равной 256.<br />
<br />
Строка 4: '''initrd''': (Для загрузочного RAM диска) Путь и имя файла для загрузочного образа '''относительно корневой директории GRUB''' (в пределах раздела, содержащего ядро). Опять таки, к примеру, /boot - это просто директория, расположенная на одном разделе с / и '''kernel26.img''' является именем файла initrd; тогда путь такой: '''/boot/kernel26.img'''. ''Если /boot была бы на отдельном разделе, путь и имя файла были бы просто '''/kernel26.img''', будучи относительными к корневой директории '''GRUB'''.''<br />
<br />
Установите загрузчик '''GRUB''' в главную загрузочную запись (MBR), в нашем примере sda.<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====Прелесть Arch'овой Rolling-release'ной модели=====<br />
Запомните, что Arch это дистрибутив с '''rolling release''' моделью. Это значит, что у вас никогда не возникнет причин для переустановки или or или разбираться в очередном релизе для обновления вашей системы. Просто переодически используйте '''pacman -Syu''' и ваша система будет всегда свежа, обновлена (и хорошо пахнуть :). После данного обновления все компоненты вашей системы будут иметь текущие версии.<br />
Если было также обновлено и ядро, перезагрузитесь (команда reboot).<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Добавление пользователей и установка групп===<br />
Вам не стоит (совсем-совсем не стоит) всё делать под root'ом. Это вообще является моветоном; это опасно, в конце-концов! Root - это для задач администрирования, настройки. Так что добавьте обычного смертного пользователя:<br />
adduser<br />
В то время как большинство опций по умолчанию вам подойдут, вы можете возжелать добавить такие группы как storage, audio, video, optical, и wheel в список дополнительных групп - особенно, если Вы планируете иметь полнофункциональный интерфейс компьютера. <br />
<br />
Нижеследующие группы задаются в /etc/group. <br />
<br />
Они включают:<br />
<br />
*'''audio''' - для задач, использующих звуковую карту и подобные устройства<br />
<br />
*'''wheel''' - для использования sudo<br />
<br />
*'''storage''' - для управления накопителями данных<br />
<br />
*'''video''' - для задач, связанных с видео и 3d-ускорением<br />
<br />
*'''optical''' - для управления задачами, которые используют оптические носители<br />
<br />
*'''floppy''' - для доступа к floppy, если таковой имеется<br />
<br />
*'''lp''' - для управления задачами печати<br />
<br />
Смотрите статью [[Groups]], чтобы понять, какие группы для чего нужны. <br />
<br />
Посмотрите страницы 'man''а на тему usermod и gpasswd для получения дополнительной информации.<br />
=====Установка и найстрока Sudo=====<br />
<br />
Смотри [[Sudo]]<br />
<br />
==Часть II: Ставим X и настраиваем ALSA==<br />
<br />
<br />
===Настройка звуковой карты с помощью alsamixer===<br />
Advanced Linux Sound Architecture (известная под акронимом '''ALSA''') это компонент ядра систему Linux, призванный заменить Open Sound System (OSS) представляющий драйвера для звуковых карт. Кроме драйверов, '''ALSA''' так же предоставляет библиотеки для разработчиков, которые хотят использовать возможности драйвера на более высоком уровне API, нежели прямое взаимодействие с драйверами ядра.<br />
-----<br />
{{Box Note|udev автоматически проверит ваше устройство во время загрузки, загрузив соотвествующий драйвер для вашей звуковой карты. Ваша аудиосистема, скорее всего, уже работает, но по умолчанию звук отключен (mute).}} <br />
Пакет утилит alsa содержит alsamixer, который позволяет настраивать звук прямо из консоли. (Вы сможете загружать aslamixer также из окружения '''X''' несколько позже.)<br />
<br />
Установка пакета утилит alsa:<br />
pacman -S alsa-utils<br />
Вы добавили-то обычного пользователя в группу audio? Если нет, то сейчас самое время! Под root'ом выполните:<br />
gpasswd -a yourusername audio<br />
Завершите сеанс (exit) и снова войдите под обычным пользователем, дабы удостоверится, что группа audio загрузилась верно.<br />
<br />
Под '''''простым, не root'овым''''' пользователем, выполните: <br />
'''[root@myhost ~]#''' alsamixer<br />
Включите каналы MASTER и PCM, подведя к ним курсор стрелочками лево/право и нажатием английской '''M'''. Увеличьте громкость клавишей "вверх" (70-90% должно быть в самый раз). Закройте микшер нажатием ESC.<br />
<br />
==== Проверка звука ====<br />
Проверьте настройку вашей аудиокарты коммандой aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
Вы услышите чарующий, манящий, жаркий и нежный, искрящийся всеми цветами радуги и клубящийся утренним туманом на горе Фудзи в лучах восходящего солнца, женский голос, прозносящий: "Front, center."<br />
<br />
Теперь залогинтесь под root'ом и выполните комманду alsactl:<br />
alsactl store<br />
Это приведет к созданию '/etc/asound.state', сохраняя найстроки asla-микшера.<br />
<br />
Также, добавте ''daemon'' alsa в вашу DAEMONS-секцию (демоническая секция, а-а-а!) в /etc/rc.conf дабы настройки микшера восстанавливались при каждой загрузке автоматически.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Учтите, что демон alsa'ы просто восстанавливает уровни громкости микшера при загрузки путем чтения /etc/asound.state. Это происходит независимо от аудио-библиотеки alsa (и уровня громкости API ядра).''<br />
<br />
Дополнительную информацию можно найти в wiki-записи [[ALSA]].<br />
<br />
===Устанавливаем и настраиваем X-ы===<br />
О, великие '''X''' Window System (обычно '''X11''', или '''X''', или просто '''Иксы''') это сетевой и экранный протокол, который поддерживает оконную систему на bitmap-дисплеях. Иксы предоставляют арсенал утилит и протокол для создания Графического Интефейса Пользователя (GUI) на <code>UNIX</code>'овых операционных системах.<br />
<br />
'''X''' представляет базовый фреймворк, на примитивах, для создания GUI'овых сред: отрисовка и перемещение окон по экрану и взаимодействие с мышкой/клавиатурой. '''X''' не предоставляет пользовательский интерфейс — это поддерживает индивидуальная клиент-программа. <br />
<br />
'''X''' так назван, поскольку им предшествовала '''W''' Window System, разработанна в Стендфорском Университете. <br />
-----<br />
<br />
{{Box Note| Если вы планировали использовать '''open-source''' видео-драйвер, и если вам нужно 3d-ускорение, рекомендуется инсталлировать библиотеку libgl перед установкой Xorg:}}<br />
pacman -S libgl<br />
''(Частные видеодрайверы обеспечивают свои собственные реализации этой библиотеки)''<br />
----- <br />
Теперь мы установим основные пакеты Xorg, используя pacman. Это - первый шаг в построении GUI.<br />
<br />
pacman -S xorg<br />
3d-утилиты, такие как glxgears включены пакет '''mesa''':<br />
pacman -S mesa<br />
<br />
Теперь у нас есть основные пакеты, в которых мы нуждаемся для того, чтобы запустить '''X''' Server. Сейчас вы должны добавить драйвер для своей видеокарты (к примеру xf86-video-<имя>). Самый простой способ конфигурировать X.org, устанавливая корретные пакеты драйвера сначала, а затем генерируя /etc/X11/xorg.conf испольуя скрипт автоконфигурации, такой как Xorg - configure.<br />
<br />
Если вы хотите увидеть весь список '''open-source''' видеодрайверов, используйте: <br />
pacman -Ss xf86-video | less<br />
Вам нужно знать, какой видеочипсет на вашем компьютере. Если вы не знаете, выполните:<br />
lspci | grep VGA<br />
Здесь приведен список '''open source''' драйверов и соотвествующих графических чипсетов..<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Отмечу, что '''vesa''' драйвера являются самыми универсальными, и будут работать почти со всеми современными графическими чипсетами. Если вы не смогли найти подходящий драйвер, то уж vesa '''должна''' работать.<br />
<br />
*Если у Вас есть NVIDIA или видеоадаптер ATI, Вы можете установить проприетарных NVIDIA или ATI драйвер. '''Установка проприетарных видеодрайверов освещена в [[#Использование проприетарных графических драйверов (NVIDIA, ATI)|чуть ниже]].'''<br />
<br />
Используйте pacman для инсталляции подходящего видеодрайвера для вашей видеокарты:<br />
pacman -S xf86-video-savage<br />
(для драйвера от Savage)<br />
<br />
==Создание /etc/X11/xorg.conf==<br />
=====Что такое /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf это главный конфигурационный файл вашей '''X''' Window System, основа основ вашего '''G'''raphical '''U'''ser '''I'''nterface. Это текстовой файл, разбитый на секции и подсекции. Важными являются секции ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, и ServerLayout''. Секции могут располагаться в любом порядке, может быть несколько секций одного типа, к примеру, если у вас более одного монитора или если у вашего ноутбука кроме мышки есть еще и тачпад. <br />
------<br />
По умолчанию, у вас не будет конфигурационного xorg-файла. В последних версиях xorg он не нужен, ''если'' автоопределение ''работает нормально'' и вам не нужно вручную включать такие штуки, как aiglx и тому подобное. <br />
<br />
''Большинство людей считают, что им все равно необходимо сгенерировать этот файл.''<br />
<br />
<br />
Опытные пользователи обычно желают вручную сгенерировать свой собственный xorg.conf. Вы так же можете использовать скрипт Xorg -configure для базовой конфигурации. Под root'ом исполните:<br />
Xorg -configure<br />
Будет создан конфиг-файл в /root/xorg.conf.new <br />
<br />
Для теста сервера, введите:<br />
X -config /root/xorg.conf.new<br />
'''X''' запустится. Вы получите на экране бело-черный мышиный курсор в виде буквы '''X''', который будет откликаться на движение мышки/тачпада. Используйте CTRL-Alt-Backspace дабы покинуть '''X'''.<br />
<br />
Просмотр вашего конфиг-файла на предмет ошибок:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Убедитесь, что скрипт Xorg -configure корректно определил ваш видеодрайвер. к примеру:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "vesa"<br />
VendorName "VM Ware Inc" #если вы запускаете ArchLinux в эмуляторе VM Ware<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Убедитесь, что горизонтальная синхронизация и вертикальная частота обновления заданы под секцией "Monitor". Если нет, то задайте их:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Подходит для большиства LCD мониторов<br />
VertRefresh 50.0 - 100.0 # Подходит для большинства LCD и CRT мониторов.<br />
EndSection<br />
(Если вы точно не знаете этих настроек, откройте инструкцию от вашего монитора.)<br />
<br />
Задайте глубину цвета под секцией "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Значит, что мы установили 24битный цвет, что соотвествует true color (миллионы цветов)<br />
<br />
Также, добавьте желаемые режимы в подсекцию "Display" , в конце, под Depth 24 , к примеру:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Добавьте следующий раздел, если Вы желаете включить eye candy, который требует дополнительного расширения: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Испытайте ваш конфиг снова, после изменения:<br />
X -config /root/xorg.conf.new<br />
Убедитесь, что сессия '''X''' открылась без ошибок и переместите сгенерированный конфиг-файл в /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Подробные инструкции смотрите в статье [[Xorg]].<br />
<br />
====Алтернативный способ генерации xorg.conf====<br />
Если Xorg -configure не может сгенерировать работоспособный xorg.conf, вы можете использовать инструмент hwd. Установите его командой:<br />
pacman -S hwd<br />
И запустите:<br />
hwd -xa <br />
Наконец, вы можете выбрать xorgconfig, который расспросит вас о всех ваших устройствах и сгенерирует xorg.conf:<br />
xorgconfig<br />
Смотрите далее '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Использование частных графических драйверов (NVIDIA, ATI)===<br />
Вы можете использовать частные дрова от NVIDIA и ATI. <br />
====Графические карты от NVIDIA====<br />
Предполагается, что драйвера от NVIDIA будут, несомненно, высокого качества, предлагают быстродействующий 3D, в то время как open source драйвер '''nv''' может предложить в данное время лишь поддержку 2d. <br />
<br />
Перед тем, как ставить какой-то из драйверов, нужно понять, какой именно вам подходит. В ArchLinux есть три пакета драйверов - каждый для своего набора видеокарточек: <br />
<br />
'''1. nvidia-71xx''' ''для самых старых карт типа TNT и TNT2''<br />
<br />
'''2. nvidia-96xx''' ''для более новых карт - вплоть до GF 4''<br />
<br />
'''3. nvidia''' ''новейшие чипсеты, новее GF 4''<br />
<br />
Загляните на страницу NVIDIA чтобы выяснить, какая именно у вас карточка. Разница будет только в процессе исталляции; Настройки же едины для всех драйверов.<br />
<br />
Выберите и установите подходящий драйвер ''для вашей карточки'', к примеру: <br />
pacman -S nvidia<br />
<br />
В пакете NVIDIA есть специальная утилита для коррекции файла /etc/X11/xorg.conf под использование драйверов от NVIDIA:<br />
nvidia-xconfig<br />
<br />
Также тут есть несколько опций, которые помогают лучше настроить xorg.conf.<br />
Например,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
Для более подробной информации гляньте в nvidia-xconfig(1).<br />
<br />
Самые полезные опции в секции оборудования (учтите, что некоторые из них могут не работать на вашей системе):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Убедитесь, что все копии DRI закомментированы:<br />
# Load "dri"<br />
Проверьте и перепроверьте /etc/X11/xorg.conf чтобы убедится, что вы выставили корректную глубину цвета, частоту горизонтальной синхронизации и вертикальной развертки, а так же корректные возможные разрешения экрана.<br />
<br />
Обновите зависимости ядра:<br />
depmod -a<br />
(у меня почему-то эта фишка вообще не заработала, по сему я просто ввел reboot)<br />
<br />
Дополнительные инструкции по танцам с бубном приводятся в статье [[NVIDIA]].<br />
<br />
Смотрите далее '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====Графические карты ATI====<br />
Владельцы ATI имеют две опции драйвера. Если вы не уверены в том, какой драйвер использовать, попробуйте сначала opensource. Он покрывает большинство среднестатистических потребностей среднестатистических же пользователей; плюс с ним меньше проблем.<br />
<br />
Установите '''частный''' драйвер ATI с помощью<br />
pacman -S catalyst<br />
Используйте инструмент aticonfig для настройки xorg.conf.<br />
<br />
Установите '''open-source''''овый драйвер ATI:<br />
pacman -S xf86-video-ati<br />
На данный момент производительность opensource'ового драйвера, конечно, несравнима с частным драйвером. Также, в нем нет поддержки TV-out, dual-link DVI, и, возможно, еще ряда функций. Зато он поддерживает Aiglx и имеет лучшую поддержку dual-head support.<br />
{{Box Note| В последний версиях частного драйвера он уже поддерживает [[AIGLX]]. Для использования [[Compiz]] или [[Beryl]] добавьте опцию "AIGLX" "True" в секцию ServerFlags и опцию "Composite" "True" в секцию Extensions.}}<br />
Дополнительные инструкции по конфигурации ATI могут быть найдены в [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Рекомендуется установить пакет gnome-utils, в котором в частности содержится пакет, позволяющий делать скриншоты нажатием клавиши Print Screen :<br />
pacman -S gnome-utils<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Демон gdm автоматически загружает графическую среду. Если вы попробуете её покинуть, используя ctrl+alt+backspace, он снова её загрузит. Если в этого не хотите, а хотите загружать граф.среду вручную, то ставьте в файле rc.conf перед именем этого демона (gdm) восклицательный знак (!). <br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Мультимедия ==<br />
<br />
<br />
===Видео плеер===<br />
====VLC====<br />
VLC Player это мультимедиа плеер под Linux (хотя есть и под MacOS и под Windows). Для установки просто наберите:<br />
<br />
pacman -S vlc<br />
<br />
====Mplayer====<br />
MPlayer также мультимедийный плеер для Linux. Исталляция:<br />
<br />
pacman -S mplayer<br />
<br />
В нем также есть plug-in для Mozilla, что позволяет смотреть потоковое видео на web-страницах. Исталляция:<br />
<br />
pacman -S mplayer-plugin<br />
<br />
Если вы используете KDE, KMplayer - лучший выбор. В нем уже встроен plug-in для Konqueror для просмотра поточного видео. Инсталляция:<br />
<br />
pacman -S kmplayer<br />
<br />
====Xine====<br />
<br />
Xine это чудесный плеер, особенно для DVD.<br />
<br />
pacman -S xine-ui<br />
Библиотека libdvdcss умеет декодировать DVD (для шифрованных DVD). ''Убедитесь в легальности использования libdvdcss в вашей стране перед инсталляцией (Буахахахаха!)''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] это официальный кинопроигрыватель для GNOME базирующийся на xine-lib или GStreamer (gstreamer - по дефолту инсталлируется вместе с пакетом arch totem). Он поддерживает плейлисты, полноэкранный режим, поиск и уровень громкости, а также клавиатурную навигацию.<br />
В него встроенна дополнительная функциональность:<br />
<br />
* Установка превьюшек видео для файл-менеджера<br />
* Панель настроек Nautilus <br />
* Epiphany / Mozilla (Firefox)-плагин для просмотра порно (или видео) прямо в вашем браузере <br />
* Webcam-утилита (разрабатывается)<br />
<br />
Totem-xine это лучший выбор, если вы хотите смотреть DVD.<br />
<br />
Totem входит в пакет gnome-extra; а вот плагин Totem для web-браузера - нет.<br />
<br />
Он ставится отдельно:<br />
pacman -S totem<br />
<br />
Для установки браузерного plug-in'а:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine это отличная штука для пользователей KDE (Кед). Для инсталляции введите:<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Прочая информация==<br />
За дополнительной инфорацией обращайтесь к [http://archlinux.org.ru/ Русскоязычному сообществу Arch], а также [http://archlinux.org.ru/forum/ на русскоязычный фоум]. Также по любым вопросам обращайтесь на IRC-канал:<br />
Сервер: irc.freenode.org, канал #archlinux-ru, кодировка UTF-8.<br />
Опытные, добрые, отзывчивые админы всегда окажут вам полное содействие и помощь.<br />
=====FAQ=====<br />
Смотрите [[ЧаВо]]<br />
<br />
<br />
=====Что еще почитать?=====<br />
[http://www.cyber39.ru/os/linux/3716-linux_dlja_nachinajushhikh.html Linux для начинающих.]<br />
<br />
[http://www.cyber39.ru/2008/02/16/setevoe_administrirovanie_linux.html Сетевое администрирование Linux.]<br />
<br />
[http://www.cyber39.ru/2008/02/16/jadro_linux_3e_izd.html Ядро Linux.]<br />
<br />
[http://www.cyber39.ru/os/linux/1204-linux_polnoe_rukovodstvo.html Linux: Полное руководство.]<br />
<br />
[http://www.cyber39.ru/2008/02/13/operacionnaja_sistema_unix_nastolnyjj_spravochnik.html Операционная система UNIX. Настольный справочник.]<br />
<br />
[http://ru.wikibooks.org/wiki/Введение_в_администрирование_UNIX#.D0.92.D0.B2.D0.B5.D0.B4.D0.B5.D0.BD.D0.B8.D0.B5_.D0.B2_.D0.AE.D0.BD.D0.B8.D0.BA.D1.81 Введение в администрирование UNIX.]<br />
<br />
[http://www.cyber39.ru/os/linux/19037-linux_osnovnye_komandy_karmannyjj_spravochnik.html LINUX: Основные комманды. Карманный справочник.]<br />
<br />
[http://www.cyber39.ru/coding/cpp/16946-programmirovanie_na_c_v_linux.html Программирование на C в Linux.]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=54911
Beginners' guide (Русский)
2008-12-05T07:47:39Z
<p>Alsvartr: /* GRUB */ исправлен башорговский перевод</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
{{Box Note |'''По возможности, пользуйтесь английской версией этого документа, т.к. именно она обновляется в первую очередь, содержит все последние изменения и самую актуальную на данный момент информацию.'''}}<br />
{{Box Note|'''Уважаемые переводчики, прежде чем переводить какой-либо раздел, сравните его с английской версией ибо информация в нём могла устареть'''}}<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружение рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно, если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с большим набором софта на CD (или даже DVD), включающим стандартное Рабочее Окружение(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жёсткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. Попросту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." - Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведённые инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надёжной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезным [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставьте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфигурации загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жёсткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жёсткого диска|Подготовке жёсткого диска]].<br />
<br />
====Подготовка жёсткого диска====<br />
Выберите первый пункт меню - "Prepare Hard Drive". Вам будет предложено автоматически подготовить ваш жёсткий диск к установке Arch Linux, либо вручную переразбить и подготовить разделы.<br />
* 1. Автоматическая подготовка<br />
Установщик сам разобъёт ваш жесткий диск на следующие разделы:<br />
* Загрузочный раздел /boot c файловой системой ext2 и размером по умолчанию в 32 мегабайта. Вы сможете изменить это значение. <br />
* Раздел подкачки swap с размером по умолчанию в 256 мегабайтов. Вы также сможете изменить это значение.<br />
* Отдельные разделы для корня / и домашней директории пользователей /home. Размеры вы определяете сами. Также вам будет предоставлен выбор из файловых систем: ext2, ext3, reiserfs, xfs и jfs. Но следует учесть, что оба этих раздела должны быть отформатированы в одинаковой файловой системе.<br />
<br />
Не забывайте - автоматическая подготовка сотрёт все данные на вашем жёстком диске! Внимательно читайте предупреждение установщика.<br />
<br />
* 2. '''(Рекомендуется)''' Ручная подготовка<br />
<br />
Выберите из списка жёсткий диск, на который будет произведена установка (/dev/sd''x'').<br />
<br />
''На этом этапе более опытные пользователи могут сразу перейти к главе о '''[[#Выбор Пакетов|выборе пакетов]]'''.''<br />
<br />
=====Информация о разбивке=====<br />
Разбивка жёсткого диска заключается в создании отдельных зон (разделов) на жёстком диске. Они будут выглядеть как отдельные диски со своими файловыми системами. Разделы подразделяются на "Основные" (Primary), "Расширенные" (Extended) и "Логические" (Logical).<br />
<br />
'''Основные''' разделы могут быть загрузочными и их количество ограничено четырьмя. Больше четырёх главных разделов создать нельзя и нужно использовать '''Расширенные''' разделы, которые будут содержать '''Логические'''.<br />
<br />
Расширенные разделы не могут быть использованы сами по себе - они всего лишь "контейнеры" для логических. Жёсткий диск может содержать только один расширенный раздел, который может быть разделён на логические.<br />
<br />
Во время разбивки диска можно заметить схему нумерации разделов. Главные получают названия sda1-3, расширенный раздел - sda4, а логические, соответственно, sda5, sda6 и т.д.<br />
<br />
=====Раздел Подкачки (swap)=====<br />
Данный раздел является чем-то вроде "виртуального ОЗУ". На нем хранятся данные, которые не умещаются, либо не подходят для хранения в оперативной памяти.<br />
<br />
Исторически сложилось, что размер раздела подкачки определяется по схеме 2ХОЗУ. То есть, двойной объем оперативной памяти. Затем, с развитием компьютерной техники, данное правило не всегда стало являться необходимым. На компьютере с 512 мегабайтами памяти правило 2Х все еще действует эффективно. Однако, на машинах с 1 гигабайтом памяти обычно наиболее эффективна схема 1ХОЗУ. Если размер вашего ОЗУ больше или равен 1 гигабайту, то можно вообще обойтись без раздела подкачки, однако это не рекомендуется. Мы создадим раздел размером в 1 гигабайт в нашем примере.<br />
<br />
{{Box Note|Если вы планируете использовать технологии suspend-to-disk или hibernate, то размер раздела подкачки, по меньшей мере, должен соответствовать размеру вашей оперативной памяти. Но рекомендуется задать размер хотя бы на 15% больший, чтобы учесть появление испорченных секторов на диске (bad sectors).}}<br />
=====Схема Разбивки=====<br />
Схема разбивки разделов довольно индивидуальна и во многом зависит от предпочтений и нужд конкретного пользователя. Но, как минимум, вам нужны два раздела: один для корня ( / ), второй для раздела подкачки (swap). Однако, вы можете захотеть иметь отдельные разделы для /boot (на нем обычно находится ядро Linux), /var и /home (пользовательская директория). Обычно иметь два раздела отдельно для корня ( / ) и отдельно для /home считается хорошей практикой и более удобным и безопасным решением.<br />
В нашем примере мы создадим три отдельных раздела: для корня, для /home и один раздел подкачки swap.<br />
<br />
=====cfdisk===== <br />
Итак, начнём с создания главного раздела, содержащего корневую файловую систему.<br />
<br />
Для создания нового раздела выберите пункт '''N'''ew, затем Primary. Далее задайте желаемый размер раздела (что-то между 4 и 12 гигабайт будет хорошим выбором). Выберите только что созданный раздел и сделайте его загрузочным, выбрав пункт '''B'''ootable.<br />
<br />
Также выберите пункт '''T'''ype и задайте значение '83 Linux'. Нашему разделу должно присвоится имя sda1.<br />
<br />
Затем создадим раздел подкачки. Задайте размер между 512 мегабайт и 1 гигабайтом, выберите '''T'''ype - 82 (Linux swap / Solaris). Наш раздел должен быть теперь виден как sda2.<br />
<br />
Теперь ещё один раздел для /home. Выберите главный раздел и установите желаемый размер в зависимости от того, что пользователи вашего компьютера будут хранить в своих персональных директориях. Также, как и для корня, задайте '''T'''ype - 83 Linux. Данный раздел появится как sda3.<br />
<br />
<br />
<br />
Вот как должна выглядеть наша таблица разделов (размеры могут отличаться):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Выберите '''W'''rite и нажмите ''''yes''''. Или нажмите '''Q'''uit для выхода из программы разбивки.<br />
<br />
<br />
=====Мои IDE-диски выглядят как SCSI, почему?=====<br />
В последних версиях ядра Linux все диски (IDE, SATA, SCSI) именуются как sd''x''. Пусть это вас не волнует, это нормально.<br />
<br />
====Назначение точек монтирования====<br />
Во-первых, выберите нужный раздел под раздел подкачки (в нашем примере это sda3). Во-вторых, выберите раздел для монтирования корневой ФС (sda1 в нашем примере). Вам будет предложено выбрать желаемую файловую систему.<br />
<br />
=====Файловые системы=====<br />
<br />
Выбор файловой системы достаточно субъективен. Каждая из предложенных ФС имеет свои достоинства и недостатки, всё зависит целиком от ваших предпочтений. Далее мы кратко рассмотрим поддерживаемые ФС:<br />
<br />
1. '''[http://ru.wikipedia.org/wiki/Ext2 ext2]''' - старая и надежная файловая система для ОС GNU/Linux. Очень стабильна, но без поддержки журналирования - это значит, что в случае аппаратных сбоев или перепадов напряжения ваша информация может пострадать. Не слишком хороший выбор для корневого и /home разделов. Данная ФС может быть легко преобразована в ext3.<br />
<br />
2. '''[http://ru.wikipedia.org/wiki/Ext2 ext3]''' - наследница ext2, но с поддержкой журналирования. Она полностью совместима с ext2. Однако, по некоторым тестам немного медленнее, нежели остальные ФС. Тем не менее, очень стабильна и активно используется, поддерживается и разрабатывается сообществом GNU/Linux.<br />
<br />
3. '''[http://ru.wikipedia.org/wiki/ReiserFS ReiserFS]''' - высокопроизводительная файловая система, разработанная Гансом Райзером. Считается очень быстрой, особенно при операциях с файлами маленького размера, однако сравнительно медленно монтируется. Вполне готова к использованию и стабильна. Однако, не слишком активно разрабатывается на данный момент (все силы отданы Reiser4).<br />
<br />
4. '''[http://ru.wikipedia.org/wiki/JFS JFS]''' - '''J'''ournaled '''F'''ile'''S'''ystem, файловая система от IBM. Использует наименьшее количество ресурсов центрального процессора, нежели остальные ФС. Очень быстра в монтировании и использовании. Однако, не так широко используется, как ext или ReiserFS.<br />
<br />
5. '''[http://ru.wikipedia.org/wiki/JFS XFS]''' - журналируемая ФС, которая показывает наибольшую скорость при операциях с большими файлами. Хороший выбор для разделов с большим их количеством.<br />
<br />
Наиболее значимое отличие между ними - журналирование. Все, кроме ext2, его поддерживают, однако техника журналирования не у всех одинакова. Только ext3 поддерживает хранение в журнале данных и мета-данных (информация о директориях). Это значит, что только она в случае сбоя сможет восстановить полностью в точной мере ту информационную структуру, которая была до сбоя.<br />
<br />
Выберите и создайте ФС для корня. Далее вам будет предложено создать дополнительные разделы. В нашем примере, нам понадобится создать еще sda2. Выберите файловую систему и примонтируйте ее как /home. Нажмите Done и возвращайтесь в главное меню установщика.<br />
<br />
===Выбор пакетов===<br />
На данном этапе вам предстоит выбрать пакеты, которые будут установлены на вашу систему.<br />
* Установка из Core ISO: выберите подходящее устройство CD-ROM из списка.<br />
* Установка из FTP ISO: выберите FTP/HTTP-зеркало для получения пакетов.<br />
<br />
Процесс выбора пакетов разбит на две стадии: выбор категорий пакетов, а затем - выбор отдельных пакетов в этих категориях. С помощью клавиши пробела вы можете устанавливать и снимать выделение пакетов и категорий. Ниже приведен список категорий пакетов с объяснениями:<br />
<br />
* '''BASE:''' содержит только базовые, необходимые системные пакеты. Минимальный набор для базовой системы.<br />
*'''SUPPORT:''' здесь находятся дополнительные пакеты для работы с сетью и файловыми системами. Например, такие как gpm, fuse, dnsutils, ndiswrapper, ntfs-3g, драйвера для wi-fi адаптеров и т.п.<br />
*'''DEVEL:''' пакеты для сборки программ. То есть, GCC, autoconf, automake, make и т.п.<br />
*'''LIB:''' различные системные библиотеки - gmp, libelf, libevent и т.п.<br />
<br />
Нажмите OK и далее выберите опцию 'yes', когда вам будет предложено выбрать все пакеты по умолчанию ('Select all packages by default').<br />
<br />
Далее вам будет показан список пакетов в выбранных категориях. Для новичка будет лучшим выбором оставить всё как есть. Тогда как более опытные пользователи могут убрать ненужные им пакеты из данного списка.<br />
<br />
===Установка пакетов===<br />
Теперь выберите пункт 'Install Packages', чтобы начать установку пакетов. Вам будет предложено сохранить загруженные из источника установки пакеты в системном кэше. Это хороший выбор, который может очень вам помочь, если какой-либо новый установленный пакет будет работать не так, как надо. Тогда можно просто восстановить старую версию из кэша. Помните, что вы всегда можете очистить ваш кэш вручную при необходимости.<br />
Установщик произведет установку выбранных вами пакетов и ядра Arch Linux в вашу новую систему.<br />
<br />
*FTP ISO: менеджер пакетов [[Pacman_(Русский)|Pacman]] установит пакеты с сетевого зеркала (прогресс вы можете наблюдать на vc5, а чтобы вернуться назад к установщику - перейдите на vc1).<br />
*CORE ISO: пакеты будут установлены с оптического диска.<br />
<br />
===Конфигурация системы===<br />
''Чёткое следование и понимание следующих шагов является ключем к корректной работе системы.'' <br />
<br />
Установщик спросит вас о необходимости использования [[Hwdetect|hwdetect]] для сбора информации о параметрах компьютера. Новичку следует выбрать 'yes'. <br />
<br />
Опытные пользователи, которые хорошо знают свое железо, требующиеся модули, а так же те, что могут вручную отладить /etc/rc.conf, /etc/mkinitcpio и /etc/fstab, и т.д. с нуля могут выбрать'no'. (Не требует напоминания тот факт, что сия опция крайне сложна, выходит за рамки этого руководства и поэтому не освещается им)<br />
<br />
Далее будут заданы вопросы, необходимо ли вам будет загружаться с USB-устройств, FireWire-устройств, PCMCIA-устройств, общих папок NFS, программных RAID-массивов, LVM2 разделов, шифрованных разделов и о поддержке DSDT. Выбирайте 'yes' если вам что-то из вышеописанного требуется. В рамках нашего руководства не требуется ничего из описанного. <br />
<br />
Теперь вас спросят, какой текстовый редактор вы желаете использовать; выбирайте [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] (проще для освоения) или [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (рекомендуется, сложнее для освоения). Перед вами появится меню, включающее список наиболее важных конфигурационных файлов системы. Если вы хотите просмотреть возможные настройки, указанные в /etc/rc.conf, то просто нажмите Alt+F2, чтобы попасть в консоль, просмотрите файл и вернитесь в установщик с помощью Alt+F1. <br />
<br />
=====Почему установщик не делает это всё автоматически?=====<br />
Сокрытие процесса установки является прямой противоположностью [[Путь Arch|пути Arch]]. Пока имеет место факт, что последние версии ядра и средства определения оборудования замечательным образом поддерживают различное оборудование и автоконфигурацию, Arch будет представлять пользователю все соотвествующие конфигурационные файлы в течение установки с целью ''прозрачности''. К тому времени, как вы закончите настройку этих файлов под свои нужды, вы будете знать элементарные методы ручной настройки Arch Linux'а и будете знакомы с базовой структурой, будучи хорошо подготовленны к продуктивному использованию вашей новой системы.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux следует трациям '''*BSD''' использования '''/etc/rc.conf''' в качестве принципиального расположения системной конфигурации. Этот небольшой файл содержит обширный набор различных параметров, используемых при запуске системы. Как становится ясно из его имени, этот файл так же содержит настройки /etc/rc* файлов, а так же и вызывает эти файлы. Файл /etc/rc.conf предлагает простой, элегантный метод поточной конфигурации системных ресурсов включая широкие возможности контроля, охотно представляя их пользователям Arch Linux.<br />
<br />
* Секция '''LOCALIZATION''' <br />
** '''LOCALE'''=: Устанавливает системную локаль, которая будет использоватся для всех i18n приложений и утилит. Вы можете просмотреть список доступных локалей, введя комманду 'locale -a' в коммандой строке. Начальные настройки подходят для англоязычных пользователей (процесс локализации системы описан в [http://wiki.archlinux.org/index.php/Интернационализация соотвествующем руководстве]).<br />
<br />
** '''HARDWARECLOCK'''=: Определяет, каким образом аппаратные часы вашего компьютера, которые синхронизируются при загрузке и выключении, хранят время: '''UTC''' или '''localtime'''. UTC может сильно упростить смену часовых поясов, а так же переход на летнее/зимнее время. localtime необходим, если вы используете несколько операционных систем (скажем, у вас так же установлен Windows), которые хранят в аппаратных часах лишь localtime.<br />
** '''TIMEZONE'''=: Определяет ваш часовой пояс. Для Москвы, скажем, это "Europe/Moscow". (Все возможные часовые пояса хранятся в /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: Все возможные раскладки хранятся в /usr/share/kbd/keymaps. Учтите, что эта опция определяется только для TTY (текстовой консоли), а не графического оконого менеджера и X-ов!<br />
** '''CONSOLEFONT'''=: Возможные консольные шрифты хранятся в /usr/share/kbd/consolefonts/ если вам вдруг требуется замена. Для поддержки русского языка требуется указать "/usr/share/kbd/consolefonts/cyr-sun16".<br />
** '''CONSOLEMAP'''=: Определяет, какую console map загрузить с программой установки шрифтов при загрузке системы. Возможные map'ы можно найти в /usr/share/kbd/consoletrans, если вдруг необходимо. По умолчанию поле пустое, что считается безопасным. <br />
** '''USECOLOR'''=: Установите "yes", если у вас цветной монитор и вы хотите, что бы в консоли отображались цвета.<br />
<br />
LOCALE="ru_RU.UTF-8"<br />
HARDWARECLOCK="UTC"<br />
TIMEZONE="Europe/Moscow"<br />
KEYMAP="ru" # Или ru-mab для раскладки с переключением по Ctrl-Shift<br />
CONSOLEFONT="/usr/share/kbd/consolefonts/cyr-sun16"<br />
CONSOLEMAP=""<br />
USECOLOR="yes"<br />
<br />
* Секция '''HARDWARE'''<br />
** '''MOD_AUTOLOAD'''=: Если установлена как "yes", то '''udev''' будет автоматически проверять устройства и загружать соотвествующие модули во время загрузки системы. Установка в положение "no" возложит на пользователя возможность определят эту информацию самостоятельно или скомпилировать свое собственное ядро и модули, и т.д. <br />
** '''MOD_BLACKLIST'''=: Крайне не рекомендуется добавление blacklist'овых модулей прямо в строчку '''MODULES=''' далее. <br />
** '''MODULES'''=: Определяет дополнительные модули, если известно, что важный модуль пропущен, ('''hwdetect''' должен быть заполнен в наиболее важных модулях). Так же задайте какие-либо blacklist'овые модули, ставя перед ними восклицательный знак (!). Udev НЕ будет загружать blacklist'овые модули. К примеру, IPv6-модуль, так же как и надоедливый pc-спикер, отключены. <br />
# Сканирует устройства и загружает соотвествующие модули<br />
MOD_AUTOLOAD="yes"<br />
# Blacklist-модуль - Крайне не рекомендуется<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* Секция '''NETWORKING'''<br />
** '''HOSTNAME'''=: Задайте имя хоста (HOSTNAME) на свой вкус.<br />
** '''eth0'''=: 'Ethernet, card 0'. Задайте IP адрес интерфейса, сетевую маску и широковещательный адрес ''если'' вы используете '''статический IP'''. Задайте eth0="dhcp" если вы используете '''DHCP'''<br />
** '''INTERFACES'''=: Здесь задайте какие-либо/все интерфейсы. Если вы НЕ используете DHCP для конфигурации устройства, просто запомните, что значение переменной (имя которой должно совпадать с именем устройства, которое вы настраиваете) совпадает со строкой, которая будет следовать за коммандой "ifconfig", если вы решите настраивать устройство вручную в коммандой строке. <br />
** '''gateway'''=: Если вы используете '''статический IP''', установите адрес шлюза. Не трогайте этот параметр, если вы используете'''DHCP'''<br />
** '''ROUTES'''=: Если вы используете статический '''IP''', уберите '''!''' перед 'gateway'. Оставьте'''!''', если используете '''DHCP'''<br />
<br />
К примеру, если используется '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* Секция '''DAEMONS'''<br />
Этот массив задает список имен скриптов в /etc/rc.d/ которые будут запускаться во время загрузки системы, а так же порядок их запуска. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*Если перед именем скрипта стоит восклицательный знак (!), он не исполняется. <br />
*Если перед скриптом стоит символ "at" (выглядит как "@"), тогда он будет запущен в фоновом режиме; очередь загрузки не будет ожидать успешного завершения демона перед переходом к загрузке следующего. Полезно для ускорения загрузки системы.<br />
*Редактируете этот массив, когда устанавливаете новые системные сервисы, если желаете, чтобы они загружались во время запуска системы.<br />
<br />
Это загрузка в 'стиле BSD', с особым Arch-способом обращения, в то время как остальные обращаются с помощью symlinks к директории /etc/init.d<br />
<br />
=====О Демонах=====<br />
Потушите свечу, уберите распятие, унесите иконы. Да, разговор пойдет о Демонах, но вовсе не о тех, о которых вы подумали сначала. И, да, вам не обязательно изменять строчку [[daemons]] в этот раз, но будет полезно объяснить, кто такие Демоны, поскольку они пригодятся нам далее в этом руководстве. <br />
<br />
По аналогии с сервисами Windows, ''демоны'' это программы, работающие в фоновом режиме, ожидающие наступления определенного события и предоставляющие сервисы. Отличный пример - вебсервер, который ожидает запроса на получение страницы или SSH-сервер, ожидающий, пока кто-нибудь не попробует войти в систему. В отличие от этих "полноценных" программ, их работа не так заметна. К примеру демон, который записывает что-либо в log-файл (к примеру, syslog, metalog), демон, понижающий частоту вашего CPU, когда система ничем не занята (к примеру:cpufreq), и демоны, которые представляют вам графический вариант входа в систему (log on) (к примеру: gdm, kdm). Все эти программы могут быть добавлены в строку "daemons" и будут запущены во время загрузки операционной системы. Всячекие полезные демоны будут представлены далее в этом руководстве. (Призыв Азазеля, Велиара, Асмодея, Маммона, Балтазара и других высших демонов в этом руководстве не рассматривается).<br />
<br />
Обращаясь к истории, термин ''daemon'' был предложен программистами MIT's Project MAC. Они заимствовали имя из ''Maxwell's demon'', мысленный эксперимент, главным персонажем которого является гипотетическое разумное существо ростом c молекулу. Выдумано Джеймсом Максвеллом с целью проиллюстрировать Второе начало термодинамики. <code>UNIX</code> системы унаследовали терминологию и создали бэкроним '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Подсказка: Все демоны в Arch проживают в директории /etc/rc.d/ Звоните! :)'''''<br />
<br />
=====Про /etc/fstab=====<br />
Так называемый '''fstab''' ('''f'''ile '''s'''ystems '''tab'''le) это часть конфигурации системы, отображающая все доступные диски и дисковые разделы; показывающая, как они инициализированны/интегрированны в системную файловую систему. Данный '''/etc/fstab''' обычно используется коммандой '''mount''', которая читает /etc/fstab дабы определить, какие настройки нужно использовать для монтирования определенного устройства.<br />
<br />
<br />
К примеру, '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Измените '''fstab''' под себя, если желаете.<br />
{{Box Note | Как было писано в 2008-04rc, Arch теперь использует UUID, или Universally Unique Identifier конвертацию имен для повышения совместимости. Крайне полезно при активной работе над ядром и udev, что может повлечь случайное изменение в порядке загрузки драйверов storage-контроллеров и невозможности загрузки системы из-за kernel-panic. Почти все материнские платы имеют несколько контроллеров (SATA, IDE), и в вышеуказанных случаях, /dev/sda мог запросто стать /dev/sdb при следующей загрузке - с тех пор была введена UUID.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Отобразит разделы, отсортированные по uuid.<br />
<br />
*Если вы планируете использование '''hal''' для автоматического монтирования всякой всячины (вроде DVD дисков), вы, возможно, изволите закомментить записи, касающиеся cdrom и dvd для подготовки к установке '''hal''', который будет инсталлирован нами далее в этом руководстве.<br />
<br />
{{Box Note | '''''Опции 'noatime' и 'nodiratime' опции могут спокойно быть применены к / и /home независимо от Вашего указанного типа файловой системы для увеличенния скорости, производительности, и эффективности как для ноутбуков, так же как стационарных компьютеров.'''''}}<br />
<br />
Дополнительная информация доступна в разделе wiki: [[Fstab]].<br />
<br />
====='''/etc/mkinitcpio.conf и /etc/modprobe.conf'''=====<br />
Нам с вами не требуется настройка этих файлов на данном этапе. <br />
<br />
* '''mkinitcpio.conf''' Этот файл позволяет Вам точно настраивать начальную файловую систему (также обычно называемый начальным ram-диском или "initrd"). Файл initrd является созданным gzipp'ом образом, который был прочитан ядром во время загрузки. Цель initrd - довести систему до момента, когда она сможет обратиться к основной root'овой файловой системе. Это значит, что этот файл должен загрузить любые модули, которые потребуются для таких устройств, как IDE, SCSI или диски SATA (Или USB/FW, если вы грузитесь с USB/FW-устройства). Как только initrd загрузит соотвествующие модули, вручную или с помощью udev'а, он передает управление системе Arch'а и загрузка продолжается. По этой причине initrd должен содержать только те модули, которые необходимы для доступа к корневой файловой системе. Он не должен содержать каждый из модулей, которые вы хотели бы использовать! Большиство модулей, которые вы используете в повседневной работе, будут загружены позже через udev в течение init-процесса. <br />
<br />
* '''modprobe.conf''' используется для применения особых настроек к некоторым модулям ядра.<br />
<br />
=====/etc/resolv.conf (для статического IP)=====<br />
''Преобразователь адресов'' это набор стандартных действий в библиотеке "C" который предоставляет доступ к Internet Domain Name System (DNS). Одна из основных функций DNS - переводить текстовые URL в ip-адреса чтобы сервер понял, с какой именно машиной в Интернете/Локальной сети вы желаете установить соединение. Конфигурационный файл /etc/resolv.conf содержит информация, которая считывается преобразователем адресов во время первого вызова процессом. <br />
<br />
*''Если вы используете DHCP, вы можете спокойно игнорировать этот файл, поскольку он динамически создается и уничтожается демоном dhcpcd. Вы можете изменить этот порядок действий, установленный по умолчанию, если желаете. (Смотрите [[Network]]).''<br />
<br />
Если вы используете статический IP, задайте ваши DNS-сервера в /etc/resolv.conf (nameserver <ip-адрес>). Можете задать их сколько вам угодно, к примеру:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
Если вы используете роутер, вы, возможно, хотите задать ваши DNS-сервера в самом роутере , и просто указать на него в '''/etc/resolv.conf''', используя IP вашего роутера (который, кстати, также является вашим шлюзом в '''/etc/rc.conf'''), например:<br />
nameserver 192.168.1.1<br />
<br />
Если используется '''DHCP''', вы можете также задать ваши DNS сервера в роутере, или использовать автоматическую настройку вашим ISP (провайдером), если ваш провайдер это позволяет.<br />
<br />
=====/etc/hosts=====<br />
<br />
Этот файл создает соотвествия между IP адресами, сетевыми именами машин (hostnames) и их псевдонимами, по одному IP на строчку. Для каждого компьютера каждая одиночная линия должна содержать следующие данные:<br />
<IP-адрес> <сетевое имя компьютера> [псевдоним...]<br />
Добавьте ваше ''сетевое имя'', совпадающее с тем, что вы задали в /etc/rc.conf, так же как и псевдом, чтобы все выглядело примерно так:<br />
127.0.0.1 localhost.localdomain localhost '''''VasyaPupkin-Zade'''''<br />
{{Box Note |''Учтите, что все данные, что вы ввели, '''включая 'localhost'''', требуют программной совместимости! Слишком длинные имена, имена с нестандартными символами могут не поддерживаться некоторыми системами. Это может привести к падению производительности сети, замедленной работе/неработаспособности некоторых программ. Это крайне распространенная ошибка среди новичков.''}}<br />
<br />
Если вы используете статический IP, добавьте еще одну линию, используя синтаксис: <статический-IP> <hostname.domainname.org> <hostname> к примеру:<br />
192.168.1.100 '''''Сетевое имя вашего компьютера'''''.domain.org '''''Сетевое имя вашего компьютера'''''<br />
<br />
*'''Подсказка''': Для удобства вы также можете использовать псевдонимы /etc/hosts для компьютеров в вашей локальной сети и/или в Интернете, к примеру:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 mp3<br />
192.168.1.88 megaporn<br />
Эта простая махинация с применением черной магии позволит вам загружать google, просто введя 'g' в вашем браузере, а также соединятся с mp3 и порносерверами в вашей локальной сети, просто вводя их имена (вами и заданные), а не набирая каждый раз их IP-адреса (как часто бывает).<br />
<br />
=====/etc/hosts.deny и /etc/hosts.allow=====<br />
Изменяйте это конфигурационные файлы под свои нужды, если вы планируете использовать [[SSH|ssh]] демона. Стандартная конфигурация будет отвергать все входящие соединения (не только SSH-соединения). Отредактируйте файл '''/etc/hosts.allow '''и добавьте: <br />
sshd:all <br />
Это разрешит все входящие ssh соединения.<br />
<br />
Если же [[SSH|ssh]] демон вы не планируете использовать, не трогайте этот файл (он должен быть пустой) для повышения безопасности.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
Команда '''locale-gen''' считывает из '''/etc/locale.gen''' данные для создания определенной локали. Далее она может быть использована '''glibc''' или любой другой программой или библиотекуой, использующей локаль для рендеринга "специфического" текста, корректного отображения местных денежных знаков, формата даты и времени, алфавитных спецсимволов, и других локально-определяемых стандартов. Возможность установить стандартную локаль является огромным преимуществом <code>UNIX</code>-ообразных операционных систем.<br />
<br />
По умолчанию /etc/locale.gen является пустым файлом с закомментированной документаций. Однажды будучи отредактированным, файл больше в изменениях не нуждается. '''locale-gen''' запускается при каждом обновлении '''glibc''', создавая все заданные локали в /etc/locale.gen.<br />
<br />
Выбере локаль(локали), которые вам нужны, убрав символ # перед соотвествующей строчкой. К примеру:<br />
ru_RU.UTF-8 UTF-8 <br />
<br />
Инсталлятор запустит специальный скрипт генерации локали, который сгенерирует те, которые вы задали. Вы сможете сменить свою локаль, отредактировав /etc/locale.gen и запустив 'locale-gen' под root'ом.<br />
<br />
{{Box Note |'''''Если вы не задали локаль, это приведет к ошибке: "The current locale is invalid...". Это одна из самых распространненых ошибок пользователей ArchLinux и плодит дофига просьб о помощи на форумах. Читайте мануалы!'''''}}<br />
<br />
=====Пароль root'а=====<br />
Наконец, установите пароль суперпользователя (root'а) и, прошу ваш, НЕ ЗАБУДЬТЕ ЕГО! Вернитесь в главное меню и продолжите инталляцию bootloader'а.<br />
<br />
=====Зеркало для Pacman'а=====<br />
Выберите зеркало репозитория для '''pacman'''. <br />
*''archlinux.org ограничен по скорости - не более 50KB/s. Используйте yandex'овский репозиторий!'' <br />
<br />
Вернитесь в главное меню.<br />
<br />
===Установка загрузчика===<br />
Поскольку в нашем примере второй операционной системы на компьютере нет, нам понадобится Загрузчик. [http://www.gnu.org/software/grub/ GNU GRUB] является рекомендованным загрузчиком. Как вариант, вы можете использовать [http://lilo.go.dyndns.org/ LILO].<br />
<br />
===GRUB===<br />
Сгенерированная установщиком конфигурация '''GRUB''' в файле ('''/boot/grub/menu.lst''') должна быть вполне корректной и в общем случае в изменениях не нуждается. Только одну вещь вы можете пожелать настроить: разрешение экрана в консоли. Для этого достаточно добавить vga=<number> в строку kernel (таблица разрешений и соответствующих значений находится в самом файле menu.lst).<br />
<br />
Пример: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Трактовка:<br />
<br />
Строка 1: '''title''': Пункт выбора в меню GR�UB. В нашем примере "Arch Linux (Main)" появится на экране загрузчика в момент выбора.<br />
<br />
Line 2: '''root''': Корневая директория GRUB; Диск и раздел, где располагается ядро (/boot). '''НЕ ОБЯЗАТЕЛЬНО располагать его в корневой директории файловой системы''' (/) - он может располагаться вообще на отдельном разделе жесткого диска. Схема нумерации GRUB начинается с нуля (0), и используется по формату hd''x,x'' независимо от типа диска (IDE, SATA), заключенному в круглые скобки.<br />
<br />
В примере видно, что /boot находится на первом разделе первого диска или (hd0,0).<br />
<br />
Строчка 3: '''kernel''': Строка определяет:<br />
<br />
* Путь и имя файла ядра '''''относительно расположения GRUB''''' (в пределах раздела, содержащего ядро). <br />
<br />
К примеру, /boot это просто каталог, находящийся на одном разделе с / ,а '''vmlinuz26''' (имя файла ядра) будет в '''/boot/vmlinuz26'''. ''Если /boot находится на отдельном разделе, путь и имя файла будут просто '''/vmlinuz26''', относительно корневой директории '''GRUB'''<br />
<br />
* Root= определяет раздел, содержащий корневую директорию (/) загружаемой системы (точнее раздел, содержащий '''/sbin/init'''), ''соответственно схеме нумерации UUID'' как указано в 2008-04rc, в которой используется формат /dev/disk/by-uuid/xxxx-xxxx-xxxx. <br />
<br />
* Опции ядра. <br />
<br />
К примеру, '''ro''' монтирует файловую систему с параметром "только для чтения" во время загрузки, а '''"vga=773"''' выведет фреймбуфер с разрешением 1024x768 и глубиной цвета, равной 256.<br />
<br />
Строка 4: '''initrd''': (Для загрузочного RAM диска) Путь и имя файла для загрузочного образа '''относительно корневой директории GRUB''' (в пределах раздела, содержащего ядро). Опять таки, к примеру, /boot - это просто директория, расположенная на одном разделе с / и '''kernel26.img''' является именем файла initrd; тогда путь такой: '''/boot/kernel26.img'''. ''Если /boot была бы на отдельном разделе, путь и имя файла были бы просто '''/kernel26.img''', будучи относительными к корневой директории '''GRUB'''.''<br />
<br />
Установите загрузчик '''GRUB''' в главную загрузочную запись (MBR), в нашем примере sda.<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====Прелесть Arch'овой Rolling-release'ной модели=====<br />
Запомните, что Arch это дистрибутив с '''rolling release''' моделью. Это значит, что у вас никогда не возникнет причин для переустановки или or или разбираться в очередном релизе для обновления вашей системы. Просто переодически используйте '''pacman -Syu''' и ваша система будет всегда свежа, обновлена (и хорошо пахнуть :). После данного обновления все компоненты вашей системы будут иметь текущие версии.<br />
Если было также обновлено и ядро, перезагрузитесь (команда reboot).<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Добавление пользователей и установка групп===<br />
Вам не стоит (совсем-совсем не стоит) всё делать под root'ом. Это вообще является моветоном; это опасно, в конце-концов! Root - это для задач администрирования, настройки. Так что добавьте обычного смертного пользователя:<br />
adduser<br />
В то время как большинство опций по умолчанию вам подойдут, вы можете возжелать добавить такие группы как storage, audio, video, optical, и wheel в список дополнительных групп - особенно, если Вы планируете иметь полнофункциональный интерфейс компьютера. <br />
<br />
Нижеследующие группы задаются в /etc/group. <br />
<br />
Они включают:<br />
<br />
*'''audio''' - для задач, использующих звуковую карту и подобные устройства<br />
<br />
*'''wheel''' - для использования sudo<br />
<br />
*'''storage''' - для управления накопителями данных<br />
<br />
*'''video''' - для задач, связанных с видео и 3d-ускорением<br />
<br />
*'''optical''' - для управления задачами, которые используют оптические носители<br />
<br />
*'''floppy''' - для доступа к floppy, если таковой имеется<br />
<br />
*'''lp''' - для управления задачами печати<br />
<br />
Смотрите статью [[Groups]], чтобы понять, какие группы для чего нужны. <br />
<br />
Посмотрите страницы 'man''а на тему usermod и gpasswd для получения дополнительной информации.<br />
=====Установка и найстрока Sudo=====<br />
<br />
Смотри [[Sudo]]<br />
<br />
==Часть II: Ставим X и настраиваем ALSA==<br />
<br />
<br />
===Настройка звуковой карты с помощью alsamixer===<br />
Advanced Linux Sound Architecture (известная под акронимом '''ALSA''') это компонент ядра систему Linux, призванный заменить Open Sound System (OSS) представляющий драйвера для звуковых карт. Кроме драйверов, '''ALSA''' так же предоставляет библиотеки для разработчиков, которые хотят использовать возможности драйвера на более высоком уровне API, нежели прямое взаимодействие с драйверами ядра.<br />
-----<br />
{{Box Note|udev автоматически проверит ваше устройство во время загрузки, загрузив соотвествующий драйвер для вашей звуковой карты. Ваша аудиосистема, скорее всего, уже работает, но по умолчанию звук отключен (mute).}} <br />
Пакет утилит alsa содержит alsamixer, который позволяет настраивать звук прямо из консоли. (Вы сможете загружать aslamixer также из окружения '''X''' несколько позже.)<br />
<br />
Установка пакета утилит alsa:<br />
pacman -S alsa-utils<br />
Вы добавили-то обычного пользователя в группу audio? Если нет, то сейчас самое время! Под root'ом выполните:<br />
gpasswd -a yourusername audio<br />
Завершите сеанс (exit) и снова войдите под обычным пользователем, дабы удостоверится, что группа audio загрузилась верно.<br />
<br />
Под '''''простым, не root'овым''''' пользователем, выполните: <br />
'''[root@myhost ~]#''' alsamixer<br />
Включите каналы MASTER и PCM, подведя к ним курсор стрелочками лево/право и нажатием английской '''M'''. Увеличьте громкость клавишей "вверх" (70-90% должно быть в самый раз). Закройте микшер нажатием ESC.<br />
<br />
==== Проверка звука ====<br />
Проверьте настройку вашей аудиокарты коммандой aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
Вы услышите чарующий, манящий, жаркий и нежный, искрящийся всеми цветами радуги и клубящийся утренним туманом на горе Фудзи в лучах восходящего солнца, женский голос, прозносящий: "Front, center."<br />
<br />
Теперь залогинтесь под root'ом и выполните комманду alsactl:<br />
alsactl store<br />
Это приведет к созданию '/etc/asound.state', сохраняя найстроки asla-микшера.<br />
<br />
Также, добавте ''daemon'' alsa в вашу DAEMONS-секцию (демоническая секция, а-а-а!) в /etc/rc.conf дабы настройки микшера восстанавливались при каждой загрузке автоматически.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Учтите, что демон alsa'ы просто восстанавливает уровни громкости микшера при загрузки путем чтения /etc/asound.state. Это происходит независимо от аудио-библиотеки alsa (и уровня громкости API ядра).''<br />
<br />
Дополнительную информацию можно найти в wiki-записи [[ALSA]].<br />
<br />
===Устанавливаем и настраиваем X-ы===<br />
О, великие '''X''' Window System (обычно '''X11''', или '''X''', или просто '''Иксы''') это сетевой и экранный протокол, который поддерживает оконную систему на bitmap-дисплеях. Иксы предоставляют арсенал утилит и протокол для создания Графического Интефейса Пользователя (GUI) на <code>UNIX</code>'овых операционных системах.<br />
<br />
'''X''' представляет базовый фреймворк, на примитивах, для создания GUI'овых сред: отрисовка и перемещение окон по экрану и взаимодействие с мышкой/клавиатурой. '''X''' не предоставляет пользовательский интерфейс — это поддерживает индивидуальная клиент-программа. <br />
<br />
'''X''' так назван, поскольку им предшествовала '''W''' Window System, разработанна в Стендфорском Университете. <br />
-----<br />
<br />
{{Box Note| Если вы планировали использовать '''open-source''' видео-драйвер, и если вам нужно 3d-ускорение, рекомендуется инсталлировать библиотеку libgl перед установкой Xorg:}}<br />
pacman -S libgl<br />
''(Частные видеодрайверы обеспечивают свои собственные реализации этой библиотеки)''<br />
----- <br />
Теперь мы установим основные пакеты Xorg, используя pacman. Это - первый шаг в построении GUI.<br />
<br />
pacman -S xorg<br />
3d-утилиты, такие как glxgears включены пакет '''mesa''':<br />
pacman -S mesa<br />
<br />
Теперь у нас есть основные пакеты, в которых мы нуждаемся для того, чтобы запустить '''X''' Server. Сейчас вы должны добавить драйвер для своей видеокарты (к примеру xf86-video-<имя>). Самый простой способ конфигурировать X.org, устанавливая корретные пакеты драйвера сначала, а затем генерируя /etc/X11/xorg.conf испольуя скрипт автоконфигурации, такой как Xorg - configure.<br />
<br />
Если вы хотите увидеть весь список '''open-source''' видеодрайверов, используйте: <br />
pacman -Ss xf86-video | less<br />
Вам нужно знать, какой видеочипсет на вашем компьютере. Если вы не знаете, выполните:<br />
lspci | grep VGA<br />
Здесь приведен список '''open source''' драйверов и соотвествующих графических чипсетов..<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Отмечу, что '''vesa''' драйвера являются самыми универсальными, и будут работать почти со всеми современными графическими чипсетами. Если вы не смогли найти подходящий драйвер, то уж vesa '''должна''' работать.<br />
<br />
*Если у Вас есть NVIDIA или видеоадаптер ATI, Вы можете установить проприетарных NVIDIA или ATI драйвер. '''Установка проприетарных видеодрайверов освещена в [[#Использование проприетарных графических драйверов (NVIDIA, ATI)|чуть ниже]].'''<br />
<br />
Используйте pacman для инсталляции подходящего видеодрайвера для вашей видеокарты:<br />
pacman -S xf86-video-savage<br />
(для драйвера от Savage)<br />
<br />
==Создание /etc/X11/xorg.conf==<br />
=====Что такое /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf это главный конфигурационный файл вашей '''X''' Window System, основа основ вашего '''G'''raphical '''U'''ser '''I'''nterface. Это текстовой файл, разбитый на секции и подсекции. Важными являются секции ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, и ServerLayout''. Секции могут располагаться в любом порядке, может быть несколько секций одного типа, к примеру, если у вас более одного монитора или если у вашего ноутбука кроме мышки есть еще и тачпад. <br />
------<br />
По умолчанию, у вас не будет конфигурационного xorg-файла. В последних версиях xorg он не нужен, ''если'' автоопределение ''работает нормально'' и вам не нужно вручную включать такие штуки, как aiglx и тому подобное. <br />
<br />
''Большинство людей считают, что им все равно необходимо сгенерировать этот файл.''<br />
<br />
<br />
Опытные пользователи обычно желают вручную сгенерировать свой собственный xorg.conf. Вы так же можете использовать скрипт Xorg -configure для базовой конфигурации. Под root'ом исполните:<br />
Xorg -configure<br />
Будет создан конфиг-файл в /root/xorg.conf.new <br />
<br />
Для теста сервера, введите:<br />
X -config /root/xorg.conf.new<br />
'''X''' запустится. Вы получите на экране бело-черный мышиный курсор в виде буквы '''X''', который будет откликаться на движение мышки/тачпада. Используйте CTRL-Alt-Backspace дабы покинуть '''X'''.<br />
<br />
Просмотр вашего конфиг-файла на предмет ошибок:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Убедитесь, что скрипт Xorg -configure корректно определил ваш видеодрайвер. к примеру:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "vesa"<br />
VendorName "VM Ware Inc" #если вы запускаете ArchLinux в эмуляторе VM Ware<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Убедитесь, что горизонтальная синхронизация и вертикальная частота обновления заданы под секцией "Monitor". Если нет, то задайте их:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Подходит для большиства LCD мониторов<br />
VertRefresh 50.0 - 100.0 # Подходит для большинства LCD и CRT мониторов.<br />
EndSection<br />
(Если вы точно не знаете этих настроек, откройте инструкцию от вашего монитора.)<br />
<br />
Задайте глубину цвета под секцией "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Значит, что мы установили 24битный цвет, что соотвествует true color (миллионы цветов)<br />
<br />
Также, добавьте желаемые режимы в подсекцию "Display" , в конце, под Depth 24 , к примеру:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Добавьте следующий раздел, если Вы желаете включить eye candy, который требует дополнительного расширения: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Испытайте ваш конфиг снова, после изменения:<br />
X -config /root/xorg.conf.new<br />
Убедитесь, что сессия '''X''' открылась без ошибок и переместите сгенерированный конфиг-файл в /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Подробные инструкции смотрите в статье [[Xorg]].<br />
<br />
====Алтернативный способ генерации xorg.conf====<br />
Если Xorg -configure не может сгенерировать работоспособный xorg.conf, вы можете использовать инструмент hwd. Установите его командой:<br />
pacman -S hwd<br />
И запустите:<br />
hwd -xa <br />
Наконец, вы можете выбрать xorgconfig, который расспросит вас о всех ваших устройствах и сгенерирует xorg.conf:<br />
xorgconfig<br />
Смотрите далее '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Использование частных графических драйверов (NVIDIA, ATI)===<br />
Вы можете использовать частные дрова от NVIDIA и ATI. <br />
====Графические карты от NVIDIA====<br />
Предполагается, что драйвера от NVIDIA будут, несомненно, высокого качества, предлагают быстродействующий 3D, в то время как open source драйвер '''nv''' может предложить в данное время лишь поддержку 2d. <br />
<br />
Перед тем, как ставить какой-то из драйверов, нужно понять, какой именно вам подходит. В ArchLinux есть три пакета драйверов - каждый для своего набора видеокарточек: <br />
<br />
'''1. nvidia-71xx''' ''для самых старых карт типа TNT и TNT2''<br />
<br />
'''2. nvidia-96xx''' ''для более новых карт - вплоть до GF 4''<br />
<br />
'''3. nvidia''' ''новейшие чипсеты, новее GF 4''<br />
<br />
Загляните на страницу NVIDIA чтобы выяснить, какая именно у вас карточка. Разница будет только в процессе исталляции; Настройки же едины для всех драйверов.<br />
<br />
Выберите и установите подходящий драйвер ''для вашей карточки'', к примеру: <br />
pacman -S nvidia<br />
<br />
В пакете NVIDIA есть специальная утилита для коррекции файла /etc/X11/xorg.conf под использование драйверов от NVIDIA:<br />
nvidia-xconfig<br />
<br />
Также тут есть несколько опций, которые помогают лучше настроить xorg.conf.<br />
Например,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
Для более подробной информации гляньте в nvidia-xconfig(1).<br />
<br />
Самые полезные опции в секции оборудования (учтите, что некоторые из них могут не работать на вашей системе):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Убедитесь, что все копии DRI закомментированы:<br />
# Load "dri"<br />
Проверьте и перепроверьте /etc/X11/xorg.conf чтобы убедится, что вы выставили корректную глубину цвета, частоту горизонтальной синхронизации и вертикальной развертки, а так же корректные возможные разрешения экрана.<br />
<br />
Обновите зависимости ядра:<br />
depmod -a<br />
(у меня почему-то эта фишка вообще не заработала, по сему я просто ввел reboot)<br />
<br />
Дополнительные инструкции по танцам с бубном приводятся в статье [[NVIDIA]].<br />
<br />
Смотрите далее '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====Графические карты ATI====<br />
Владельцы ATI имеют две опции драйвера. Если вы не уверены в том, какой драйвер использовать, попробуйте сначала opensource. Он покрывает большинство среднестатистических потребностей среднестатистических же пользователей; плюс с ним меньше проблем.<br />
<br />
Установите '''частный''' драйвер ATI с помощью<br />
pacman -S catalyst<br />
Используйте инструмент aticonfig для настройки xorg.conf.<br />
<br />
Установите '''open-source''''овый драйвер ATI:<br />
pacman -S xf86-video-ati<br />
На данный момент производительность opensource'ового драйвера, конечно, несравнима с частным драйвером. Также, в нем нет поддержки TV-out, dual-link DVI, и, возможно, еще ряда функций. Зато он поддерживает Aiglx и имеет лучшую поддержку dual-head support.<br />
{{Box Note| В последний версиях частного драйвера он уже поддерживает [[AIGLX]]. Для использования [[Compiz]] или [[Beryl]] добавьте опцию "AIGLX" "True" в секцию ServerFlags и опцию "Composite" "True" в секцию Extensions.}}<br />
Дополнительные инструкции по конфигурации ATI могут быть найдены в [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Рекомендуется установить пакет gnome-utils, в котором в частности содержится пакет, позволяющий делать скриншоты нажатием клавиши Print Screen :<br />
pacman -S gnome-utils<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Демон gdm автоматически загружает графическую среду. Если вы попробуете её покинуть, используя ctrl+alt+backspace, он снова её загрузит. Если в этого не хотите, а хотите загружать граф.среду вручную, то ставьте в файле rc.conf перед именем этого демона (gdm) восклицательный знак (!). <br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Мультимедия ==<br />
<br />
<br />
===Видео плеер===<br />
====VLC====<br />
VLC Player это мультимедиа плеер под Linux (хотя есть и под MacOS и под Windows). Для установки просто наберите:<br />
<br />
pacman -S vlc<br />
<br />
====Mplayer====<br />
MPlayer также мультимедийный плеер для Linux. Исталляция:<br />
<br />
pacman -S mplayer<br />
<br />
В нем также есть plug-in для Mozilla, что позволяет смотреть потоковое видео на web-страницах. Исталляция:<br />
<br />
pacman -S mplayer-plugin<br />
<br />
Если вы используете KDE, KMplayer - лучший выбор. В нем уже встроен plug-in для Konqueror для просмотра поточного видео. Инсталляция:<br />
<br />
pacman -S kmplayer<br />
<br />
====Xine====<br />
<br />
Xine это чудесный плеер, особенно для DVD.<br />
<br />
pacman -S xine-ui<br />
Библиотека libdvdcss умеет декодировать DVD (для шифрованных DVD). ''Убедитесь в легальности использования libdvdcss в вашей стране перед инсталляцией (Буахахахаха!)''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] это официальный кинопроигрыватель для GNOME базирующийся на xine-lib или GStreamer (gstreamer - по дефолту инсталлируется вместе с пакетом arch totem). Он поддерживает плейлисты, полноэкранный режим, поиск и уровень громкости, а также клавиатурную навигацию.<br />
В него встроенна дополнительная функциональность:<br />
<br />
* Установка превьюшек видео для файл-менеджера<br />
* Панель настроек Nautilus <br />
* Epiphany / Mozilla (Firefox)-плагин для просмотра порно (или видео) прямо в вашем браузере <br />
* Webcam-утилита (разрабатывается)<br />
<br />
Totem-xine это лучший выбор, если вы хотите смотреть DVD.<br />
<br />
Totem входит в пакет gnome-extra; а вот плагин Totem для web-браузера - нет.<br />
<br />
Он ставится отдельно:<br />
pacman -S totem<br />
<br />
Для установки браузерного plug-in'а:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine это отличная штука для пользователей KDE (Кед). Для инсталляции введите:<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Прочая информация==<br />
За дополнительной инфорацией обращайтесь к [http://archlinux.org.ru/ Русскоязычному сообществу Arch], а также [http://archlinux.org.ru/forum/ на русскоязычный фоум]. Также по любым вопросам обращайтесь на IRC-канал:<br />
Сервер: irc.freenode.org, канал #archlinux-ru, кодировка UTF-8.<br />
Опытные, добрые, отзывчивые админы всегда окажут вам полное содействие и помощь.<br />
=====FAQ=====<br />
Смотрите [[ЧаВо]]<br />
<br />
<br />
=====Что еще почитать?=====<br />
[http://www.cyber39.ru/os/linux/3716-linux_dlja_nachinajushhikh.html Linux для начинающих.]<br />
<br />
[http://www.cyber39.ru/2008/02/16/setevoe_administrirovanie_linux.html Сетевое администрирование Linux.]<br />
<br />
[http://www.cyber39.ru/2008/02/16/jadro_linux_3e_izd.html Ядро Linux.]<br />
<br />
[http://www.cyber39.ru/os/linux/1204-linux_polnoe_rukovodstvo.html Linux: Полное руководство.]<br />
<br />
[http://www.cyber39.ru/2008/02/13/operacionnaja_sistema_unix_nastolnyjj_spravochnik.html Операционная система UNIX. Настольный справочник.]<br />
<br />
[http://ru.wikibooks.org/wiki/Введение_в_администрирование_UNIX#.D0.92.D0.B2.D0.B5.D0.B4.D0.B5.D0.BD.D0.B8.D0.B5_.D0.B2_.D0.AE.D0.BD.D0.B8.D0.BA.D1.81 Введение в администрирование UNIX.]<br />
<br />
[http://www.cyber39.ru/os/linux/19037-linux_osnovnye_komandy_karmannyjj_spravochnik.html LINUX: Основные комманды. Карманный справочник.]<br />
<br />
[http://www.cyber39.ru/coding/cpp/16946-programmirovanie_na_c_v_linux.html Программирование на C в Linux.]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52961
Beginners' guide (Русский)
2008-11-09T08:46:11Z
<p>Alsvartr: /* Install Packages */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
<br />
====Подготовка жесткого диска====<br />
Выберите первый пункт меню - "Prepare Hard Drive". Вам будет предложено автоматически подготовить ваш жесткий диск к установке Arch Linux, либо вручную переразбить и подготовить разделы.<br />
* 1. Автоматическая подготовка<br />
Установщик сам разобъет ваш жесткий диск на следующие разделы:<br />
* Загрузочный раздел /boot c файловой системой ext2 и размером по умолчанию в 32 мегабайта. Вы сможете изменить это значение. <br />
* Раздел подкачки swap с размером по умолчанию в 256 мегабайтов. Вы также сможете изменить это значение.<br />
* Отдельные разделы для корня / и домашней директории пользователей /home. Размеры вы определяете сами. Также вам будет предоставлен выбор из файловых систем: ext2, ext3, reiserfs, xfs и jfs. Но следует учесть, что оба этих раздела должны быть отформатированы в одинаковой файловой системе.<br />
<br />
Не забывайте - автоматическая подготовка сотрет все данные на вашем жестком диске! Внимательно читайте предупреждение установщика.<br />
<br />
* 2. '''(Рекомендуется)''' Ручная подготовка<br />
<br />
Выберите из списка жесткий диск, на который будет произведена установка (/dev/sd''x'').<br />
<br />
''На этом этапе более опытные пользователи могут сразу перейти к главе о '''[[#Выбор Пакетов|выборе пакетов]]'''.''<br />
<br />
=====Информация о разбивке=====<br />
Разбивка жесткого диска заключается в создании отдельных зон (разделов) на жестком диске. Они будут выглядеть как отдельные диски со своими файловыми системами. Разделы подразделяются на "Главные" (Primary), "Расширенные" (Extended) и "Логические" (Logical).<br />
<br />
'''Главные''' разделы могут быть загрузочными и их количество ограничено четырьмя. Больше четырех главных разделов создать нельзя и нужно использовать '''Расширенные''' разделы, которые будут содержать '''Логические'''.<br />
<br />
Расширенные разделы не могут быть использованы сами по себе - они всего лишь "контейнеры" для логических. Жесткий диск может содержать только один расширенный раздел, который может быть разделен на логические.<br />
<br />
Во время разбивки диска можно заметить схему нумерации разделов. Главные получают названия sda1-3, расширенный раздел - sda4, а логические, соответственно, sda5, sda6 и т.д.<br />
<br />
=====Раздел Подкачки (swap)=====<br />
Данный раздел является чем-то вроде "виртуального ОЗУ". На нем хранятся данные, которые не умещаются, либо не подходят для хранения в оперативной памяти.<br />
<br />
Исторически сложилось, что размер раздела подкачки определяется по схеме 2ХОЗУ. То есть, двойной объем оперативной памяти. Затем, с развитием компьютерной техники, данное правило не всегда стало являться необходимым. На компьютере с 512 мегабайтами памяти правило 2Х все еще действует эффективно. Однако, на машинах с 1 гигабайтом памяти обычно наиболее эффективна схема 1ХОЗУ. Если размер вашего ОЗУ больше или равен 1 гигабайту, то можно вообще обойтись без раздела подкачки, однако это не рекомендуется. Мы создадим раздел размером в 1 гигабайт в нашем примере.<br />
<br />
{{Box Note|Если вы планируете использовать технологии suspend-to-disk или hibernate, то размер раздела подкачки, по меньшей мере, должен соответствовать размеру вашей оперативной памяти. Но рекомендуется задать размер хотя бы на 15% больший, чтобы учесть появление испорченных секторов на диске (bad sectors).}}<br />
=====Схема Разбивки=====<br />
Схема разбивки разделов довольно индивидуальна и во многом зависит от предпочтений и нужд конкретного пользователя. Но, как минимум, вам нужны два раздела: один для корня ( / ), второй для раздела подкачки (swap). Однако, вы можете захотеть иметь отдельные разделы для /boot (на нем обычно находится ядро Linux), /var и /home (пользовательская директория). Обычно иметь два раздела отдельно для корня ( / ) и отдельно для /home считается хорошей практикой и более удобным и безопасным решением.<br />
В нашем примере мы создадим три отдельных раздела: для корня, для /home и один раздел подкачки swap.<br />
<br />
=====cfdisk===== <br />
Итак, начнем с создания главного раздела, содержащего корневую файловую систему.<br />
<br />
Для создания нового раздела выберите пункт '''N'''ew, затем Primary. Далее задайте желаемый размер раздела (что-то между 4 и 12 гигабайт будет хорошим выбором). Выберите только что созданный раздел и сделайте его загрузочным, выбрав пункт '''B'''ootable.<br />
<br />
Также выберите пункт '''T'''ype и задайте значение '83 Linux'. Нашему разделу должно присвоиться имя sda1.<br />
<br />
Затем создадим раздел подкачки. Задайте размер между 512 мегабайт и 1 гигабайтом, выберите '''T'''ype - 82 (Linux swap / Solaris). Наш раздел должен быть теперь виден как sda2.<br />
<br />
Теперь еще один раздел для /home. Выберите главный раздел и установите желаемый размер в зависимости от того, что пользователи вашего компьютера будут хранить в своих персональных директориях. Также, как и для корня, задайте '''T'''ype - 83 Linux. Данный раздел появится как sda3.<br />
<br />
<br />
<br />
Вот как должна выглядеть наша таблица разделов (размеры могут отличаться):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Выберите '''W'''rite и нажмите ''''yes''''. Или нажмите '''Q'''uit для выхода из программы разбивки.<br />
<br />
<br />
=====Мои IDE-диски выглядят как SCSI, почему?=====<br />
В последних версиях ядра Linux все диски (IDE, SATA, SCSI) именуются как sd''x''. Пусть это вас не волнует, это нормально.<br />
<br />
====Назначение точек монтирования====<br />
Во-первых, выберите нужный раздел под раздел подкачки (в нашем примере это sda3). Во-вторых, выберите раздел для монтирования корневой ФС (sda1 в нашем примере). Вам будет предложено выбрать желаемую файловую систему.<br />
<br />
=====Файловые системы=====<br />
<br />
Выбор файловой системы достаточно субъективен. Каждая из предложенных ФС имеет свои достоинства и недостатки, всё зависит целиком от ваших предпочтений. Далее мы кратко рассмотрим поддерживаемые ФС:<br />
<br />
1. '''[http://ru.wikipedia.org/wiki/Ext2 ext2]''' - старая и надежная файловая система для ОС GNU/Linux. Очень стабильна, но без поддержки журналирования - это значит, что в случае аппаратных сбоев или перепадов напряжения ваша информация может пострадать. Не слишком хороший выбор для корневого и /home разделов. Данная ФС может быть легко преобразована в ext3.<br />
<br />
2. '''[http://ru.wikipedia.org/wiki/Ext2 ext3]''' - наследница ext2, но с поддержкой журналирования. Она полностью совместима с ext2. Однако, по некоторым тестам немного медленнее, нежели остальные ФС. Тем не менее, очень стабильна и активно используется, поддерживается и разрабатывается сообществом GNU/Linux.<br />
<br />
3. '''[http://ru.wikipedia.org/wiki/ReiserFS ReiserFS]''' - высокопроизводительная файловая система, разработанная Гансом Райзером. Считается очень быстрой, особенно при операциях с файлами маленького размера, однако сравнительно медленно монтируется. Вполне готова к использованию и стабильна. Однако, не слишком активно разрабатывается на данный момент (все силы отданы Reiser4).<br />
<br />
4. '''[http://ru.wikipedia.org/wiki/ReiserFS JFS]''' - '''J'''ournaled '''F'''ile'''S'''ystem, файловая система от IBM. Использует наименьшее количество ресурсов центрального процессора, нежели остальные ФС. Очень быстра в монтировании и использовании. Однако, не так широко используется, как ext или ReiserFS.<br />
<br />
5. '''[http://ru.wikipedia.org/wiki/ReiserFS XFS]''' - журналируемая ФС, которая показывает наибольшую скорость при операциях с большими файлами. Хороший выбор для разделов с большим их количеством.<br />
<br />
Наиболее значимое отличие между ними - журналирование. Все, кроме ext2, его поддерживают, однако техника журналирования не у всех одинакова. Только ext3 поддерживает хранение в журнале данных и мета-данных (информация о директориях). Это значит, что только она в случае сбоя сможет восстановить полностью в точной мере ту информационную структуру, которая была до сбоя.<br />
<br />
Выберите и создайте ФС для корня. Далее вам будет предложено создать дополнительные разделы. В нашем примере, нам понадобится создать еще sda2. Выберите файловую систему и примонтируйте ее как /home. Нажмите Done и возвращайтесь в главное меню установщика.<br />
<br />
===Выбор пакетов===<br />
На данном этапе вам предстоит выбрать пакеты, которые будут установлены на вашу систему.<br />
* Установка из Core ISO: выберите подходящее устройство CD-ROM из списка.<br />
* Установка из FTP ISO: выберите FTP/HTTP-зеркало для получения пакетов.<br />
<br />
Процесс выбора пакетов разбит на две стадии: выбор категорий пакетов, а затем - выбор отдельных пакетов в этих категориях. С помощью клавиши пробела вы можете устанавливать и снимать выделение пакетов и категорий. Ниже приведен список категорий пакетов с объяснениями:<br />
<br />
* '''BASE:''' содержит только базовые, необходимые системные пакеты. Минимальный набор для базовой системы.<br />
*'''SUPPORT:''' здесь находятся дополнительные пакеты для работы с сетью и файловыми системами. Например, такие как gpm, fuse, dnsutils, ndiswrapper, ntfs-3g, драйвера для wi-fi адаптеров и т.п.<br />
*'''DEVEL:''' пакеты для сборки программ. То есть, GCC, autoconf, automake, make и т.п.<br />
*'''LIB:''' различные системные библиотеки - gmp, libelf, libevent и т.п.<br />
<br />
Нажмите OK и далее выберите опцию 'yes', когда вам будет предложено выбрать все пакеты по умолчанию ('Select all packages by default').<br />
<br />
Далее вам будет показан список пакетов в выбранных категориях. Для новичка будет лучшим выбором оставить всё как есть. Тогда как более опытные пользователи могут убрать ненужные им пакеты из данного списка.<br />
<br />
===Установка пакетов===<br />
Теперь выберите пункт 'Install Packages', чтобы начать установку пакетов. Вам будет предложено сохранить загруженные из источника установки пакеты в системном кэше. Это хороший выбор, который может очень вам помочь, если какой-либо новый установленный пакет будет работать не так, как надо. Тогда можно просто восстановить старую версию из кэша. Помните, что вы всегда можете очистить ваш кэш вручную при необходимости.<br />
Установщик произведет установку выбранных вами пакетов и ядра Arch Linux в вашу новую систему.<br />
<br />
*FTP ISO: менеджер пакетов [[Pacman_(Русский)|Pacman]] установит пакеты с сетевого зеркала (прогресс вы можете наблюдать на vc5, а чтобы вернуться назад к установщику - перейдите на vc1).<br />
*CORE ISO: пакеты будут установлены с оптического диска.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52959
Beginners' guide (Русский)
2008-11-09T08:32:55Z
<p>Alsvartr: /* Select Packages */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
<br />
====Подготовка жесткого диска====<br />
Выберите первый пункт меню - "Prepare Hard Drive". Вам будет предложено автоматически подготовить ваш жесткий диск к установке Arch Linux, либо вручную переразбить и подготовить разделы.<br />
* 1. Автоматическая подготовка<br />
Установщик сам разобъет ваш жесткий диск на следующие разделы:<br />
* Загрузочный раздел /boot c файловой системой ext2 и размером по умолчанию в 32 мегабайта. Вы сможете изменить это значение. <br />
* Раздел подкачки swap с размером по умолчанию в 256 мегабайтов. Вы также сможете изменить это значение.<br />
* Отдельные разделы для корня / и домашней директории пользователей /home. Размеры вы определяете сами. Также вам будет предоставлен выбор из файловых систем: ext2, ext3, reiserfs, xfs и jfs. Но следует учесть, что оба этих раздела должны быть отформатированы в одинаковой файловой системе.<br />
<br />
Не забывайте - автоматическая подготовка сотрет все данные на вашем жестком диске! Внимательно читайте предупреждение установщика.<br />
<br />
* 2. '''(Рекомендуется)''' Ручная подготовка<br />
<br />
Выберите из списка жесткий диск, на который будет произведена установка (/dev/sd''x'').<br />
<br />
''На этом этапе более опытные пользователи могут сразу перейти к главе о '''[[#Выбор Пакетов|выборе пакетов]]'''.''<br />
<br />
=====Информация о разбивке=====<br />
Разбивка жесткого диска заключается в создании отдельных зон (разделов) на жестком диске. Они будут выглядеть как отдельные диски со своими файловыми системами. Разделы подразделяются на "Главные" (Primary), "Расширенные" (Extended) и "Логические" (Logical).<br />
<br />
'''Главные''' разделы могут быть загрузочными и их количество ограничено четырьмя. Больше четырех главных разделов создать нельзя и нужно использовать '''Расширенные''' разделы, которые будут содержать '''Логические'''.<br />
<br />
Расширенные разделы не могут быть использованы сами по себе - они всего лишь "контейнеры" для логических. Жесткий диск может содержать только один расширенный раздел, который может быть разделен на логические.<br />
<br />
Во время разбивки диска можно заметить схему нумерации разделов. Главные получают названия sda1-3, расширенный раздел - sda4, а логические, соответственно, sda5, sda6 и т.д.<br />
<br />
=====Раздел Подкачки (swap)=====<br />
Данный раздел является чем-то вроде "виртуального ОЗУ". На нем хранятся данные, которые не умещаются, либо не подходят для хранения в оперативной памяти.<br />
<br />
Исторически сложилось, что размер раздела подкачки определяется по схеме 2ХОЗУ. То есть, двойной объем оперативной памяти. Затем, с развитием компьютерной техники, данное правило не всегда стало являться необходимым. На компьютере с 512 мегабайтами памяти правило 2Х все еще действует эффективно. Однако, на машинах с 1 гигабайтом памяти обычно наиболее эффективна схема 1ХОЗУ. Если размер вашего ОЗУ больше или равен 1 гигабайту, то можно вообще обойтись без раздела подкачки, однако это не рекомендуется. Мы создадим раздел размером в 1 гигабайт в нашем примере.<br />
<br />
{{Box Note|Если вы планируете использовать технологии suspend-to-disk или hibernate, то размер раздела подкачки, по меньшей мере, должен соответствовать размеру вашей оперативной памяти. Но рекомендуется задать размер хотя бы на 15% больший, чтобы учесть появление испорченных секторов на диске (bad sectors).}}<br />
=====Схема Разбивки=====<br />
Схема разбивки разделов довольно индивидуальна и во многом зависит от предпочтений и нужд конкретного пользователя. Но, как минимум, вам нужны два раздела: один для корня ( / ), второй для раздела подкачки (swap). Однако, вы можете захотеть иметь отдельные разделы для /boot (на нем обычно находится ядро Linux), /var и /home (пользовательская директория). Обычно иметь два раздела отдельно для корня ( / ) и отдельно для /home считается хорошей практикой и более удобным и безопасным решением.<br />
В нашем примере мы создадим три отдельных раздела: для корня, для /home и один раздел подкачки swap.<br />
<br />
=====cfdisk===== <br />
Итак, начнем с создания главного раздела, содержащего корневую файловую систему.<br />
<br />
Для создания нового раздела выберите пункт '''N'''ew, затем Primary. Далее задайте желаемый размер раздела (что-то между 4 и 12 гигабайт будет хорошим выбором). Выберите только что созданный раздел и сделайте его загрузочным, выбрав пункт '''B'''ootable.<br />
<br />
Также выберите пункт '''T'''ype и задайте значение '83 Linux'. Нашему разделу должно присвоиться имя sda1.<br />
<br />
Затем создадим раздел подкачки. Задайте размер между 512 мегабайт и 1 гигабайтом, выберите '''T'''ype - 82 (Linux swap / Solaris). Наш раздел должен быть теперь виден как sda2.<br />
<br />
Теперь еще один раздел для /home. Выберите главный раздел и установите желаемый размер в зависимости от того, что пользователи вашего компьютера будут хранить в своих персональных директориях. Также, как и для корня, задайте '''T'''ype - 83 Linux. Данный раздел появится как sda3.<br />
<br />
<br />
<br />
Вот как должна выглядеть наша таблица разделов (размеры могут отличаться):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Выберите '''W'''rite и нажмите ''''yes''''. Или нажмите '''Q'''uit для выхода из программы разбивки.<br />
<br />
<br />
=====Мои IDE-диски выглядят как SCSI, почему?=====<br />
В последних версиях ядра Linux все диски (IDE, SATA, SCSI) именуются как sd''x''. Пусть это вас не волнует, это нормально.<br />
<br />
====Назначение точек монтирования====<br />
Во-первых, выберите нужный раздел под раздел подкачки (в нашем примере это sda3). Во-вторых, выберите раздел для монтирования корневой ФС (sda1 в нашем примере). Вам будет предложено выбрать желаемую файловую систему.<br />
<br />
=====Файловые системы=====<br />
<br />
Выбор файловой системы достаточно субъективен. Каждая из предложенных ФС имеет свои достоинства и недостатки, всё зависит целиком от ваших предпочтений. Далее мы кратко рассмотрим поддерживаемые ФС:<br />
<br />
1. '''[http://ru.wikipedia.org/wiki/Ext2 ext2]''' - старая и надежная файловая система для ОС GNU/Linux. Очень стабильна, но без поддержки журналирования - это значит, что в случае аппаратных сбоев или перепадов напряжения ваша информация может пострадать. Не слишком хороший выбор для корневого и /home разделов. Данная ФС может быть легко преобразована в ext3.<br />
<br />
2. '''[http://ru.wikipedia.org/wiki/Ext2 ext3]''' - наследница ext2, но с поддержкой журналирования. Она полностью совместима с ext2. Однако, по некоторым тестам немного медленнее, нежели остальные ФС. Тем не менее, очень стабильна и активно используется, поддерживается и разрабатывается сообществом GNU/Linux.<br />
<br />
3. '''[http://ru.wikipedia.org/wiki/ReiserFS ReiserFS]''' - высокопроизводительная файловая система, разработанная Гансом Райзером. Считается очень быстрой, особенно при операциях с файлами маленького размера, однако сравнительно медленно монтируется. Вполне готова к использованию и стабильна. Однако, не слишком активно разрабатывается на данный момент (все силы отданы Reiser4).<br />
<br />
4. '''[http://ru.wikipedia.org/wiki/ReiserFS JFS]''' - '''J'''ournaled '''F'''ile'''S'''ystem, файловая система от IBM. Использует наименьшее количество ресурсов центрального процессора, нежели остальные ФС. Очень быстра в монтировании и использовании. Однако, не так широко используется, как ext или ReiserFS.<br />
<br />
5. '''[http://ru.wikipedia.org/wiki/ReiserFS XFS]''' - журналируемая ФС, которая показывает наибольшую скорость при операциях с большими файлами. Хороший выбор для разделов с большим их количеством.<br />
<br />
Наиболее значимое отличие между ними - журналирование. Все, кроме ext2, его поддерживают, однако техника журналирования не у всех одинакова. Только ext3 поддерживает хранение в журнале данных и мета-данных (информация о директориях). Это значит, что только она в случае сбоя сможет восстановить полностью в точной мере ту информационную структуру, которая была до сбоя.<br />
<br />
Выберите и создайте ФС для корня. Далее вам будет предложено создать дополнительные разделы. В нашем примере, нам понадобится создать еще sda2. Выберите файловую систему и примонтируйте ее как /home. Нажмите Done и возвращайтесь в главное меню установщика.<br />
<br />
===Выбор пакетов===<br />
На данном этапе вам предстоит выбрать пакеты, которые будут установлены на вашу систему.<br />
* Установка из Core ISO: выберите подходящее устройство CD-ROM из списка.<br />
* Установка из FTP ISO: выберите FTP/HTTP-зеркало для получения пакетов.<br />
<br />
Процесс выбора пакетов разбит на две стадии: выбор категорий пакетов, а затем - выбор отдельных пакетов в этих категориях. С помощью клавиши пробела вы можете устанавливать и снимать выделение пакетов и категорий. Ниже приведен список категорий пакетов с объяснениями:<br />
<br />
* '''BASE:''' содержит только базовые, необходимые системные пакеты. Минимальный набор для базовой системы.<br />
*'''SUPPORT:''' здесь находятся дополнительные пакеты для работы с сетью и файловыми системами. Например, такие как gpm, fuse, dnsutils, ndiswrapper, ntfs-3g, драйвера для wi-fi адаптеров и т.п.<br />
*'''DEVEL:''' пакеты для сборки программ. То есть, GCC, autoconf, automake, make и т.п.<br />
*'''LIB:''' различные системные библиотеки - gmp, libelf, libevent и т.п.<br />
<br />
Нажмите OK и далее выберите опцию 'yes', когда вам будет предложено выбрать все пакеты по умолчанию ('Select all packages by default').<br />
<br />
Далее вам будет показан список пакетов в выбранных категориях. Для новичка будет лучшим выбором оставить всё как есть. Тогда как более опытные пользователи могут убрать ненужные им пакеты из данного списка.<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Main_page_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52956
Main page (Русский)
2008-11-08T23:33:44Z
<p>Alsvartr: </p>
<hr />
<div>__NOTOC__ __NOEDITSECTION__<br />
{{Navigate_i18n_mainpages}}{{newpagelinksmain}}<br />
<!-- after translation is finished, please contact damir@archlinux.org, thank you! --><br />
=== Arch Linux Wiki ===<br />
Добро пожаловать в [[ArchLinux (Русский)|Arch Linux]] Wiki.<br />
<br />
{{sn|Для начала:<br />
* [[ArchLinux (Русский)|Arch Linux]]<br />
* [[Arch и другие|Arch и Другие]]<br />
* [[ЧаВо|ЧаВо]]<br />
* [[Путь Arch|Путь Arch Linux]]<br />
* [[Руководство для новичков]]<br />
* [[Руководство по ArchWiki]]<br />
}}<br />
==== Новости Wiki ====<br />
Время от времени происходят интересные события, имеющие отношение только к wiki. О них вы можете узнать на странице [[Wiki News|Новости Wiki]].<br />
<br />
==== Что здесь можно увидеть и сделать? ====<br />
Большую часть страниц wiki можно просмотреть с помощью <b> навигационной панели</b> с левой и правой сторон. Сверху находятся <b>панели</b> редактирования и функций. В нижней части вы найдете ссылки на другие сайты об Arch Linux.<br />
<br />
==== How Tos ====<br />
Не получается что-нибудь настроить? Не знаете, где искать решение этой проблемы? <br><br />
Возможно, вам удастся найти что-нибудь полезное в разделе [[:Category:Русские_HowTo|категории:HowTo ]] или в разделе [[:Category:Русский|Русский]]. Пройдитесь по категориям и попробуйте найти нужную информацию. Если ее там нет, попытайтесь воспользоваться строкой поиска под панелью навигации.<br />
<br />
==== Создание своих собственных страниц ====<br />
Чтобы самому редактировать страницы wiki, нужно создать учетную запись. После этого можно поэкспериментировать в [[Sandbox|песочнице]] или на странице пользователя -- это поможет быстрее ознакомиться с языком разметки ArchWiki. Краткий справочник по синтаксису разметки находится в [[:Category:Помощь_по_ArchWiki|категории помощь по Wiki]]. Эта ссылка также есть и в навигационной панели.<br />
<br />
==== Контакты ====<br />
Если у вас есть вопросы и предложения, обращайтесь по адресам, указанным в [[ContactList|списке контактов]].<br />
<br />
[[Category:Русский]]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52955
Beginners' guide (Русский)
2008-11-08T23:26:39Z
<p>Alsvartr: /* Set File system Mountpoints */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
<br />
====Подготовка жесткого диска====<br />
Выберите первый пункт меню - "Prepare Hard Drive". Вам будет предложено автоматически подготовить ваш жесткий диск к установке Arch Linux, либо вручную переразбить и подготовить разделы.<br />
* 1. Автоматическая подготовка<br />
Установщик сам разобъет ваш жесткий диск на следующие разделы:<br />
* Загрузочный раздел /boot c файловой системой ext2 и размером по умолчанию в 32 мегабайта. Вы сможете изменить это значение. <br />
* Раздел подкачки swap с размером по умолчанию в 256 мегабайтов. Вы также сможете изменить это значение.<br />
* Отдельные разделы для корня / и домашней директории пользователей /home. Размеры вы определяете сами. Также вам будет предоставлен выбор из файловых систем: ext2, ext3, reiserfs, xfs и jfs. Но следует учесть, что оба этих раздела должны быть отформатированы в одинаковой файловой системе.<br />
<br />
Не забывайте - автоматическая подготовка сотрет все данные на вашем жестком диске! Внимательно читайте предупреждение установщика.<br />
<br />
* 2. '''(Рекомендуется)''' Ручная подготовка<br />
<br />
Выберите из списка жесткий диск, на который будет произведена установка (/dev/sd''x'').<br />
<br />
''На этом этапе более опытные пользователи могут сразу перейти к главе о '''[[#Выбор Пакетов|выборе пакетов]]'''.''<br />
<br />
=====Информация о разбивке=====<br />
Разбивка жесткого диска заключается в создании отдельных зон (разделов) на жестком диске. Они будут выглядеть как отдельные диски со своими файловыми системами. Разделы подразделяются на "Главные" (Primary), "Расширенные" (Extended) и "Логические" (Logical).<br />
<br />
'''Главные''' разделы могут быть загрузочными и их количество ограничено четырьмя. Больше четырех главных разделов создать нельзя и нужно использовать '''Расширенные''' разделы, которые будут содержать '''Логические'''.<br />
<br />
Расширенные разделы не могут быть использованы сами по себе - они всего лишь "контейнеры" для логических. Жесткий диск может содержать только один расширенный раздел, который может быть разделен на логические.<br />
<br />
Во время разбивки диска можно заметить схему нумерации разделов. Главные получают названия sda1-3, расширенный раздел - sda4, а логические, соответственно, sda5, sda6 и т.д.<br />
<br />
=====Раздел Подкачки (swap)=====<br />
Данный раздел является чем-то вроде "виртуального ОЗУ". На нем хранятся данные, которые не умещаются, либо не подходят для хранения в оперативной памяти.<br />
<br />
Исторически сложилось, что размер раздела подкачки определяется по схеме 2ХОЗУ. То есть, двойной объем оперативной памяти. Затем, с развитием компьютерной техники, данное правило не всегда стало являться необходимым. На компьютере с 512 мегабайтами памяти правило 2Х все еще действует эффективно. Однако, на машинах с 1 гигабайтом памяти обычно наиболее эффективна схема 1ХОЗУ. Если размер вашего ОЗУ больше или равен 1 гигабайту, то можно вообще обойтись без раздела подкачки, однако это не рекомендуется. Мы создадим раздел размером в 1 гигабайт в нашем примере.<br />
<br />
{{Box Note|Если вы планируете использовать технологии suspend-to-disk или hibernate, то размер раздела подкачки, по меньшей мере, должен соответствовать размеру вашей оперативной памяти. Но рекомендуется задать размер хотя бы на 15% больший, чтобы учесть появление испорченных секторов на диске (bad sectors).}}<br />
=====Схема Разбивки=====<br />
Схема разбивки разделов довольно индивидуальна и во многом зависит от предпочтений и нужд конкретного пользователя. Но, как минимум, вам нужны два раздела: один для корня ( / ), второй для раздела подкачки (swap). Однако, вы можете захотеть иметь отдельные разделы для /boot (на нем обычно находится ядро Linux), /var и /home (пользовательская директория). Обычно иметь два раздела отдельно для корня ( / ) и отдельно для /home считается хорошей практикой и более удобным и безопасным решением.<br />
В нашем примере мы создадим три отдельных раздела: для корня, для /home и один раздел подкачки swap.<br />
<br />
=====cfdisk===== <br />
Итак, начнем с создания главного раздела, содержащего корневую файловую систему.<br />
<br />
Для создания нового раздела выберите пункт '''N'''ew, затем Primary. Далее задайте желаемый размер раздела (что-то между 4 и 12 гигабайт будет хорошим выбором). Выберите только что созданный раздел и сделайте его загрузочным, выбрав пункт '''B'''ootable.<br />
<br />
Также выберите пункт '''T'''ype и задайте значение '83 Linux'. Нашему разделу должно присвоиться имя sda1.<br />
<br />
Затем создадим раздел подкачки. Задайте размер между 512 мегабайт и 1 гигабайтом, выберите '''T'''ype - 82 (Linux swap / Solaris). Наш раздел должен быть теперь виден как sda2.<br />
<br />
Теперь еще один раздел для /home. Выберите главный раздел и установите желаемый размер в зависимости от того, что пользователи вашего компьютера будут хранить в своих персональных директориях. Также, как и для корня, задайте '''T'''ype - 83 Linux. Данный раздел появится как sda3.<br />
<br />
<br />
<br />
Вот как должна выглядеть наша таблица разделов (размеры могут отличаться):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Выберите '''W'''rite и нажмите ''''yes''''. Или нажмите '''Q'''uit для выхода из программы разбивки.<br />
<br />
<br />
=====Мои IDE-диски выглядят как SCSI, почему?=====<br />
В последних версиях ядра Linux все диски (IDE, SATA, SCSI) именуются как sd''x''. Пусть это вас не волнует, это нормально.<br />
<br />
====Назначение точек монтирования====<br />
Во-первых, выберите нужный раздел под раздел подкачки (в нашем примере это sda3). Во-вторых, выберите раздел для монтирования корневой ФС (sda1 в нашем примере). Вам будет предложено выбрать желаемую файловую систему.<br />
<br />
=====Файловые системы=====<br />
<br />
Выбор файловой системы достаточно субъективен. Каждая из предложенных ФС имеет свои достоинства и недостатки, всё зависит целиком от ваших предпочтений. Далее мы кратко рассмотрим поддерживаемые ФС:<br />
<br />
1. '''[http://ru.wikipedia.org/wiki/Ext2 ext2]''' - старая и надежная файловая система для ОС GNU/Linux. Очень стабильна, но без поддержки журналирования - это значит, что в случае аппаратных сбоев или перепадов напряжения ваша информация может пострадать. Не слишком хороший выбор для корневого и /home разделов. Данная ФС может быть легко преобразована в ext3.<br />
<br />
2. '''[http://ru.wikipedia.org/wiki/Ext2 ext3]''' - наследница ext2, но с поддержкой журналирования. Она полностью совместима с ext2. Однако, по некоторым тестам немного медленнее, нежели остальные ФС. Тем не менее, очень стабильна и активно используется, поддерживается и разрабатывается сообществом GNU/Linux.<br />
<br />
3. '''[http://ru.wikipedia.org/wiki/ReiserFS ReiserFS]''' - высокопроизводительная файловая система, разработанная Гансом Райзером. Считается очень быстрой, особенно при операциях с файлами маленького размера, однако сравнительно медленно монтируется. Вполне готова к использованию и стабильна. Однако, не слишком активно разрабатывается на данный момент (все силы отданы Reiser4).<br />
<br />
4. '''[http://ru.wikipedia.org/wiki/ReiserFS JFS]''' - '''J'''ournaled '''F'''ile'''S'''ystem, файловая система от IBM. Использует наименьшее количество ресурсов центрального процессора, нежели остальные ФС. Очень быстра в монтировании и использовании. Однако, не так широко используется, как ext или ReiserFS.<br />
<br />
5. '''[http://ru.wikipedia.org/wiki/ReiserFS XFS]''' - журналируемая ФС, которая показывает наибольшую скорость при операциях с большими файлами. Хороший выбор для разделов с большим их количеством.<br />
<br />
Наиболее значимое отличие между ними - журналирование. Все, кроме ext2, его поддерживают, однако техника журналирования не у всех одинакова. Только ext3 поддерживает хранение в журнале данных и мета-данных (информация о директориях). Это значит, что только она в случае сбоя сможет восстановить полностью в точной мере ту информационную структуру, которая была до сбоя.<br />
<br />
Выберите и создайте ФС для корня. Далее вам будет предложено создать дополнительные разделы. В нашем примере, нам понадобится создать еще sda2. Выберите файловую систему и примонтируйте ее как /home. Нажмите Done и возвращайтесь в главное меню установщика.<br />
<br />
===Select Packages===<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal package set; just enough for a barebones system.<br />
*'''SUPPORT:''' Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' Various libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52946
Beginners' guide (Русский)
2008-11-08T21:09:24Z
<p>Alsvartr: Перевод главы Prepare Hard Drive</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
<br />
====Подготовка жесткого диска====<br />
Выберите первый пункт меню - "Prepare Hard Drive". Вам будет предложено автоматически подготовить ваш жесткий диск к установке Arch Linux, либо вручную переразбить и подготовить разделы.<br />
* 1. Автоматическая подготовка<br />
Установщик сам разобъет ваш жесткий диск на следующие разделы:<br />
* Загрузочный раздел /boot c файловой системой ext2 и размером по умолчанию в 32 мегабайта. Вы сможете изменить это значение. <br />
* Раздел подкачки swap с размером по умолчанию в 256 мегабайтов. Вы также сможете изменить это значение.<br />
* Отдельные разделы для корня / и домашней директории пользователей /home. Размеры вы определяете сами. Также вам будет предоставлен выбор из файловых систем: ext2, ext3, reiserfs, xfs и jfs. Но следует учесть, что оба этих раздела должны быть отформатированы в одинаковой файловой системе.<br />
<br />
Не забывайте - автоматическая подготовка сотрет все данные на вашем жестком диске! Внимательно читайте предупреждение установщика.<br />
<br />
* 2. '''(Рекомендуется)''' Ручная подготовка<br />
<br />
Выберите из списка жесткий диск, на который будет произведена установка (/dev/sd''x'').<br />
<br />
''На этом этапе более опытные пользователи могут сразу перейти к главе о '''[[#Выбор Пакетов|выборе пакетов]]'''.''<br />
<br />
=====Информация о разбивке=====<br />
Разбивка жесткого диска заключается в создании отдельных зон (разделов) на жестком диске. Они будут выглядеть как отдельные диски со своими файловыми системами. Разделы подразделяются на "Главные" (Primary), "Расширенные" (Extended) и "Логические" (Logical).<br />
<br />
'''Главные''' разделы могут быть загрузочными и их количество ограничено четырьмя. Больше четырех главных разделов создать нельзя и нужно использовать '''Расширенные''' разделы, которые будут содержать '''Логические'''.<br />
<br />
Расширенные разделы не могут быть использованы сами по себе - они всего лишь "контейнеры" для логических. Жесткий диск может содержать только один расширенный раздел, который может быть разделен на логические.<br />
<br />
Во время разбивки диска можно заметить схему нумерации разделов. Главные получают названия sda1-3, расширенный раздел - sda4, а логические, соответственно, sda5, sda6 и т.д.<br />
<br />
=====Раздел Подкачки (swap)=====<br />
Данный раздел является чем-то вроде "виртуального ОЗУ". На нем хранятся данные, которые не умещаются, либо не подходят для хранения в оперативной памяти.<br />
<br />
Исторически сложилось, что размер раздела подкачки определяется по схеме 2ХОЗУ. То есть, двойной объем оперативной памяти. Затем, с развитием компьютерной техники, данное правило не всегда стало являться необходимым. На компьютере с 512 мегабайтами памяти правило 2Х все еще действует эффективно. Однако, на машинах с 1 гигабайтом памяти обычно наиболее эффективна схема 1ХОЗУ. Если размер вашего ОЗУ больше или равен 1 гигабайту, то можно вообще обойтись без раздела подкачки, однако это не рекомендуется. Мы создадим раздел размером в 1 гигабайт в нашем примере.<br />
<br />
{{Box Note|Если вы планируете использовать технологии suspend-to-disk или hibernate, то размер раздела подкачки, по меньшей мере, должен соответствовать размеру вашей оперативной памяти. Но рекомендуется задать размер хотя бы на 15% больший, чтобы учесть появление испорченных секторов на диске (bad sectors).}}<br />
=====Схема Разбивки=====<br />
Схема разбивки разделов довольно индивидуальна и во многом зависит от предпочтений и нужд конкретного пользователя. Но, как минимум, вам нужны два раздела: один для корня ( / ), второй для раздела подкачки (swap). Однако, вы можете захотеть иметь отдельные разделы для /boot (на нем обычно находится ядро Linux), /var и /home (пользовательская директория). Обычно иметь два раздела отдельно для корня ( / ) и отдельно для /home считается хорошей практикой и более удобным и безопасным решением.<br />
В нашем примере мы создадим три отдельных раздела: для корня, для /home и один раздел подкачки swap.<br />
<br />
=====cfdisk===== <br />
Итак, начнем с создания главного раздела, содержащего корневую файловую систему.<br />
<br />
Для создания нового раздела выберите пункт '''N'''ew, затем Primary. Далее задайте желаемый размер раздела (что-то между 4 и 12 гигабайт будет хорошим выбором). Выберите только что созданный раздел и сделайте его загрузочным, выбрав пункт '''B'''ootable.<br />
<br />
Также выберите пункт '''T'''ype и задайте значение '83 Linux'. Нашему разделу должно присвоиться имя sda1.<br />
<br />
Затем создадим раздел подкачки. Задайте размер между 512 мегабайт и 1 гигабайтом, выберите '''T'''ype - 82 (Linux swap / Solaris). Наш раздел должен быть теперь виден как sda2.<br />
<br />
Теперь еще один раздел для /home. Выберите главный раздел и установите желаемый размер в зависимости от того, что пользователи вашего компьютера будут хранить в своих персональных директориях. Также, как и для корня, задайте '''T'''ype - 83 Linux. Данный раздел появится как sda3.<br />
<br />
<br />
<br />
Вот как должна выглядеть наша таблица разделов (размеры могут отличаться):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Выберите '''W'''rite и нажмите ''''yes''''. Или нажмите '''Q'''uit для выхода из программы разбивки.<br />
<br />
<br />
=====Мои IDE-диски выглядят как SCSI, почему?=====<br />
В последних версиях ядра Linux все диски (IDE, SATA, SCSI) именуются как sd''x''. Пусть это вас не волнует, это нормально.<br />
<br />
====Set File system Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). You will be asked what kind of filesystem you want.<br />
<br />
=====Filesystem Types=====<br />
<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each one has its own advantages and disadvantages, and differences in performance are often more likely to be attributable to placebo than to human-perceivable measurements. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' - Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.''<br />
<br />
2. '''ext3''' - Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. Generally perceived and benchmarked as ''slightly'' slower than other filesystems, but ''extremely'' stable and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is comparatively slow at mounting. Quite well established and stable. ReiserFS isn't actively developed at this time (Reiser4 is the new Reiser filesystem).<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem. JFS uses the least CPU resources of any filesystem. Very fast at mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS. <br />
<br />
5. '''XFS''' - Journaling filesystem which is best suited for large files. Very fast at mounting. May be slower than ReiserFS for many small files. The only available GNU/Linux FS with online defragmentation ability.<br />
<br />
A major difference is [http://en.wikipedia.org/wiki/Journaling_file_system journaling] (something similar to transaction logs in database environments). All filesystems except ext2 use journaling. Note that not all journaling techniques are alike; specifically, only ext3 journals BOTH data AND meta-data (directory information). The others only journal meta-data. While all will return your filesystem to a valid state after recovering from a crash, only ext3 guarantees that you won't be left with some "stale data".<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, only sda2 is remaining. Choose a filesystem type and mount it as /home. Again, create the filesystem and choose Done. Return to main menu.<br />
<br />
===Select Packages===<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal package set; just enough for a barebones system.<br />
*'''SUPPORT:''' Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' Various libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52934
Beginners' guide (Русский)
2008-11-08T16:51:19Z
<p>Alsvartr: /* FTP: Configure Network */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Настройка Сети====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
<br />
====Prepare Hard Drive====<br />
Select the first menu entry "Prepare Hard Drive". <br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides your disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. You will be prompted to modify the size to you requirement.<br />
* swap partition, default size 256MB. You will be prompted to modify the size to you requirement. <br />
* A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but both / and /home must share the same fs type.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the warning presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
Of course, if you have but one hard drive in your system and have decided to dedicate it to Arch, you have nothing to worry about. <br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
Select the hard drive you wish to install to (/dev/sd''x'').<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#Select Packages|Select Packages]]''' below.''<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted). Partitions are broken up into "Primary", "Extended", and "Logical". <br />
<br />
'''Primary''' partitions can be bootable, and are limited to 4. Beyond 4 partitions, we are forced to use an '''extended''' partition which will contain '''logical''' partitions.<br />
<br />
Extended partitions are not usable by themselves; they are merely a "container" for logical partitions. A hard disk may contain only one extended partition; which can then be sub-divided into logical partitions. <br />
<br />
When partitioning a disk, one can see this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on your hard drive where "virtual ram" resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM. <br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forgo a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example.<br />
{{Box Note|If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least '''equal''' in size to the amount of physical RAM, and some users even recommend oversizing it beyond the amount of physical RAM by 15% to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. What you need at the least is one primary partition which contains the root [http://en.wikipedia.org/wiki/File_system Filesystem] ( / ) and one for swap. Other candidates for separate partitions include /boot (which mainly contains the kernel) /var, and /home (which contains the user data). It is generally considered good practice and more versatile to have / and /home on separate partitions.<br />
In this example, we shall use one partition for /, one partition for /home, and a swap partition.<br />
<br />
=====cfdisk===== <br />
Let's start by creating the primary partition that will contain the '''root''', (/) filesystem. <br />
<br />
Choose '''N'''ew -> Primary and enter the size you want (something between 4 and 12 GB is a good choice for a full-featured Linux system). Put the partition at the beginning of the disk. Select the newly created partition and choose '''B'''ootable to make this partition bootable. <br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition should appear as sda1.<br />
<br />
Next, create a partition for swap. Select a size between 512 MB and 1 GB and change the '''T'''ype to 82 (Linux swap / Solaris). The created swap partition should appear as sda2.<br />
<br />
Lastly, another partition for your /home directory. Choose another primary partition and set the size to a value you like. The size really depends on what your users store in their home directories, so I cannot make any suggestions. The size may vary between a few hundred megabytes for some office documents up to hundreds of gigabytes for videos and MP3s. If you want to use the entire remaining space on your hard disc, remember to reserve a quantity for the swap partition. (1 GB, or 1024MB, in our example)<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition should appear as sda3.<br />
<br />
<br />
<br />
This is what your Layout should look like (size may vary depending on your decisions):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk if you deleted partitions. Choose '''Q'''uit to leave the partitioner. <br />
Choose Done to leave this menu and continue with "Set Filesystem Mountpoints".<br />
<br />
=====I have IDE devices, why do they look like SCSI devices?=====<br />
Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.<br />
<br />
====Set File system Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). You will be asked what kind of filesystem you want.<br />
<br />
=====Filesystem Types=====<br />
<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each one has its own advantages and disadvantages, and differences in performance are often more likely to be attributable to placebo than to human-perceivable measurements. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' - Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.''<br />
<br />
2. '''ext3''' - Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. Generally perceived and benchmarked as ''slightly'' slower than other filesystems, but ''extremely'' stable and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is comparatively slow at mounting. Quite well established and stable. ReiserFS isn't actively developed at this time (Reiser4 is the new Reiser filesystem).<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem. JFS uses the least CPU resources of any filesystem. Very fast at mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS. <br />
<br />
5. '''XFS''' - Journaling filesystem which is best suited for large files. Very fast at mounting. May be slower than ReiserFS for many small files. The only available GNU/Linux FS with online defragmentation ability.<br />
<br />
A major difference is [http://en.wikipedia.org/wiki/Journaling_file_system journaling] (something similar to transaction logs in database environments). All filesystems except ext2 use journaling. Note that not all journaling techniques are alike; specifically, only ext3 journals BOTH data AND meta-data (directory information). The others only journal meta-data. While all will return your filesystem to a valid state after recovering from a crash, only ext3 guarantees that you won't be left with some "stale data".<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, only sda2 is remaining. Choose a filesystem type and mount it as /home. Again, create the filesystem and choose Done. Return to main menu.<br />
<br />
===Select Packages===<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal package set; just enough for a barebones system.<br />
*'''SUPPORT:''' Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' Various libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52933
Beginners' guide (Русский)
2008-11-08T16:50:27Z
<p>Alsvartr: /* FTP: Configure Network */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Configure Network====<br />
Вам будут показаны доступные интерфейсы. Если нужный интерфейс присутствует в списке - значит он определился правильно. В обратном случае, вы можете попробовать определить его прямо из установщика или из другой виртуальной консоли (vc).<br />
<br />
Далее выберите нужный интерфейс и продолжайте установку.<br />
<br />
Затем вам будет предложено использовать DHCP для автоматического получения сетевых настроек. В случае отказа, вам будет предложено вручную ввести ваш статический IP-адрес, маску подсети, адрес шлюза и т.д. И, наконец, вы сможете пересмотреть проделанные настройки и удостовериться в их правильности.<br />
<br />
Переходите к чтению о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
<br />
====Prepare Hard Drive====<br />
Select the first menu entry "Prepare Hard Drive". <br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides your disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. You will be prompted to modify the size to you requirement.<br />
* swap partition, default size 256MB. You will be prompted to modify the size to you requirement. <br />
* A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but both / and /home must share the same fs type.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the warning presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
Of course, if you have but one hard drive in your system and have decided to dedicate it to Arch, you have nothing to worry about. <br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
Select the hard drive you wish to install to (/dev/sd''x'').<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#Select Packages|Select Packages]]''' below.''<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted). Partitions are broken up into "Primary", "Extended", and "Logical". <br />
<br />
'''Primary''' partitions can be bootable, and are limited to 4. Beyond 4 partitions, we are forced to use an '''extended''' partition which will contain '''logical''' partitions.<br />
<br />
Extended partitions are not usable by themselves; they are merely a "container" for logical partitions. A hard disk may contain only one extended partition; which can then be sub-divided into logical partitions. <br />
<br />
When partitioning a disk, one can see this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on your hard drive where "virtual ram" resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM. <br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forgo a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example.<br />
{{Box Note|If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least '''equal''' in size to the amount of physical RAM, and some users even recommend oversizing it beyond the amount of physical RAM by 15% to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. What you need at the least is one primary partition which contains the root [http://en.wikipedia.org/wiki/File_system Filesystem] ( / ) and one for swap. Other candidates for separate partitions include /boot (which mainly contains the kernel) /var, and /home (which contains the user data). It is generally considered good practice and more versatile to have / and /home on separate partitions.<br />
In this example, we shall use one partition for /, one partition for /home, and a swap partition.<br />
<br />
=====cfdisk===== <br />
Let's start by creating the primary partition that will contain the '''root''', (/) filesystem. <br />
<br />
Choose '''N'''ew -> Primary and enter the size you want (something between 4 and 12 GB is a good choice for a full-featured Linux system). Put the partition at the beginning of the disk. Select the newly created partition and choose '''B'''ootable to make this partition bootable. <br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition should appear as sda1.<br />
<br />
Next, create a partition for swap. Select a size between 512 MB and 1 GB and change the '''T'''ype to 82 (Linux swap / Solaris). The created swap partition should appear as sda2.<br />
<br />
Lastly, another partition for your /home directory. Choose another primary partition and set the size to a value you like. The size really depends on what your users store in their home directories, so I cannot make any suggestions. The size may vary between a few hundred megabytes for some office documents up to hundreds of gigabytes for videos and MP3s. If you want to use the entire remaining space on your hard disc, remember to reserve a quantity for the swap partition. (1 GB, or 1024MB, in our example)<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition should appear as sda3.<br />
<br />
<br />
<br />
This is what your Layout should look like (size may vary depending on your decisions):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk if you deleted partitions. Choose '''Q'''uit to leave the partitioner. <br />
Choose Done to leave this menu and continue with "Set Filesystem Mountpoints".<br />
<br />
=====I have IDE devices, why do they look like SCSI devices?=====<br />
Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.<br />
<br />
====Set File system Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). You will be asked what kind of filesystem you want.<br />
<br />
=====Filesystem Types=====<br />
<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each one has its own advantages and disadvantages, and differences in performance are often more likely to be attributable to placebo than to human-perceivable measurements. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' - Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.''<br />
<br />
2. '''ext3''' - Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. Generally perceived and benchmarked as ''slightly'' slower than other filesystems, but ''extremely'' stable and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is comparatively slow at mounting. Quite well established and stable. ReiserFS isn't actively developed at this time (Reiser4 is the new Reiser filesystem).<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem. JFS uses the least CPU resources of any filesystem. Very fast at mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS. <br />
<br />
5. '''XFS''' - Journaling filesystem which is best suited for large files. Very fast at mounting. May be slower than ReiserFS for many small files. The only available GNU/Linux FS with online defragmentation ability.<br />
<br />
A major difference is [http://en.wikipedia.org/wiki/Journaling_file_system journaling] (something similar to transaction logs in database environments). All filesystems except ext2 use journaling. Note that not all journaling techniques are alike; specifically, only ext3 journals BOTH data AND meta-data (directory information). The others only journal meta-data. While all will return your filesystem to a valid state after recovering from a crash, only ext3 guarantees that you won't be left with some "stale data".<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, only sda2 is remaining. Choose a filesystem type and mount it as /home. Again, create the filesystem and choose Done. Return to main menu.<br />
<br />
===Select Packages===<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal package set; just enough for a barebones system.<br />
*'''SUPPORT:''' Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' Various libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52932
Beginners' guide (Русский)
2008-11-08T16:40:49Z
<p>Alsvartr: /* Выбор источника установки */ grammarnazi fix</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия вам будет предложено выбрать источник установки. Выберите CD, если хотите использовать диск. Или выберите FTP, если хотите использовать образ из FTP. <br />
* В первом случае, переходите к чтению главы о [[#Подготовка жесткого диска|Подготовке жесткого диска]].<br />
* Во втором случае, вам будет предложено загрузить драйвер для сетевой карты вручную. Но, как правило, Udev автоматически вполне успешно определяет комплектующие - вы можете проверить это выполнив "ifconfig -a" из vc2. Для продолжения установки нажмите "OK".<br />
<br />
====FTP: Configure Network====<br />
Available Interfaces will be presented. If an interface and HWaddr is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console.<br />
<br />
The following screen will prompt you to Select the interface, Probe, or Cancel. Choose the appropriate interface and continue.<br />
<br />
The installer will then ask if you wish to use DHCP. Choosing Yes will run '''dhcpcd''' to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct.<br />
<br />
Continue with [[#Prepare Hard Drive|Prepare Hard Drive]]<br />
<br />
====Prepare Hard Drive====<br />
Select the first menu entry "Prepare Hard Drive". <br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides your disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. You will be prompted to modify the size to you requirement.<br />
* swap partition, default size 256MB. You will be prompted to modify the size to you requirement. <br />
* A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but both / and /home must share the same fs type.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the warning presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
Of course, if you have but one hard drive in your system and have decided to dedicate it to Arch, you have nothing to worry about. <br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
Select the hard drive you wish to install to (/dev/sd''x'').<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#Select Packages|Select Packages]]''' below.''<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted). Partitions are broken up into "Primary", "Extended", and "Logical". <br />
<br />
'''Primary''' partitions can be bootable, and are limited to 4. Beyond 4 partitions, we are forced to use an '''extended''' partition which will contain '''logical''' partitions.<br />
<br />
Extended partitions are not usable by themselves; they are merely a "container" for logical partitions. A hard disk may contain only one extended partition; which can then be sub-divided into logical partitions. <br />
<br />
When partitioning a disk, one can see this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on your hard drive where "virtual ram" resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM. <br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forgo a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example.<br />
{{Box Note|If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least '''equal''' in size to the amount of physical RAM, and some users even recommend oversizing it beyond the amount of physical RAM by 15% to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. What you need at the least is one primary partition which contains the root [http://en.wikipedia.org/wiki/File_system Filesystem] ( / ) and one for swap. Other candidates for separate partitions include /boot (which mainly contains the kernel) /var, and /home (which contains the user data). It is generally considered good practice and more versatile to have / and /home on separate partitions.<br />
In this example, we shall use one partition for /, one partition for /home, and a swap partition.<br />
<br />
=====cfdisk===== <br />
Let's start by creating the primary partition that will contain the '''root''', (/) filesystem. <br />
<br />
Choose '''N'''ew -> Primary and enter the size you want (something between 4 and 12 GB is a good choice for a full-featured Linux system). Put the partition at the beginning of the disk. Select the newly created partition and choose '''B'''ootable to make this partition bootable. <br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition should appear as sda1.<br />
<br />
Next, create a partition for swap. Select a size between 512 MB and 1 GB and change the '''T'''ype to 82 (Linux swap / Solaris). The created swap partition should appear as sda2.<br />
<br />
Lastly, another partition for your /home directory. Choose another primary partition and set the size to a value you like. The size really depends on what your users store in their home directories, so I cannot make any suggestions. The size may vary between a few hundred megabytes for some office documents up to hundreds of gigabytes for videos and MP3s. If you want to use the entire remaining space on your hard disc, remember to reserve a quantity for the swap partition. (1 GB, or 1024MB, in our example)<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition should appear as sda3.<br />
<br />
<br />
<br />
This is what your Layout should look like (size may vary depending on your decisions):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk if you deleted partitions. Choose '''Q'''uit to leave the partitioner. <br />
Choose Done to leave this menu and continue with "Set Filesystem Mountpoints".<br />
<br />
=====I have IDE devices, why do they look like SCSI devices?=====<br />
Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.<br />
<br />
====Set File system Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). You will be asked what kind of filesystem you want.<br />
<br />
=====Filesystem Types=====<br />
<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each one has its own advantages and disadvantages, and differences in performance are often more likely to be attributable to placebo than to human-perceivable measurements. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' - Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.''<br />
<br />
2. '''ext3''' - Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. Generally perceived and benchmarked as ''slightly'' slower than other filesystems, but ''extremely'' stable and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is comparatively slow at mounting. Quite well established and stable. ReiserFS isn't actively developed at this time (Reiser4 is the new Reiser filesystem).<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem. JFS uses the least CPU resources of any filesystem. Very fast at mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS. <br />
<br />
5. '''XFS''' - Journaling filesystem which is best suited for large files. Very fast at mounting. May be slower than ReiserFS for many small files. The only available GNU/Linux FS with online defragmentation ability.<br />
<br />
A major difference is [http://en.wikipedia.org/wiki/Journaling_file_system journaling] (something similar to transaction logs in database environments). All filesystems except ext2 use journaling. Note that not all journaling techniques are alike; specifically, only ext3 journals BOTH data AND meta-data (directory information). The others only journal meta-data. While all will return your filesystem to a valid state after recovering from a crash, only ext3 guarantees that you won't be left with some "stale data".<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, only sda2 is remaining. Choose a filesystem type and mount it as /home. Again, create the filesystem and choose Done. Return to main menu.<br />
<br />
===Select Packages===<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal package set; just enough for a barebones system.<br />
*'''SUPPORT:''' Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' Various libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52836
Beginners' guide (Русский)
2008-11-07T09:18:26Z
<p>Alsvartr: Перевод Arch Way</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[Путь Arch]]=====<br />
<br />
'''''Принципы разработки Arch Linux направлены на сохранение [[Путь Arch|простоты]].'' '''<br />
<br />
Стоит учитывать, что 'простота' не означает 'легкость' или 'дружелюбие' в данном контексте. Но подразумевает 'отсутствие лишних сущностей, модификаций или надуманной сложности' и стремление к элегантному и минималистичному окружению.<br />
<br />
''"Простота подразумевается не с позиции конечного использования, а с технической точки зрения. Лучше стремиться к технической элегантности, нежели быть простым в использовании, но мусором с технической точки зрения." -Aaron Griffin''<br />
<br />
''"Значимая часть [моего метода] подразумевает простоту..Я всегда верил в то, что простой путь - правильный путь."'' - Bruce Lee<br />
<br />
Принцип "Бритвы Оккама": ''Entia non sunt multiplicanda praeter necessitatem'' или "Не следует множить сущности без необходимости." "Бритва" в данном случае означает отбрасывание, вырезание из предмета лишних усложнений и домыслов для того, чтобы добиться наиболее простого объяснения, метода или теории.<br />
<br />
{{Box Note |'''Для успешной установки и правильной настройки дистрибутива необходимо в точности выполнять приведенные инструкции. ''Пожалуйста'', читайте их внимательно.'''}}<br />
* Вы можете распечатать данную статью, она уместится примерно на 58 страницах, которые послужат полезным руководством использования Arch Linux.<br />
* ''Если вы хотите добавить что-то в данную инструкцию, пожалуйста, указывайте не только "Как" что-либо делать, но и "Зачем" именно может понадобиться это делать.''<br />
* Arch Wiki поможет вам разобраться с возникающими проблемами, ответы на которые сначала стоит поискать на [http://wiki.archlinux.org/index.php/Main_Page_(Русский) главной странице]. Также вам доступны каналы IRC и [http://bbs.archlinux.org/ форум].<br />
----<br />
Добро пожаловать в Arch Linux! Давайте приступим.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия, вам будет предложено выбрать источник установки. Выберите CD если используйте диск, или выберите FTP если хотите использовать образ из FTP. <br />
* If you chose the CORE-ISO, continue below with [[#Prepare Hard Drive|Prepare Hard Drive]].<br />
* FTP Only: If using FTP, you will be prompted to load ethernet drivers manually, if desired. Udev is quite effective at loading the required modules, so you may assume it has already done so. You may verify this by invoking ifconfig -a from vc2. (Select OK to continue.)<br />
<br />
====FTP: Configure Network====<br />
Available Interfaces will be presented. If an interface and HWaddr is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console.<br />
<br />
The following screen will prompt you to Select the interface, Probe, or Cancel. Choose the appropriate interface and continue.<br />
<br />
The installer will then ask if you wish to use DHCP. Choosing Yes will run '''dhcpcd''' to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct.<br />
<br />
Continue with [[#Prepare Hard Drive|Prepare Hard Drive]]<br />
<br />
====Prepare Hard Drive====<br />
Select the first menu entry "Prepare Hard Drive". <br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides your disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. You will be prompted to modify the size to you requirement.<br />
* swap partition, default size 256MB. You will be prompted to modify the size to you requirement. <br />
* A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but both / and /home must share the same fs type.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the warning presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
Of course, if you have but one hard drive in your system and have decided to dedicate it to Arch, you have nothing to worry about. <br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
Select the hard drive you wish to install to (/dev/sd''x'').<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#Select Packages|Select Packages]]''' below.''<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted). Partitions are broken up into "Primary", "Extended", and "Logical". <br />
<br />
'''Primary''' partitions can be bootable, and are limited to 4. Beyond 4 partitions, we are forced to use an '''extended''' partition which will contain '''logical''' partitions.<br />
<br />
Extended partitions are not usable by themselves; they are merely a "container" for logical partitions. A hard disk may contain only one extended partition; which can then be sub-divided into logical partitions. <br />
<br />
When partitioning a disk, one can see this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on your hard drive where "virtual ram" resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM. <br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forgo a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example.<br />
{{Box Note|If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least '''equal''' in size to the amount of physical RAM, and some users even recommend oversizing it beyond the amount of physical RAM by 15% to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. What you need at the least is one primary partition which contains the root [http://en.wikipedia.org/wiki/File_system Filesystem] ( / ) and one for swap. Other candidates for separate partitions include /boot (which mainly contains the kernel) /var, and /home (which contains the user data). It is generally considered good practice and more versatile to have / and /home on separate partitions.<br />
In this example, we shall use one partition for /, one partition for /home, and a swap partition.<br />
<br />
=====cfdisk===== <br />
Let's start by creating the primary partition that will contain the '''root''', (/) filesystem. <br />
<br />
Choose '''N'''ew -> Primary and enter the size you want (something between 4 and 12 GB is a good choice for a full-featured Linux system). Put the partition at the beginning of the disk. Select the newly created partition and choose '''B'''ootable to make this partition bootable. <br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition should appear as sda1.<br />
<br />
Next, create a partition for swap. Select a size between 512 MB and 1 GB and change the '''T'''ype to 82 (Linux swap / Solaris). The created swap partition should appear as sda2.<br />
<br />
Lastly, another partition for your /home directory. Choose another primary partition and set the size to a value you like. The size really depends on what your users store in their home directories, so I cannot make any suggestions. The size may vary between a few hundred megabytes for some office documents up to hundreds of gigabytes for videos and MP3s. If you want to use the entire remaining space on your hard disc, remember to reserve a quantity for the swap partition. (1 GB, or 1024MB, in our example)<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition should appear as sda3.<br />
<br />
<br />
<br />
This is what your Layout should look like (size may vary depending on your decisions):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk if you deleted partitions. Choose '''Q'''uit to leave the partitioner. <br />
Choose Done to leave this menu and continue with "Set Filesystem Mountpoints".<br />
<br />
=====I have IDE devices, why do they look like SCSI devices?=====<br />
Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.<br />
<br />
====Set File system Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). You will be asked what kind of filesystem you want.<br />
<br />
=====Filesystem Types=====<br />
<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each one has its own advantages and disadvantages, and differences in performance are often more likely to be attributable to placebo than to human-perceivable measurements. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' - Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.''<br />
<br />
2. '''ext3''' - Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. Generally perceived and benchmarked as ''slightly'' slower than other filesystems, but ''extremely'' stable and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is comparatively slow at mounting. Quite well established and stable. ReiserFS isn't actively developed at this time (Reiser4 is the new Reiser filesystem).<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem. JFS uses the least CPU resources of any filesystem. Very fast at mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS. <br />
<br />
5. '''XFS''' - Journaling filesystem which is best suited for large files. Very fast at mounting. May be slower than ReiserFS for many small files. The only available GNU/Linux FS with online defragmentation ability.<br />
<br />
A major difference is [http://en.wikipedia.org/wiki/Journaling_file_system journaling] (something similar to transaction logs in database environments). All filesystems except ext2 use journaling. Note that not all journaling techniques are alike; specifically, only ext3 journals BOTH data AND meta-data (directory information). The others only journal meta-data. While all will return your filesystem to a valid state after recovering from a crash, only ext3 guarantees that you won't be left with some "stale data".<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, only sda2 is remaining. Choose a filesystem type and mount it as /home. Again, create the filesystem and choose Done. Return to main menu.<br />
<br />
===Select Packages===<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal package set; just enough for a barebones system.<br />
*'''SUPPORT:''' Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' Various libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=52827
Beginners' guide (Русский)
2008-11-07T03:43:05Z
<p>Alsvartr: Перевод главы про Гном.</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Руководства]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Dansk|Dansk_Begynderguide}}<br />
{{i18n_entry|简体中文|Beginners Guide 新手指南}}<br />
{{i18n_entry|Deutsch|Beginners Guide (Deutsch)}}<br />
{{i18n_entry|English|Beginners Guide}}<br />
{{i18n_entry|Español|Guía para Principiantes (Español)}}<br />
{{i18n_entry|Česky|Průvodce začátečníka (Česky)}}<br />
{{i18n_entry|Italiano|Beginners Guide (Italiano)}}<br />
{{i18n_entry|Lietuviškai|Pradedančiųjų gidas (Lietuviškai)}}<br />
{{i18n_entry|Português Brasil|Guia do Iniciante(Português do Brasil)}}<br />
{{i18n_entry|Русский|Руководство для новичков}}<br />
{{i18n_links_end}}<br />
<br />
=====Всё, что вы хотели знать об установке Arch, но боялись спросить=====<br />
Добро пожаловать. Этот документ проведёт вас через процесс установки и настройки [[ArchLinux|Arch Linux]]; простого, быстрого и лёгкого GNU/Linux дистрибутива, <code>UNIX</code>-подобной операционной системы. Это больше, чем установочное руководство; Arch Linux требует определённого уровня глубоких знаний о его конфигурации, а так же методологии системы GNU/Linux и по этой причине, на этом пути содержится много дополнительной пояснительной информации. Он направлен на новых пользователей Arch, но стремится выступать как сильная справочная и информационная база для всех. Хоть это руководство предназначено для того, чтобы показать как получить полностью сконфигурированную систему Arch Linux (графическое окружени рабочего стола, возможность просмотра DVD, использования Интернет, работа с электронной почтой и прослушивания музыки), невозможно показать (или даже предположить) все возможности и варианты. По замыслу авторов, это руководство должно сфокусироваться на крайне полезных шагах; возможно вы захотите получить глубокие знания используя [[Main Page|Arch Linux Wiki]] или [http://bbs.archlinux.org/ Arch Linux Forums]. Вы также можете быть заинтересованы в чтении статьи [[Путь Arch]], в которой изложены основные принципы дистрибутива Arch Linux.<br />
<br />
Так как Arch Linux и все <code>UNIX</code>-подобные операционные системы являются в своей основе 'модульными', статья логически разбита на три основных части:<br />
<br />
'''[[#Часть 1: Установка базовой системы|Часть 1: Установка базовой системы]]'''<br />
<br />
'''[[#Часть 2: Установка X и установка ALSA|Часть 2: Установка X и установка ALSA]]'''<br />
<br />
'''[[#Часть 3: Установка и настройка окружения рабочего стола|Часть 3: Установка и настройка окружения рабочего стола]]'''<br />
<br />
=====DON'T PANIC!=====<br />
Имейте в виду, что процедура установки Arch Linux может сильно отличаться от установки других GNU/Linux дистрибутивов и вы можете запутаться, особенно если вы новичок. Обычно, GNU/Linux дистрибутивы распространяются вместе с крупным набором софта на CD (или даже DVD), включающим стандартное Рабочее Окруженее(DE), стандартный набор программ и установок, автонастройщик оборудования и графический установщик, все что выбрано за вас. Для различия, система Arch Linux создаётся '''пользователем''', из установщика с псевдографикой и базовой системы в которой нет ничего кроме bash и простых консольных программ. Это — '''[[Путь Arch]].''' В отличие от большинства других дистрибутивов с жесткой структурой, здесь нет ни стандартного окружения, ни конфигурации сделанной за пользователя. По просту говоря, Arch ждет вашего вклада. Из командной строки, ''вы'' можете установить необходимые пакеты из репозитория используя [[pacman]] и ''вручную'' настроить вашу систему под ''свои'' потребности, до того как это сделает кто-то другой. Этот метод дает вам максимум гибкости, выбора и контроля за вашей системой. Потому что когда '''вы''' настраиваете систему, вы всегда знаете все "гайки и болты" вашей системы и вам знакомо то, что находится "под капотом". <br />
<br />
Arch Linux настраивается редактированием текстовых файлов. Из-за этого не требуются графические инструменты для настройки. <br />
Также запомните, что Arch Linux направлен на опытных пользователей GNU/Linux, на тех кто хочет минимального 'разделения' оборудования и софта, на тех пользователей, которые могут тратить своё время на чтение манов о своей системе.<br />
<br />
''Arch — это инструмент созданный пользователем.''<br />
<br />
=====[[The Arch Way]]=====<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way|simple]].'' '''<br />
<br />
Note that 'simple' does ''not'' mean 'easy' nor 'user-friendly' in this context, but rather; 'without unnecessary additions, modifications, or complications'. In short; an elegant, minimalist approach.<br />
<br />
''"Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use, and technically crap." -Aaron Griffin''<br />
<br />
''"The extraordinary part of [my method] lies in its simplicity..I have always believed that the simple way is the right way."'' - Bruce Lee<br />
<br />
Occam's razor: ''Entia non sunt multiplicanda praeter necessitatem'' or "Entities should not be multiplied unnecessarily." The term razor refers to the act of shaving away unnecessary assumptions and complications to get to the simplest explanation, method or theory.<br />
<br />
{{Box Note |'''Following this guide closely is essential in order to successfully install a properly configured Arch Linux system, so ''please'' read it thoroughly.'''}}<br />
* You may wish to print out this guide as a 58 page book which will serve as a useful Arch Linux user reference. <br />
*''If you would like to add to this wiki, please include the "Why" as well as the "How", where appropriate. The best documentation teaches us how, as well as why!''<br />
* The Arch wiki is an excellent resource and should be consulted for issues [http://wiki.archlinux.org/index.php/Main_Page first]; IRC and the [http://bbs.archlinux.org/ forums] are also available if the answer cannot be found.<br />
----<br />
Welcome to Arch! Now, let's get started.<br />
<br />
==Часть 1: Установка базовой системы==<br />
===Скачайте самый последний установочный образ ===<br />
<br />
Вы можете получить самый последний образ Arch Linux'а [http://archlinux.org/download/ здесь.]<br />
<br />
*Core-iso и FTP-downloads включают в себя только самые необходимые пакеты для создания '''базовой системы Arch Linux'''. ''Нужно заметить что в Базовую Систему не включен GUI. Сюда главным образом входит GNU инструментарий, (компилятор, ассемблер, линковщик, библиотеки и немного полезных утилит) ядро Linux, и немного дополнительных библиотек и модулей.'' Остальное в Arch Linux, включая GUI, может быть установлено из консоли, ''пользователем'', используя менеджер пакетов - pacman для загрузки и установки i686/x86-64 бинарных пакетов. Процесс описывается в деталях ниже.<br />
<br />
Запишите образ системы на CD. <br />
{{Box Note| При записи не используйте скорость больше чем 8x - это рекомендованная скорость для надежной записи, также некоторые пользователи рекомендуют устанавливать очень низкую скорость '''''4x или 2x!''''' Если вам встретились неожиданные проблемы с установкой, попытайтесь записать образ с самой низкой скоростью поддерживаемой вашей системой.}}<br />
<br />
===Загрузка с Arch Linux CD===<br />
Вы должны следовать этим инструкциям, но также вы можете найти весьма полезное [[Руководство_по_установке|Официальное руководство по установке Arch Linux]]. <br />
Вставте CD в ваш CD-ROM и загрузитесь с CD. Если ваш компьютер по умолчанию загружается не с CD, вы можете исправить это <br />
изменив порядок загрузки в биосе (чтобы войти в биос используйте клавиши DEL, F1, F2, F11 или F12 при запуске компьютера (в зависимости от типа биоса)).<br />
<br />
Полезные опции загрузки:<br />
* '''ide-legacy''' если у вас возникают проблемы с IDE приводами<br />
* '''noapic acpi=off pci=routeirq nosmp''' если ваша система зависает при загрузке системы<br />
* '''acpi=nommconf''' если у вас возникают "задержки" после загрузки pci:mmconfig <br />
* '''memtest86+''' если вы хотите проверить вашу оперативную память на ошибки<br />
* '''lowmem''' полезно для старых компьютеров с ограниченным объёмом оперативной памяти<br />
<br />
Требования к памяти:<br />
* CORE ISO: lowmem-загрузка образа - 64 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* CORE ISO: обычная загрузка образа - 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
* FTP ISO : 160 MB RAM x86_64/i686 (выбраны все пакеты, имеется swap раздел)<br />
<br />
Выберите "Arch Linux Installation / Rescue System". Если вы нуждаетесь в изменениях опций загрузки, нажмите "e" для редактирования конфига загрузки.<br />
Система будет загружена и вам будет представлено сообщение приветствия с некоторыми пояснениями.<br />
<br />
===Вход в систему и изменение раскладки===<br />
Войдите в систему как 'root'. Если ваша клавиатура не имеет американскую раскладку, выполните в командной строке следующее:<br />
{{Box Note| Скорее всего, у вас клавиатура с "американской" раскладкой (если ваша клавиатура приобретена в России)}}<br />
loadkeys <ваша раскладка><br />
<br />
===Запуск установки===<br />
Введите<br />
/arch/setup <br />
чтобы начать установку Arch Linux. <br />
<br />
<br />
====Выбор источника установки====<br />
После экрана приветствия, вам будет предложено выбрать источник установки. Выберите CD если используйте диск, или выберите FTP если хотите использовать образ из FTP. <br />
* If you chose the CORE-ISO, continue below with [[#Prepare Hard Drive|Prepare Hard Drive]].<br />
* FTP Only: If using FTP, you will be prompted to load ethernet drivers manually, if desired. Udev is quite effective at loading the required modules, so you may assume it has already done so. You may verify this by invoking ifconfig -a from vc2. (Select OK to continue.)<br />
<br />
====FTP: Configure Network====<br />
Available Interfaces will be presented. If an interface and HWaddr is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console.<br />
<br />
The following screen will prompt you to Select the interface, Probe, or Cancel. Choose the appropriate interface and continue.<br />
<br />
The installer will then ask if you wish to use DHCP. Choosing Yes will run '''dhcpcd''' to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct.<br />
<br />
Continue with [[#Prepare Hard Drive|Prepare Hard Drive]]<br />
<br />
====Prepare Hard Drive====<br />
Select the first menu entry "Prepare Hard Drive". <br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides your disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. You will be prompted to modify the size to you requirement.<br />
* swap partition, default size 256MB. You will be prompted to modify the size to you requirement. <br />
* A Separate / and /home partition, (sizes can also be specified). You may choose from ext2, ext3, reiserfs, xfs and jfs, but both / and /home must share the same fs type.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the warning presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
Of course, if you have but one hard drive in your system and have decided to dedicate it to Arch, you have nothing to worry about. <br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
Select the hard drive you wish to install to (/dev/sd''x'').<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#Select Packages|Select Packages]]''' below.''<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted). Partitions are broken up into "Primary", "Extended", and "Logical". <br />
<br />
'''Primary''' partitions can be bootable, and are limited to 4. Beyond 4 partitions, we are forced to use an '''extended''' partition which will contain '''logical''' partitions.<br />
<br />
Extended partitions are not usable by themselves; they are merely a "container" for logical partitions. A hard disk may contain only one extended partition; which can then be sub-divided into logical partitions. <br />
<br />
When partitioning a disk, one can see this numbering scheme by creating primary partitions sda1-3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on your hard drive where "virtual ram" resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM. <br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually sufficient. On machines with 1GB RAM, generally a 1x rule is adequate. If you have gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forgo a swap partition altogether, though this is not recommended. We will create a 1 GB swap partition in this example.<br />
{{Box Note|If you plan on using suspend-to-disk, (hibernate) you must have a swap partition at least '''equal''' in size to the amount of physical RAM, and some users even recommend oversizing it beyond the amount of physical RAM by 15% to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. What you need at the least is one primary partition which contains the root [http://en.wikipedia.org/wiki/File_system Filesystem] ( / ) and one for swap. Other candidates for separate partitions include /boot (which mainly contains the kernel) /var, and /home (which contains the user data). It is generally considered good practice and more versatile to have / and /home on separate partitions.<br />
In this example, we shall use one partition for /, one partition for /home, and a swap partition.<br />
<br />
=====cfdisk===== <br />
Let's start by creating the primary partition that will contain the '''root''', (/) filesystem. <br />
<br />
Choose '''N'''ew -> Primary and enter the size you want (something between 4 and 12 GB is a good choice for a full-featured Linux system). Put the partition at the beginning of the disk. Select the newly created partition and choose '''B'''ootable to make this partition bootable. <br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition should appear as sda1.<br />
<br />
Next, create a partition for swap. Select a size between 512 MB and 1 GB and change the '''T'''ype to 82 (Linux swap / Solaris). The created swap partition should appear as sda2.<br />
<br />
Lastly, another partition for your /home directory. Choose another primary partition and set the size to a value you like. The size really depends on what your users store in their home directories, so I cannot make any suggestions. The size may vary between a few hundred megabytes for some office documents up to hundreds of gigabytes for videos and MP3s. If you want to use the entire remaining space on your hard disc, remember to reserve a quantity for the swap partition. (1 GB, or 1024MB, in our example)<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition should appear as sda3.<br />
<br />
<br />
<br />
This is what your Layout should look like (size may vary depending on your decisions):<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Boot Primary Linux (4096 - 8192)<br />
sda2 Primary Linux swap / Solaris (512 - 1024)<br />
sda3 Primary Linux (> 100 or remaining space)<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk if you deleted partitions. Choose '''Q'''uit to leave the partitioner. <br />
Choose Done to leave this menu and continue with "Set Filesystem Mountpoints".<br />
<br />
=====I have IDE devices, why do they look like SCSI devices?=====<br />
Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.<br />
<br />
====Set File system Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). You will be asked what kind of filesystem you want.<br />
<br />
=====Filesystem Types=====<br />
<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each one has its own advantages and disadvantages, and differences in performance are often more likely to be attributable to placebo than to human-perceivable measurements. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' - Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.''<br />
<br />
2. '''ext3''' - Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. Generally perceived and benchmarked as ''slightly'' slower than other filesystems, but ''extremely'' stable and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
3. '''ReiserFS''' - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is comparatively slow at mounting. Quite well established and stable. ReiserFS isn't actively developed at this time (Reiser4 is the new Reiser filesystem).<br />
<br />
4. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem. JFS uses the least CPU resources of any filesystem. Very fast at mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS. <br />
<br />
5. '''XFS''' - Journaling filesystem which is best suited for large files. Very fast at mounting. May be slower than ReiserFS for many small files. The only available GNU/Linux FS with online defragmentation ability.<br />
<br />
A major difference is [http://en.wikipedia.org/wiki/Journaling_file_system journaling] (something similar to transaction logs in database environments). All filesystems except ext2 use journaling. Note that not all journaling techniques are alike; specifically, only ext3 journals BOTH data AND meta-data (directory information). The others only journal meta-data. While all will return your filesystem to a valid state after recovering from a crash, only ext3 guarantees that you won't be left with some "stale data".<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, only sda2 is remaining. Choose a filesystem type and mount it as /home. Again, create the filesystem and choose Done. Return to main menu.<br />
<br />
===Select Packages===<br />
Now we shall select packages to install in our system.<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if you have more than one.<br />
*FTP ISO: Select an FTP/HTTP mirror. ''Note that archlinux.org is throttled to 50KB/s''.<br />
<br />
Package selection is split into two stages. First, you will select package categories, then you will be presented will the full lists of packages in the selected categories, allowing you to fine-tune your selections. The space bar selects and unselects the categories.<br />
<br />
*'''BASE:''' Contains the minimal package set; just enough for a barebones system.<br />
*'''SUPPORT:''' Additional packages for networking and filesystems, etc, such as gpm, fuse, dnsutils, wireless drivers, ndiswrapper, ntfs-3g, and so forth.<br />
*'''DEVEL:''' Software compiling tools such as GCC, autoconf, automake and make.<br />
*'''LIB:''' Various libraries such as gmp, lebelf, libevent, etc. <br />
<br />
Choose OK to continue and then choose 'yes' for 'Select all packages by default', for now.<br />
<br />
The next screen will present you with the selected packages within your selected categories. Leaving all selected is a safe choice for beginners, while more experienced users will wish to trim a few unnecessary packages. (For instance, an unneeded filesystem type utility, unneeded drivers, etc.)<br />
<br />
===Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system. <br />
*FTP ISO: The [[Pacman]] package manager will now download and install your selected packages. (See VC5 for output, VC1 to return to the installer)<br />
*CORE ISO: The packages will be installed from the CD.<br />
<br />
Note: For Arch 2007.08 FTP installation: after 'Install Packages' you have to upgrade pacman (ALT+F2, pacman -Sy pacman) and again 'Install Packages'.<br />
<br />
===Configure The System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.'' <br />
<br />
The installer will ask if you want to choose [[Hwdetect|hwdetect]] to gather information for your configuration. Beginners should choose 'yes'. <br />
<br />
Advanced users who are thoroughly familiar with their hardware, required modules, and who are able to manually configure /etc/rc.conf, /etc/mkinitcpio and /etc/fstab, etc. from scratch may wish to choose 'no'. (Needless to say, this option is very involved, beyond the scope of this guide, and therefore is not covered.)<br />
<br />
Next, you will be asked if you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, and DSDT support. Choose yes if you need it; in our example nothing is needed. <br />
<br />
Now you will be asked which text editor you want to use; choose [http://en.wikipedia.org/wiki/Nano_%28text_editor%29 nano] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 vi/vim] (recommended). You will be presented with a menu including the most important configuration files for your system. If you want to look up the available options as stated in /etc/rc.conf just press Alt+F2 to get a shell, look it up, and switch back to the installer with Alt+F1. <br />
=====Why doesn't the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to [[The Arch Way]]. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and autoconfiguration, Arch presents the user all pertinent configuration files during installation for the purpose of ''transparency''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use your new installation productively.<br />
<br />
====='''/etc/rc.conf'''=====<br />
Arch Linux follows in the '''*BSD''' tradition of utilizing '''/etc/rc.conf''' as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files. /etc/rc.conf offers a simple, elegant method of streamlining system resource configuration by encompassing a wide range of control, readily accessible for the Arch user. <br />
* '''LOCALIZATION''' section<br />
** '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running 'locale -a' from the command line. This setting's default is fine for US English users. <br />
** '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on bootup and on shutdown, stores '''UTC''' time, or the '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
** '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under /usr/share/zoneinfo/).<br />
** '''KEYMAP'''=: The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X!<br />
** '''CONSOLEFONT'''=: Available console fonts reside under /usr/share/kbd/consolefonts/ if you must change. The default (blank) is safe.<br />
** '''CONSOLEMAP'''=: Defines the console map to load with the setfont program on bootup. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe. <br />
** '''USECOLOR'''=: Select "yes" if you have a color monitor and wish to have colors in your consoles.<br />
<br />
LOCALE="en_US.utf8"<br />
HARDWARECLOCK="localtime"<br />
TIMEZONE="US/Eastern"<br />
KEYMAP="us"<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR="yes"<br />
* '''HARDWARE''' section<br />
** '''MOD_AUTOLOAD'''=: Setting this to "yes" will utilize '''udev''' to automatically probe hardware and load the appropriate modules during boot-up, (convenient with the default modular kernel). Setting this to "no" will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc. <br />
** '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below. <br />
** '''MODULES'''=: Specify additional MODULES if you know that an important module is missing, ('''hwdetect''' should have filled in the most important modules). Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted. <br />
# Scan hardware and load required modules at bootup<br />
MOD_AUTOLOAD="yes"<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)<br />
* '''NETWORKING''' section<br />
** '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
** '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0="dhcp" if you want to use '''DHCP'''<br />
** '''INTERFACES'''=: Specify any/all interfaces here. If you do not use DHCP to configure a device, just keep in mind that the value of the variable (whose name must be equal to the name of the device which is supposed to be configured) equals the line which would be appended to the ifconfig command if you were to configure the device manually in the shell.<br />
** '''gateway'''=: If you are using '''static IP''', set the gateway address. Ignore this entry if using '''DHCP'''<br />
** '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. Leave the '''!''' if using '''DHCP'''<br />
<br />
Example, using '''DHCP''':<br />
HOSTNAME="arch"<br />
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" <br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(!gateway)<br />
* '''DAEMONS''' section<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. <br />
DAEMONS=(@network syslog-ng netfs crond)<br />
*If a script name is prefixed with a bang (!), it is not executed. <br />
*If a script is prefixed with an "at" symbol (@), then it will be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot).<br />
*Edit this array whenever new system services are installed, if starting them automatically during bootup is desired. <br />
<br />
This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.<br />
<br />
=====About DAEMONS=====<br />
You don't have to change the [[daemons]] line at this time, but it is useful to explain what daemons are, because we need them later in this guide. <br />
<br />
Analogous to a Windows service, a ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <code>UNIX</code> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor. <br />
<br />
*'''''Tip: All Arch daemons reside under /etc/rc.d/'''''<br />
<br />
=====/etc/fstab=====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's file system. The '''/etc/fstab''' file is most commonly used by the '''mount''' command, which reads /etc/fstab to determine which options should be used when mounting the specified device.<br />
<br />
<br />
An example '''/etc/fstab''':<br />
<br />
#<br />
# /etc/fstab: static file system information<br />
#<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
#/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /mnt/fd0 vfat user,noauto 0 0<br />
/dev/disk/by-uuid/0ec-9339 / jfs defaults,noatime,nodiratime 0 1<br />
/dev/disk/by-uuid/7ef-223-0 /home jfs defaults,noatime,nodiratime 0 2<br />
/dev/disk/by-uuid/530-1e-2c2 swap swap defaults 0 0<br />
<br />
Modify your '''fstab''' to your requirements.<br />
{{Box Note | As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability.}}<br />
ls -lF /dev/disk/by-uuid/<br />
Will list all partitions by uuid.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
{{Box Note | '''''The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.'''''}}<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
====='''/etc/mkinitcpio.conf and /etc/modprobe.conf'''=====<br />
We shouldn't need to edit these configurations at this point. <br />
<br />
* '''mkinitcpio.conf''' This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.<br />
<br />
* '''modprobe.conf''' can be used to set special configuration options for the kernel modules <br />
<br />
=====/etc/resolv.conf (for Static IP)=====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [[Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
=====/etc/hosts=====<br />
<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Box Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
*'''TIP''': For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.<br />
<br />
=====/etc/hosts.deny and /etc/hosts.allow=====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add: <br />
sshd:all <br />
This will allow all incoming ssh connections.<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
=====/etc/locale.gen=====<br />
<br />
The '''locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a <code>UNIX</code>-like operating system.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file won't get touched again. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Box Note |'''''If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
=====Root password=====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
=====Pacman-Mirror=====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s'' <br />
<br />
Return to the main menu.<br />
<br />
===Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO]. <br />
===GRUB===<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient. The only thing you may want to alter is the resolution of the console. Add<br />
a vga=<number> to the first kernel line. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773<br />
initrd /boot/kernel26.img<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': GRUB's root; the drive and partition where the kernel (/boot) resides. '''NOT necesarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root''''' (within the partition containing the kernel). <br />
<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''), ''according to the UUID numbering scheme'' as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format. <br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, and the '''"vga=773"''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root (within the partition containing the kernel). Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader to the master boot record, (sda in our example).<br />
<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, eject the installer CD, and type the magic word:<br />
<br />
reboot<br />
<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your shiny, new Arch Linux base system!'''<br />
<br />
==The Base System ==<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Let's begin.<br />
<br />
Login with your root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Box Note |Virtual consoles 1-6 are available, as is the '''links''' command line web browser.}}<br />
<br />
===Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Update, Sync and Upgrade the system with pacman|Update, Sync and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
Advanced instructions for configuring the network can be found in the [[Network]] article.<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. If required, you can set a new static IP with<br />
ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
route add default gw <ip address of the gateway><br />
Check to see if /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.de. If everything is working now, adjust /etc/rc.conf as described above for static IP. If you have a DHCP server/router in your network try<br />
dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
Detailed setup guide: [[Wireless Setup]]<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you won't need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
/etc/rc.d/adsl start<br />
<br />
and<br />
<br />
/etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically dial in on boot-up, add adsl to your DAEMONS array.<br />
<br />
==Update, Sync and Upgrade the system with [[pacman]]==<br />
Now we will update the system using [[pacman]]. <br />
<br />
=====What is pacman ?=====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in C and is fast, simple, and extremely powerful. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
We will use pacman to download software packages from remote repositories and install them onto your system.<br />
<br />
Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.<br />
<br />
===Configuring pacman===<br />
<br />
=====Package Repositories and /etc/pacman.conf=====<br />
Arch currently offers the following repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) Developer maintained.<br />
<br />
*''The Core installation cd simply contains an installer script, and a snapshot of the core repository.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE and GNOME, for instance, can be found here. Developer maintained.<br />
<br />
'''[unstable]'''<br />
<br />
The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.<br />
<br />
{{Box Note |'''Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.'''}}<br />
<br />
The [unstable] repository is currently not maintained for ''x86_64''.<br />
<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:<br />
* they are expected to break something on update and need to be tested first<br />
* they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.<br />
<br />
[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your ''pacman.conf'' file.<br />
<br />
{{Box Note|'''''Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.'''''}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is part of the ''Arch User Repository ([[AUR]])''. It contains binary packages from the ''AUR'' that have enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. <br />
<br />
<nowiki>*</nowiki>''The '''''[[#Install Yaourt| yaourt]]''''' tool, an extremely popular, community contributed wrapper for pacman, can seamlessly access the '''AUR'''.''<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
nano /etc/pacman.conf<br />
Example:<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
#[unstable]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist====<br />
Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.<br />
<br />
Edit /etc/pacman.d/mirrorlist:<br />
nano /etc/pacman.d/mirrorlist<br />
Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.) <br />
<br />
Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U. <br />
<br />
After changing mirrors, issue the following command:<br />
pacman -Syy<br />
This will force pacman to resynchronize with the new repo. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
=====Ignoring packages=====<br />
When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc.pacman.conf file:<br />
<br />
IgnorePkg = kernel26<br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using [[ABS]]. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.<br />
<br />
You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.<br />
<br />
=====Ignoring Configuration Files=====<br />
In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
==Update System==<br />
Update, sync, and '''upgrade''' your entire new system with:<br />
pacman -Syu<br />
pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
Reboot if a kernel upgrade has occurred. <br />
{{Box Note|'''''Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.'''''}}<br />
<br />
=====The beauty of the Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. <br />
Reboot if a kernel upgrade has occurred.<br />
<br />
=====Get familiar with pacman=====<br />
Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:<br />
man pacman<br />
Check out the bottom of this article, and look up the [[pacman]] wiki entries at your leisure.<br />
<br />
<br />
<br />
===Add a user and setup groups===<br />
You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:<br />
adduser<br />
While most default options are safe to use, you may want to add storage, audio, video, optical, and wheel to your additional groups- especially if you are planning on having a full-featured desktop environment. <br />
<br />
Groups and users thereof are defined in /etc/group. <br />
<br />
They include:<br />
<br />
*'''audio''' - for tasks involving sound card and related software<br />
<br />
*'''wheel''' - for using sudo<br />
<br />
*'''storage''' - for managing storage devices<br />
<br />
*'''video''' - for video tasks and 3d acceleration<br />
<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
<br />
*'''floppy''' - for access to a floppy if applicable<br />
<br />
*'''lp''' - for managing printing tasks<br />
<br />
See the [[Groups]] article to understand what groups you need to be a member of. <br />
<br />
Check the man pages for usermod and gpasswd for more information.<br />
=====Install and setup Sudo=====<br />
<br />
See [[Sudo]]<br />
<br />
==Part II: Install X and configure ALSA==<br />
<br />
<br />
===Configure the audio card with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers. <br />
-----<br />
{{Box Note|udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you can't hear anything because it is muted by default.}} <br />
The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an '''X''' environment later.)<br />
<br />
Install the alsa-utils package:<br />
pacman -S alsa-utils<br />
Did you add your normal user to the audio group? If not, now would be a good time. As root do:<br />
gpasswd -a yourusername audio<br />
Log your normal user out and back in to ensure the audio group is loaded.<br />
<br />
As '''''normal, non-root''''' user, do: <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Leave alsamixer by pressing ESC. <br />
==== Sound Test ====<br />
Test your sound configuration as normal user using aplay:<br />
aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, "Front, center."<br />
<br />
Then run alsactl as root:<br />
alsactl store<br />
This will create '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.<br />
nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Installing and configuring X===<br />
The '''X''' Window System (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <code>UNIX</code>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
-----<br />
<br />
{{Box Note| If you plan on using an '''open-source''' video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:}}<br />
pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
----- <br />
Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.<br />
<br />
pacman -S xorg<br />
3d utilities such as glxgears are included in the '''mesa''' package:<br />
pacman -S mesa<br />
<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
pacman -Ss xf86-video | less<br />
You will need knowledge of which video chipset your machine has. If you don't know, do:<br />
lspci | grep VGA<br />
Here is a list of '''open source''' drivers, and corresponding video chipsets.<br />
*'''xf86-video-apm''' Alliance ProMotion video driver<br />
*'''xf86-video-ark''' ark video driver<br />
*'''xf86-video-ati''' ati video driver<br />
*'''xf86-video-chips''' Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' Cirrus Logic video driver<br />
*'''xf86-video-dummy''' dummy video driver<br />
*'''xf86-video-fbdev''' framebuffer video driver<br />
*'''xf86-video-glint''' GLINT/Permedia video driver<br />
*'''xf86-video-i128''' Number 0 i128 video driver<br />
*'''xf86-video-i740''' Intel i740 video driver<br />
*'''xf86-video-i810''' Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-imstt''' Integrated Micro Solutions Twin Turbo vidoe driver<br />
*'''xf86-video-mga''' mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' neomagic video driver<br />
*'''xf86-video-nv''' nvidia nv video driver<br />
*'''xf86-video-rendition''' Rendition video driver<br />
*'''xf86-video-s3''' S3 video driver<br />
*'''xf86-video-s3virge''' S3 Virge video driver<br />
*'''xf86-video-savage''' savage video driver<br />
*'''xf86-video-siliconmotion''' siliconmotion video driver<br />
*'''xf86-video-sis''' SiS video driver<br />
*'''xf86-video-sisusb''' SiS USB video driver<br />
*'''xf86-video-tdfx''' tdfx video driver<br />
*'''xf86-video-trident''' Trident video driver<br />
*'''xf86-video-tseng''' tseng video driver<br />
*'''xf86-video-unichrome''' Unichrome video drivers<br />
*'''xf86-video-v4l''' v4l video driver<br />
*'''xf86-video-vesa''' vesa video driver<br />
*'''xf86-video-vga''' VGA 16 color video driver<br />
*'''xf86-video-via''' via video driver<br />
*'''xf86-video-vmware ''' vmware video driver<br />
*'''xf86-video-voodoo ''' voodoo video driver<br />
<br />
* Note that the '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa '''should''' work.<br />
<br />
*If you have an NVIDIA or ATI video adapter, you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered [[#Using proprietary Graphics Driver (NVIDIA, ATI)|below]].'''<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
==Create /etc/X11/xorg.conf==<br />
=====What is /etc/X11/xorg.conf?=====<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
------<br />
By default, you will not have an Xorg config file, and with the newest versions of Xorg, you don't need one ''if'' the autodetection ''works satisfactorily'' and you don't need to turn on features such as aiglx and so on. <br />
<br />
''Most people will still find that they need to generate a config file, however.''<br />
<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the Xorg -configure script to make a basic config file. As root, do:<br />
Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
To test the server, run:<br />
X -config /root/xorg.conf.new<br />
'''X''' should start with the white hollow vector '''X''' in the center of the screen, which should respond to mouse, trackpoint or touchpad movement. Use CTRL-Alt-Backspace to exit '''X'''.<br />
<br />
Inspect your config file in case of errors:<br />
<br />
nano /root/xorg.conf.new<br />
<br />
Ensure the Xorg -configure script has correctly specified your video driver. e.g.:<br />
Section "Device"<br />
<br />
...<br />
<br />
Driver "savage"<br />
<br />
...<br />
<br />
EndSection<br />
<br />
Ensure there are horizontal sync and vertical refresh specs under section "Monitor". If not, add them:<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If you do not know these specs, consult your monitor's documentation.)<br />
<br />
Specify your default color depth under section "Screen":<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
Also add your desired Modes to your "Display" subsection, at least under the Depth 24 header, e.g.:<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
Modes "1024x768" "800x600" "640x480"<br />
Add the following section, if you wish to enable eye candy which requires the composite extension: <br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Try your config again, after modifying:<br />
X -config /root/xorg.conf.new<br />
Ensure an '''X''' session opens, without errors, and move the generated config file to /etc/X11/:<br />
mv /root/xorg.conf.new /etc/X11/xorg.conf<br />
Detailed instructions in the [[Xorg]] article.<br />
<br />
====Alternative xorg.conf generation====<br />
If Xorg -configure is not generating a usable xorg.conf, you may alternatively use the hwd tool. Install with:<br />
pacman -S hwd<br />
And run with<br />
hwd -xa <br />
Lastly, you may choose xorgconfig, which will interactively prompt you for hardware information to create a basic xorg.conf:<br />
xorgconfig<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
===Using proprietary Graphics Driver (NVIDIA, ATI)===<br />
You may choose to use the proprietary video drivers from NVIDIA or ATI. <br />
====NVIDIA Graphic Cards====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has 3 different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-71xx''' ''for very old Cards like TNT and TNT2''<br />
<br />
'''2. nvidia-96xx''' ''slightly newer cards up to the GF 4''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF 4''<br />
<br />
Consult the NVIDIA-Homepage to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
pacman -S nvidia-96xx<br />
<br />
The NVIDIA package has a utility for updating your existing /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
nvidia-xconfig<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the device section are (beware that these may not work on your system):<br />
Option "RenderAccel" "true"<br />
Option "NoLogo" "true"<br />
Option "AGPFastWrite" "true"<br />
Option "EnablePageFlip" "true"<br />
Make sure all instances of DRI are commented out:<br />
# Load "dri"<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies:<br />
depmod -a<br />
<br />
Advanced instructions for nvidia configuration can be found in the [[NVIDIA]] article.<br />
<br />
Continue with '''[[#Simple baseline X test|Simple baseline X test]]'''<br />
<br />
====ATI Graphic Cards====<br />
ATI owners have two options for drivers. If you are unsure which driver to use, please try the open-source one first. The open-source driver will suit most needs along with being generally less problematic.<br />
<br />
Install the '''proprietary''' ATI Driver with<br />
pacman -S catalyst<br />
Use the aticonfig tool to modify the xorg.conf.<br />
<br />
Install the '''open-source''' ATI Driver with<br />
pacman -S xf86-video-ati<br />
Currently, the performance of the open-source driver is not on par with that of the proprietary one. It also lacks TV-out, dual-link DVI support, and possibly other features. On the other hand, it supports Aiglx and has better dual-head support.<br />
{{Box Note| The latest proprietary driver does support [[AIGLX]] now. To use [[Compiz]] or [[Beryl]] add Option "AIGLX" "True" to Section ServerFlags and Option "Composite" "True" to Section Extensions.}}<br />
Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki]].<br />
<br />
===Simple baseline X test===<br />
<br />
At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file. If you want to test your configuration quickly, to ensure your ability to start '''X''' from the command line before installing a complete desktop environment, you can do so by invoking '''xterm'''. Xterm is a very simple terminal emulator which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
Prepare for the test by configuring a ~/.xinitrc:<br />
<br />
===== ~/.xinitrc =====<br />
This file dictates what '''X''' Window client is invoked with the '''startx''' and/or '''xinit''' command ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) <br />
<br />
To determine the client to run, '''startx/xinit''' will first look for a .xinitrc file in the user's home directory. In the absence of file ~/.xinitrc, it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/.xinitrc file, a TWM session will start.)<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
su yourusername<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
cp /etc/skel/.xinitrc ~/<br />
Edit the file: <br />
nano ~/.xinitrc<br />
and add:<br />
<br />
exec xterm<br />
<br />
So that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
exec xterm<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
<br />
''Be sure to have only one uncommented '''exec''' line in your ~/.xinitrc at this time''. Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
Start '''X''' Server as '''normal, non-root''' user, with:<br />
<br />
startx<br />
or<br />
xinit<br />
You should have an '''xterm''' session open up. You can exit the '''X''' Server with Ctrl+Alt+Backspace, or by typing "exit". If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file and on the console output of the console you started '''X''' from.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.<br />
<br />
==Part III: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides icons, applets, windows, toolbars, folders, wallpapers, applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
* If you want something full-featured and similar to Windows and Mac OSX, '''[[#KDE|KDE]]''' is a good choice<br />
* If you want something slightly more minimalist, which follows the K.I.S.S. principle more closely, '''[[#GNOME|GNOME]]''' is a good choice<br />
* '''[[#Xfce|Xfce]]''' is generally perceived as similar to GNOME, but lighter and less demanding on system resources, yet still visually pleasing and providing a very complete environment.<br />
<br />
If you have an older machine, or desire a lighter, less demanding GUI, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT provide such additions as panels, applets, icons, applications, etc.<br />
* Lightweight WM's include: '''Openbox, Fluxbox, fvwm2''', '''Windowmaker, Awesome and TWM'''.<br />
* If you need something completely different, try '''ion, wmii, dwm, or xmonad'''.<br />
<br />
===Install Fonts===<br />
At this point, you may want to install some good-looking fonts, '''before''' installing a desktop environment/window manager, (so you don't have to stare at ugly bitmap fonts in X). Dejavu and bitstream-vera are nice font sets. For websites, you may want to have the Microsoft fonts too. Install with:<br />
pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
===~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to utilize the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell to open your DE/WM of choice:<br />
<br />
nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below.<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The "exec" prefix to this command tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now. <br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
===GNOME===<br />
====О проекте GNOME====<br />
'''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. Проект GNOME сочетает в себе две вещи: интуитивно-понятное и приятное окружение рабочего стола, а также платформу для разработки, позволяющую создавать полностью интегрированные между собой и остальным окружением приложения.<br />
<br />
<br />
====Установка====<br />
Установить базовый набор пакетов GNOME можно следующей командой:<br />
pacman -S gnome<br />
<br />
Дополнительные пакеты (эмулятор терминала, текстовый редактор и т.д.) находятся в группе gnome-extra:<br />
pacman -S gnome-extra<br />
<br />
=====Полезные демоны для GNOME=====<br />
Демон - это исполняемая в фоне программа, которая дожидается определенных событий и обрабатывает их. Демон '''hal''', кроме всего прочего, автоматизирует монтирование жестких дисков, оптических приводов и флэш-накопителей. Демон '''fam''' обрабатывает изменения в структуре данных файловой системы, позволяя в реальном времени отслеживать изменения в файлах или директориях. Оба этих демона позволяют сильно упростить работу с окружением. Они устанавливаются при установке GNOME, но должны быть запущены для начала работы:<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
<br />
В качестве менеджера сессий хорошим выбором будет '''gdm'''.<br />
<br />
Установка:<br />
pacman -S gdm<br />
<br />
Для запуска этих демонов при загрузке, следует добавить их в секцию DAEMONS конфигурационного файла /etc/rc.conf :<br />
nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''hal fam gdm''')<br />
<br />
Чтобы запустить графическое окружение выполните:<br />
startx<br />
Если файл ~/.xinitrc не настроен для запуска GNOME, то окружение можно запустить командой xinit:<br />
xinit /usr/bin/gnome-session<br />
<br />
Дополнительные инструкции по установке и настройке могут быть найдены в статье [[GNOME_(Русский)|GNOME]].<br />
<br />
Поздравляем! Добро пожаловать в среду GNOME на вашей свежеустановленной системе Arch Linux! Также вы можете захотеть узнать о '''[[#Tweaks/Finishing touches|дополнительных настройках]]'''. Рекомендуется прочитать [[Post Installation Tips|советы]] после окончания установки и настройки.<br />
<br />
====Украшения====<br />
Вы можете захотеть поменять стандартную тему графического окружения. В данном случае, хорошим выбором будет тема "murrine".<br />
Установить можно следующей командой:<br />
pacman -S gtk-engine-murrine<br />
А затем выбрать данную тему в меню Система->Параметры->Внешний вид. Найти больше разнообразных тем оформления, наборов значков, фоновых изображений и т.п., вы можете на сайте [http://www.gnome-look.org Gnome Look].<br />
<br />
===KDE===<br />
====О KDE====<br />
'''K''' '''D'''esktop '''E'''nvironment. KDE - это мощное свободное окружение рабочего стола для рабочих станций GNU/Linux и <code>UNIX</code>. KDE сочетает лёгкость в использовании, современную функциональность и выдающийся графический дизайн с технологическим превосходством UNIX-подобных операционных систем.<br />
<br />
====Установка====<br />
Arch предлагает несколько вариантов kde: '''kde, kdebase, и KDEmod'''. Выберите '''один''' из представленных ниже, и продолжите дальше с '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
'''1.)''' Пакет '''kde''' это полный, стандартнй KDE, ~300MB.<br />
pacman -S kde<br />
'''2.)''' Пакет '''kdebase''' это урезанная версия с меньшим количеством приложений, ~80MB.<br />
pacman -S kdebase<br />
'''3.)''' Наконец, '''KDEmod''' - это эксклюзив для Arch Linux, созданный по инициативе сообщества, которое модифицировало KDE для максимальной производительности и модульности. Веб-сайт проекта KDEmod может быть найден на [http://kdemod.ath.cx/ http://kdemod.ath.cx/]. KDEmod очень быстрый, легкий и гибкий, с приятной, собственной темой оформления<br />
<br />
====Useful KDE DAEMONS====<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) and '''fam''' ('''F'''ile '''A'''lteration '''M'''onitor) daemons. The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system.. Both '''hal''' and '''fam''' make life easier for the KDE user. The hal, fam and kdm packages are installed when you install KDE, but must be invoked to become useful.<br />
-----<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup. If you prefer a graphical login, add '''kdm''' as well: <br />
DAEMONS=(syslog-ng network crond alsa '''hal fam kdm''')<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on bootup by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X in the 'Slackware tradition', leave out kdm, or comment it out with an exclamation. ( ! )<br />
<br />
Now try starting your X Server as normal user:<br />
startx<br />
Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===Xfce===<br />
====About Xfce====<br />
The cholesterol-free '''X''' environment. Xfce, like GNOME or KDE, is a desktop environment, but aims to be fast and lightweight while remaining visually appealing and easy to use. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit (like GNOME) and contains its own development environment (libraries, daemons, etc) similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware, and will fly with especially great speed on newer machines as well.<br />
<br />
====Installation====<br />
Install Xfce: <br />
pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
pacman -S xfce4-goodies gtk2-themes-collection<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
pacman -S fortune-mod <br />
====Useful DAEMONS====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The fam daemon will allow real-time representation of file alterations in the GUI, allowing instant access to recently installed programs, or changes in the file system. The hal and fam packages are installed when you install Xfce, but must be invoked to become useful.<br />
<br />
Start hal and fam:<br />
<br />
/etc/rc.d/hal start<br />
<br />
/etc/rc.d/fam start<br />
{{Box Note|The hal daemon relies on, and will automatically start, the dbus daemon.}}<br />
Edit your DAEMONS section in /etc/rc.conf:<br />
nano /etc/rc.conf<br />
Add '''hal''' and '''fam''' to your DAEMONS section, to invoke them on bootup.<br />
<br />
Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.<br />
<br />
If you wish to install one, see [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup]]<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[#Tweaks/Finishing touches|Tweaks and finishing touches]]''', or the rest of the information below. You may also be interested in the [[Post Installation Tips]] wiki article.<br />
<br />
===*box===<br />
====Fluxbox====<br />
Fluxbox © is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
====Openbox====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
pacman -S openbox obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
<br />
mkdir -p ~/.config/openbox/<br />
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
In the file "rc.xml" you can change various settings for Openbox (or you can use OBconf). In "menu.xml" you can change your right-click menu.<br />
<br />
To be able to log into openbox you can either go via graphical login using KDM/GDM or startx, in which case you will need to edit your ~/.xinitrc (as user) and add the following:<br />
<br />
exec openbox<br />
You may also start openbox from the shell using '''xinit''':<br />
xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Useful programs for openbox are:<br />
* PyPanel or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager and desktop icons<br />
<br />
More information is available in the [[Openbox]] article.<br />
<br />
===fvwm2===<br />
FVWM is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
pacman -S fvwm <br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm <br />
<br />
to your user's .xinitrc.<br />
<br />
Note that this stable version of fvwm is a few years old. If you want a more recent version of fvwm, there is a fvwm-devel package in the unstable repo.<br />
<br />
=APPENDIX=<br />
==Tweaks/Finishing touches==<br />
===Install [http://archlinux.fr/yaourt-en# Yaourt]===<br />
'''Y'''et '''A'''n'''O'''ther '''U'''ser '''R'''epository '''T'''ool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the [[AUR]], allowing and automating package compilation and installation from your choice of the 8000+ PKGBUILDs in the [[AUR]], in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. <br />
<br />
The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/i686<br />
for i686 or:<br />
[archlinuxfr]<br />
Server = http://repo.archlinux.fr/x86_64<br />
for x86-64.<br />
<br />
Sync and install:<br />
pacman -Sy yaourt<br />
<br />
If you wish, you may then create your own command aliases in ~/.bashrc to save typing: <br />
nano ~/.bashrc<br />
<br />
alias p="pacman"<br />
alias y="yaourt" <br />
Save and then source:<br />
source ~/.bashrc<br />
See the [http://archlinux.fr/yaourt-en# yaourt] man page for more.<br />
<br />
===HAL===<br />
Since you have now installed a desktop environment, and if you did not do so earlier, now would be a good time to also install HAL. HAL allows plug-and-play for your mobile phone, your iPod, your external HD's, etc. It will mount the device and make a nice visual icon on your desktop and/or in 'My Computer', allowing you to access the device after you have plugged it in instead of having to manually configure the /etc/fstab file or udev rules for each and every new device.<br />
<br />
KDE, GNOME and XFCE all use HAL.<br />
<br />
The installation procedure is described in the [[HAL]] article. Some information can also be found at [http://en.wikipedia.org/wiki/HAL_(software) Wikipedia].<br />
<br />
===Backgrounding DAEMONS on startup===<br />
<br />
To speed up system start up procedure, background selected DAEMONS in /etc/rc.conf by prefixing them with a '@' e.g.:<br />
<br />
DAEMONS=(syslog-ng @network crond @alsa @hal @fam @kdm)<br />
This will enable daemons to load in the background, without waiting for the preceding daemon to load first.<br />
<br />
Prefix any daemons which you do not need with a bang (!) e.g.:<br />
<br />
DAEMONS=(syslog-ng @network !netfs !crond @alsa @hal @fam @kdm)<br />
<br />
Alternatively, you may also simply remove unneeded daemons.<br />
<br />
===Beautifying Fonts for LCD's===<br />
See [[Fonts]]<br />
<br />
===Adjusting Mouse for scroll wheel===<br />
While your mouse should be working out of the box, you may want to use your scroll wheel. Add this to your Input Section (mouse0):<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
===Get All Mouse Buttons Working===<br />
See [[Get All Mouse Buttons Working]]<br />
<br />
===Configuring Touchpad for Laptops===<br />
See [[Touchpad Synaptics]]<br />
<br />
===Adjusting Keyboard Layout===<br />
You may want to change your keyboard layout. To do this edit your /etc/X11/xorg.conf and add these lines in the InputDevice Section (Keyboard0) (the example shows a German keyboard layout with no dead keys; alter this to fit your needs).<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
===Additional tweaks for laptops===<br />
ACPI support is needed if you want to use some special functions on your notebook (e.g. sleep, sleep when lid is closed, special keys...). Install <tt>acpid</tt> using<br />
pacman -S acpid<br />
and add it to the daemons in /etc/rc.conf. <tt>acpid</tt> should be started before <tt>hal</tt> and <tt>dbus</tt>, so take care to place it before any calls to hal and dbus. Manually, it can be started by<br />
/etc/rc.d/acpid start<br />
<br />
More-specific information about Arch Linux on various Laptops can be found at [[:Category:Laptops (English)]]<br />
<br />
===Configuring CPU frequency scaling===<br />
Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to a quieter system; Laptop users will definitely want this, but even a desktop system will benefit from it. Install cpufrequtils with<br />
pacman -S cpufrequtils<br />
Edit the config file /etc/conf.d/cpufreq and change <br />
governor="ondemand"<br />
which dynamically increases the CPU frequency if needed (which is a safe choice on desktop systems too). Alter min_freq and max_freq to match your system's CPU spec. If you don't know the frequencies, run ''cpufreq-info'' after loading one of the frequency scaling modules. You can also comment out or delete the min_freq and max_freq lines: things will work automatically. Add the frequency scaling modules to your /etc/rc.conf modules line. Most modern notebooks and desktops can simply use the ''acpi-cpufreq'' driver, however other options include the ''p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino'' drivers. Load the module with<br />
modprobe <modulname> <br />
and start cpufreq with<br />
/etc/rc.d/cpufreq start<br />
For more details, see [[Cpufrequtils]]<br />
<br />
===Pm-Utils===<br />
The pm-utils package will allow you to suspend-to-RAM and hibernate: <br />
pacman -S pm-utils<br />
[[Pm-utils]] wiki page.<br />
<br />
===Laptop-Mode===<br />
The laptop-mode-tools package is sort of a one-stop configuration for all laptop power management utilities. It works in conjunction with other installed tools to fully configure everything from hard disk spin-down to X display DPMS standby times, if desired.<br />
pacman -S laptop-mode-tools<br />
Add laptop-mode to your DAEMONS= line in /etc/rc.conf and configure /etc/laptop-mode/laptop-mode.conf.<br />
<br />
==File and directory explanation==<br />
<br />
'''/boot/grub/menu.lst'''<br />
<br />
GRUB is the default bootloader for Arch Linux. You should check and<br />
modify this file to accommodate your boot setup if you want to use<br />
GRUB, otherwise read on about the LILO configuration.<br />
<br />
Make sure you read the warning regarding the pata transition<br />
elaborated on in the fstab section!<br />
<br />
Configuring GRUB is quite easy, the biggest hurdle is that it uses yet<br />
another device naming scheme different from /dev; Your hard disks as a<br />
whole are referred to as (hd0), (hd1), etc., sequentially numbered in<br />
order of appearance on the IDE/SCSI bus, (as dictated by BIOS) just like the sda, sdb, etc.<br />
names in /dev. The partitions of a disk are referred to with (hd0,0),<br />
(hd0,1) and so on, with 0 corresponding to the first entity. A few<br />
conversion examples are included in the default menu.lst to aid your<br />
understanding. <br />
<br />
{{ Box Note | The first appearance of 'root (hdx,x)' may be misleading. The '''root''' command is specifying '''''GRUB''''''s root, which corresponds to ''where the kernel resides, i.e. '''/boot'''''. Ensure that the drive and partition are correct, since '''''/boot''', does not necessarily share the same partition as the root filesystem, or /''.}}<br />
<br />
Once you have grasped the concept of device naming, choose a title for your boot section(s), create a kernel line that includes the partition and path to where the kernel resides, and supply the correct root filesystem device and partition as a parameter to the kernel root option to have it mounted as / on bootup, as well as any boot<br />
parameters. If using the stock Arch 2.6.x kernel, you'll also need an<br />
initrd line that points to the kernel26.img file in your /boot<br />
directory. The path to the initramfs on the initrd line will be the same as<br />
the path to vmlinuz26 that you provide on the kernel line, since both reside under /boot. You should<br />
be fine with the defaults, just check whether the partition<br />
information is correct in the root and kernel lines.<br />
<br />
To create a boot option that loads the bootsector of a different OS,<br />
the following example might be helpful. You will probably succeed in<br />
starting any Microsoft-based operating system with it, just add this<br />
block to the file after any other sections, and modify the partition<br />
device accordingly to refer to the partition containing the bootsector<br />
of the OS you are intending to boot.<br />
(1) Other OS<br />
title My Other OS<br />
rootnoverify (hd0,1)<br />
makeactive<br />
chainloader +1<br />
<br />
For advanced configuration of other OSes, please refer to the online<br />
GRUB manual.<br />
<br />
After checking your bootloader configuration for correctness, you'll<br />
be prompted for a partition to install the loader to. Unless you're<br />
using yet another boot loader, you should install GRUB to the MBR of<br />
the installation disk, which is usually represented by the appropriate<br />
device name without a number suffix.<br />
<br />
<br />
'''/etc/lilo.conf'''<br />
<br />
This is the configuration file for the LILO bootloader. Make sure you<br />
check this one and get it right if you want to use LILO to boot your<br />
system. See LILO documentation for help on this.<br />
<br />
Things you should check are the root= lines in the image sections and<br />
the boot= line right at the beginning of the file. The root lines<br />
specify the device which shall be mounted as the root filesystem on<br />
bootup. If you don't know what is supposed to be entered here, change<br />
to another terminal and type mount to see a list of all currently<br />
mounted drives, and look for the line which displays a device name<br />
mounted on /mnt type [...]. The device path at the beginning of this<br />
very line should be entered in the root lines of your lilo.conf.<br />
Change if necessary, and keep the pata issue in mind!<br />
<br />
The boot line should be okay by default in most cases. Unless you have<br />
a weird boot manager setup in mind with multiple OSes, the device<br />
referenced here should be having the same prefix your root lines have,<br />
but not end with a number. For example, a root of /dev/hda3 means you<br />
probably want to install LILO into the Master Boot Record of the hard<br />
disk, so you would set boot to /dev/hda, which references the disk as<br />
a whole. During installation, the boot device must be the current name<br />
of the device where you want to write the boot sector to; This may<br />
differ from the name of the device after the first boot, thanks to the<br />
pata transition! Check carefully what device to write to during the<br />
installation stage, for example with the mount command.<br />
<br />
To prevent some serious grief, you should make sure you know how to<br />
restore the bootsector of your other OSes, for example with Windows's<br />
FIXBOOT/FIXMBR tools.<br />
<br />
To be on the safe side, you should keep the option lba32 listed. This<br />
will prevent some geometry issues from happening.<br />
<br />
In some cases, depending on your BIOS, LILO will not run on bootup and<br />
spill out an error code infinitely. In most cases you either removed<br />
the lba32 option, or your hardware setup is a little special, meaning<br />
that maybe your CD-ROM drive is primary master and the hard disk you<br />
installed secondary slave. This can very well confuse your BIOS, and<br />
thus stop the boot process. To prevent that you can try and make the<br />
install drive the primary master on your IDE bus. If you've got a<br />
mixed IDE and SCSI system and the problem persists, you'll probably<br />
need some experimentation with the disk and bios options of LILO to<br />
provide a working mapping; The disk drives in your system are numbered<br />
sequentially by your BIOS, starting with 0x80. If you're lucky your<br />
SCSI controller tells you which drive has which BIOS ID, but usually<br />
you're not. How the drives are effectively numbered is depending on<br />
your BIOS, so in the worst case you can only guess until it works. A<br />
typical disk line would look like this:<br />
boot=/dev/hda<br />
disk=/dev/hda bios=0x80<br />
<br />
The disk option maps a BIOS ID to the disk device known to linux. Note<br />
that there is still no guarantee that things will work as other things<br />
can be wrong, so do not despair if all your tries fail, but rather try<br />
rearranging your hardware in a way that's not totally odd. In this<br />
area too much can go wrong and needs special handling to be explained<br />
here. In most cases the lba32 option will suffice anyway. Old hard<br />
drives will usually need a little more special care until they do as<br />
told.<br />
<br />
Don't become fidgety when reading this section, I (Dennis) just<br />
happened to stumble over this problem when experimenting with a rather<br />
odd system, and figured it'd be a good idea to mention this show<br />
stopper and workarounds here. You probably won't ever experience this,<br />
as you should be using GRUB anyway.<br />
<br />
How to recreate a LILO boot sector with only a rescue disk is<br />
explained later in this document.<br />
<br />
<br />
'''/etc/conf.d/*'''<br />
<br />
Some daemon scripts will have a matching configuration file in this<br />
directory that contains some more-or-less useful default values. When<br />
a daemon is started, it will first source the settings from it's<br />
config file within this directory, and then source the /etc/rc.conf.<br />
This means you can easily centralize all your daemon configuration<br />
options in your /etc/rc.conf simply by setting an appropriate variable<br />
value, or split up your configuration over multiple files if you<br />
prefer a decentralized approach to this issue. Isn't life great if<br />
it's all just simple scripting?<br />
<br />
<br />
'''/etc/profile'''<br />
<br />
This script is run on each user login to initialize the system. It also globally defines PS1, $PATH, bash aliases, etc. It is kept quite simple under Arch Linux, as most things are. You may wish to edit or customize it to suit your needs.<br />
<br />
==Boot Scripts==<br />
<br />
Arch Linux uses a fairly simple bootup sequence quite similar to *BSDs. The first boot script to run is /etc/rc.sysinit. When it's done, /etc/rc.multi will be called (in a normal bootup). The last script to run will be /etc/rc.local. When started in runlevel 1, the single user mode, the script /etc/rc.single is run instead of /etc/rc.multi. You will not find an endless symlink collection in the /etc/rc?.d/ directories to define the bootup sequence for all possible runlevels. In fact, due to this approach Arch only really has three runlevels, if you take starting up X in runlevel 5 into account. The boot scripts are using the variables and definitions found in the /etc/rc.conf file and also a set of general functions defined in the<br />
/etc/rc.d/functions script. If you plan to write your own daemon<br />
files, you should consider having a look at this file and existing<br />
daemon scripts.<br />
<br />
Boot Script Overview<br />
<br />
#/etc/rc.sysinit<br />
#/etc/rc.single<br />
#/etc/rc.multi<br />
#/etc/rc.local<br />
#/etc/rc.shutdown<br />
#/etc/rc.local.shutdown<br />
#/etc/rc.d/*<br />
<br />
<br />
'''/etc/rc.sysinit'''<br />
<br />
The main system boot script. It does boot-critical things like mounting filesystems, running udev, activating swap, loading modules, setting localization parameters, etc. You will most likely never need to edit this file.<br />
<br />
<br />
'''/etc/rc.single'''<br />
<br />
Single-user startup. Not used in a normal boot-up. If the system is started in single-user mode, for example with the kernel parameter 1 before booting or during normal multi-user operation with the command init 1, this script makes sure no daemons are running except for the bare minimum; syslog-ng and udev. The single-user mode is useful if you need to make any changes to the system while making sure that no remote user can do anything that might cause data loss or damage. <br />
For desktop users, this mode is usually quite useless. You should most likely have no need to edit this script.<br />
<br />
<br />
'''/etc/rc.multi'''<br />
<br />
Multi-user startup script. It starts all daemons you configured in the DAEMONS array (set in /etc/rc.conf) after which it calls /etc/rc.local. You shouldn't feel a pressing need to edit this file. <br />
<br />
'''/etc/rc.local'''<br />
<br />
Local multi-user startup script. It is a good place to put any last-minute commands you want the system to run at the very end of the bootup process. This is finally the one and only script you should modify if needed, and you have total freedom on what to add to this script. Most common system configuration tasks, like loading modules, changing<br />
the console font or setting up devices, usually have a dedicated place where they belong. To avoid confusion, you should make sure that whatever you intend to add to your rc.local isn't feeling just as home in /etc/profile.d/ or any other already existant config location instead.<br />
<br />
<br />
'''/etc/rc.shutdown'''<br />
<br />
System shutdown script. It stops daemons, unmounts filesystems, deactivates the swap, etc. <br />
<br />
<br />
'''/etc/rc.local.shutdown'''<br />
<br />
Analogous to the /etc/rc.local file, this file may contain any commands you want to run right before the common rc.shutdown is executed. Please note that this file does not exist by default, and for it to work properly, it must be set as executable.<br />
<br />
<br />
'''/etc/rc.d/*'''<br />
<br />
This directory contains the daemon scripts referred to from the rc.conf's DAEMONS= array. In addition to being called on bootup, you can use these scripts when the system is running to manage the services of your system. For example the command<br />
/etc/rc.d/postfix stop<br />
<br />
will stop the postfix daemon. This directory is not in the $PATH by default, but may be added for convenience. Obviously a corresponding daemon script only exists when the appropriate package has been installed (in this case postfix). With a base system install, you don't have many scripts in here, but rest assured that all relevant daemon scripts end up here. If you wish, you can, of course, create your own scripts and place them here, to be called by the DAEMONS= array in /etc/rc.conf on system startup. <br />
<br />
This directory is pretty much the equivalent to the /etc/rc3.d/ or /etc/init.d/ directories of other distributions, but without all the symlink hassle. The lack of symlink requirement is a defining difference of a *BSD-style init framework, vs a sysvinit.<br />
<br />
==Useful Applications==<br />
This section will never be complete. It just shows some good applications for the everyday user. <br />
<br />
'''KDE users NOTE''': Since KDE resides in /opt, you will most likely have to log out and in after initial installation to update your PATH before these programs can be used.<br />
===Internet===<br />
<br />
=====Firefox=====<br />
The ever-popular Firefox web browser is available through pacman, although it doesnt have its official branding, so the program appears when opened as Bon Echo. Install with:<br />
<br />
pacman -S firefox<br />
Be sure and install 'flashplugin', 'mplayer', 'mplayer-plugin', and the 'codecs' packages for a complete web experience:<br />
pacman -S flashplugin mplayer mplayer-plugin codecs<br />
(The codecs package contains codecs for Quicktime and Realplayer content.)<br />
<br />
Thunderbird is useful for managing your emails. If you are using GNOME you may want to take a look at Epiphany and Evolution; if you are using KDE Konqueror and KMail could be your choice. If you want something completely different you can still use Opera. Finally, if you are working on the system console - or in a terminal session - you could use various text-based browsers like ELinks, Links and Lynx, and manage your emails with [[Mutt]]. Pidgin (previously known as Gaim) and Kopete are good instant messengers for GNOME and KDE, respectively. PSI and Gajim are perfect if you are using only Jabber or Google Talk.<br />
<br />
===Office===<br />
OpenOffice is a complete office suite (similar to Microsoft Office). Abiword is a good, small alternative word processor, and Gnumeric an Excel replacement for the GNOME desktop. KOffice is a complete office suite for the KDE Desktop. GIMP (or GIMPShop) is a pixel-based graphics program (similar to Adobe Photoshop), while Inkscape is a vector-based graphics program (like Adobe Illustrator). And, of course, Arch comes with a full set of LaTeX Programs: tetex has been popular for many years and still works, and its successor [[Texlive]] is available from the [[AUR]] repository.<br />
<br />
==Multimedia ==<br />
<br />
<br />
===Video Player===<br />
====VLC====<br />
VLC Player is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S vlc<br />
<br />
(TODO) Instructions for VLC mozilla plug-in<br />
<br />
====Mplayer====<br />
MPlayer is a multimedia player for Linux. To install it, simply type the code below.<br />
<br />
pacman -S mplayer<br />
<br />
It also has a Mozilla plug-in for videos and streams embedded in web pages. To install it, simply type the code below.<br />
<br />
pacman -S mplayer-plugin<br />
<br />
If you use KDE, KMplayer is a better choice. It comes with a plug-in for videos and streams embedded in web pages, which works with Konqueror. To install it, simply type the code below.<br />
<br />
pacman -S kmplayer<br />
<br />
(TODO) GMPlayer instructions<br />
<br />
====Xine====<br />
<br />
Xine is an excellent player, especially for DVDs.<br />
<br />
pacman -S xine-ui<br />
The libdvdcss library provides DVD decoding for encrypted DVDs. ''Ensure the legality of using libdvdcss in your country before installing!''<br />
pacman -S libdvdcss<br />
<br />
====GNOME====<br />
=====Totem=====<br />
[http://www.gnome.org/projects/totem/ Totem] is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer (gstreamer is the default which installs with the arch totem package). It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation.<br />
It comes with added functionality such as:<br />
<br />
* Video thumbnailer for the file manager<br />
* Nautilus properties tab<br />
* Epiphany / Mozilla (Firefox) plugin to view movies inside your browser <br />
* Webcam utility (in development)<br />
<br />
Totem-xine is still the better choice if you want to watch DVDs.<br />
<br />
Totem is part of the gnome-extra group; the Totem webbrowser plugin isn't.<br />
<br />
To install separately:<br />
pacman -S totem<br />
<br />
To install the Totem webbrowser plugin:<br />
pacman -S totem-plugin<br />
<br />
====KDE====<br />
=====Kaffeine=====<br />
Kaffeine is a good option for KDE users. To install it, simply type the code below.<br />
<br />
pacman -S kaffeine<br />
<br />
===Audio Player===<br />
====Gnome/Xfce====<br />
=====Exaile=====<br />
[[Exaile]] is a music player written in Python that makes use of the GTK+ toolkit. It tries to be close to the popular Amarok, but in GTK. It is in [community], so install with:<br />
pacman -S exaile<br />
<br />
=====Rhythmbox=====<br />
[http://www.gnome.org/projects/rhythmbox/ Rhythmbox] is an integrated music management application, originally inspired by Apple's iTunes. It is free software, designed to work well under the GNOME Desktop, and based on the powerful GStreamer media framework.<br />
<br />
Rhythmbox has a number of features, including:<br />
<br />
* Easy-to-use music browser<br />
* Searching and sorting<br />
* Comprehensive audio format support through GStreamer<br />
* Internet radio support<br />
* Playlists<br />
<br />
To install rhythmbox:<br />
pacman -S rhythmbox<br />
<br />
=====Quod Libet=====<br />
[http://www.sacredchao.net/quodlibet Quod Libet] is a music manager that uses the GStreamer media framework to play audio files. This allows it to play all the file-types that Rhythmbox (which uses GStreamer too) can play. Quod Libet is more suited to non-Gnome desktops since it has a smaller footprint and fewer dependencies than Rhythmbox (Rhythmbox depends on nautilus, which requires a lot of GNOME to be installed).<br />
<br />
In addition to the music player/manager, Quod Libet also includes Ex Falso, a tag editor.<br />
<br />
Quod Libet's features include:<br />
<br />
* Easy-to-use music browser<br />
* Searching<br />
* Comprehensive audio format support through GStreamer<br />
* Easy Playlist management<br />
<br />
To install Quod Libet:<br />
pacman -S quodlibet<br />
<br />
Other good audio players are Banshee and Listen. See [http://gnomefiles.org/ Gnomefiles] to compare them.<br />
<br />
====KDE====<br />
=====Amarok=====<br />
[http://amarok.kde.org/ Amarok] is one of the best audio players and music library systems available for KDE. To install it, simply type the code below.<br />
<br />
pacman -S amarok-base<br />
<br />
====Console====<br />
[http://moc.daper.net/ Moc] is a ncurses-based audio player for the console; another good choice is [http://musicpd.org/ mpd].<br />
<br />
Another excellent choice is [http://freshmeat.net/projects/cmus/ cmus].<br />
<br />
====Other X-based====<br />
(TODO) Xmms, audacious, bmpx.<br />
<br />
===Codecs and other multimedia content types (i686 only) ===<br />
====DVD====<br />
You can use xine-ui, totem-xine, mplayer or kaffeine (just to name three of the big ones) to watch DVDs. The only thing you may miss is libdvdcss. Beware that using it may be illegal in some countries.<br />
<br />
====Flash====<br />
Install the flash plugin using<br />
pacman -S flashplugin<br />
to enable Macromedia (now Adobe) Flash in your browser, if you run KDE you should see this after installing flash. http://wiki.archlinux.org/index.php/Flash_and_Adobe_Acrobat_browser_plugins#Fixing_Flash_in_Konqueror<br />
<br />
====Quicktime====<br />
Quicktime codecs are contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them.<br />
====Realplayer====<br />
The codec for Realplayer 9 is contained in the codecs package. Just type<br />
pacman -S codecs<br />
to install them. Realplayer 10 is available as a binary package for Linux. You can get it from AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=1590&O=0&L=0&C=0&K=realplay&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===CD and DVD Burning===<br />
====GNOME====<br />
=====Brasero=====<br />
[http://www.gnome.org/projects/brasero/ Brasero] is an application that burns CDs/DVDs for the GNOME Desktop. It is designed to be as simple as possible and has some unique features to enable users to create their discs easily and quickly.<br />
<br />
To install:<br />
pacman -S brasero<br />
<br />
====KDE====<br />
=====K3b=====<br />
K3b (from '''K'''DE '''B'''urn '''B'''aby '''B'''urn) is a free software CD and DVD authoring application for GNU/Linux and other <code>UNIX</code>-like operating systems designed for KDE. As is the case with most KDE applications, K3b is written in the C++ programming language and uses the Qt GUI toolkit. K3b provides a graphical user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD/DVD, as well as more advanced tasks such as burning eMoviX CD/DVDs. It can also perform direct disc-to-disc copies. The program has many default settings which can be customized by more experienced users. The actual disc recording in K3b is done by the command line utilities cdrecord or wodim, cdrdao, and growisofs. As of version 1.0, K3b features a built-in DVD ripper.- licensed under the GPL.<br />
<br />
K3b was voted LinuxQuestions.org's Multimedia Utility of the Year (2006) by the majority (70%) of voters. <br />
-----<br />
To install:<br />
pacman -S k3b<br />
<br />
=====(Todo) cdrecord, graveman...=====<br />
<br />
<br />
<br />
<br />
Most CD burners are wrappers for cdrecord:<br />
<br />
pacman -S cdrkit<br />
<br />
If you install packages for CD/DVD burning applications like Brasero or K3B it also installs the CD/DVD burning library for it, like libburn or cdrkit.<br />
<br />
A good command-line DVD-burning tool is growisofs:<br />
<br />
pacman -S dvd+rw-tools<br />
<br />
===TV-Cards===<br />
<br />
There are several things to do if you want to watch TV under (Arch) Linux. The most important task is to find out which chip your tuner is using. However, quite a lot are supported. Be sure to check at a Hardware Database to be sure (see [http://en.opensuse.org/HCL/TV_Cards this list], for example). Once you know your Model, there are just a few steps ahead to get you going.<br />
<br />
In most cases, you will need to use the bttv-drivers (other drivers exist, like [http://linux.bytesex.org/v4l2/drivers.html V4L]) together with the I2C-modules. Configuring those is the hardest task. If you are lucky, a<br />
modprobe bttv<br />
will autodetect the card (check dmesg for results). In that case, you need only to install an application to watch TV. We will look at that later, though.<br />
If the autodetection did not work, you will need to check the file CARDLIST, which is included in the tarball of [http://dl.bytesex.org/releases/video4linux/ bttv] to find out the right parameters for your card. A PV951 without radio support would need this line:<br />
modprobe bttv card=42 radio=0<br />
Some cards need the following line to produce sound:<br />
modprobe tvaudio<br />
However, that varies. So just try it out. Some other cards demand the following line:<br />
modprobe tuner<br />
This is subject to trial-and-error, too.<br />
<br />
TODO: clarify the installation-procedure<br />
<br />
To actually watch TV, install the xawtv-package with<br />
pacman -S xawtv <br />
and read its manpage.<br />
<br />
TODO: clarify some possible problems and procedures. Introduction to XAWTV on another page?<br />
<br />
===Digital Cameras===<br />
Most newer digital cameras are supported as USB mass storage devices, which means that you can simply plug it in and copy the images. Older cameras may use the PTP (Picture Transfer Protocol) which requires a "special driver". gPhoto2 provides this driver and allows a shell-based transfer of the images; digikam (for KDE) and gthumb (for GNOME, gtkam would be another choice) use this driver and offer a nice GUI.<br />
<br />
===USB Memory Sticks / Hard Disks===<br />
USB Memory Sticks and hard disks are supported out of the box with the USB mass storage device driver and will appear as a new SCSI device (/dev/sdX). If you are using KDE or GNOME you should use dbus and hal (add them to your daemons in /etc/rc.conf), and they will be automatically mounted. If you use a different Desktop Environment you may have a look at ivman.<br />
<br />
==Maintaining the system==<br />
===Pacman===<br />
[[Pacman]] is both a binary and source package manager which is able to download, install, and upgrade packages from both remote and local repositories with full dependency handling, and has easy-to-understand tools for crafting your own packages too.<br />
<br />
A more-detailed description of Pacman can be found in [[Pacman|its article]].<br />
<br />
====Useful commands====<br />
To view the options available for a particular operational command, say '''-Q''', just append it with '''-h''':<br />
pacman -Qh<br />
<br />
To synchronize and update the local packages database with the remote repositories (it is a good idea to do this before installing and upgrading packages):<br />
pacman -Sy<br />
<br />
To '''upgrade''' all packages on the system:<br />
pacman -Su<br />
<br />
To sync, update, and '''upgrade''' all the packages on the system with one command:<br />
pacman -Syu<br />
<br />
To install or upgrade a single package or list of packages (including dependencies):<br />
pacman -S packageA packageB<br />
<br />
You can also sync, update the package database, and install packages in one command:<br />
pacman -Sy packageA packageB<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
pacman -R package<br />
<br />
To remove a package and all of the package's dependencies which aren't used by any other installed package:<br />
pacman -Rs package<br />
('''-Rs''' is typically preferred vs '''R''' to remove any package as it will clean up all unused dependencies)<br />
<br />
To remove all of the package's now unneeded dependencies and also instruct pacman to ignore file backup designations. (Normally, when a file is removed from the system the database is checked to see if the file should be renamed with a ".pacsave" extension.):<br />
pacman -Rsn package<br />
<br />
To search the remote (repo) package database for a list of packages matching a given keyword:<br />
pacman -Ss keyword<br />
<br />
To list all packages on your system<br />
pacman -Q<br />
<br />
To list all packages on your system without the version strings, we add the '''-q''' option:<br />
pacman -Qq<br />
<br />
To search (query) the local (your machine) package database for a given package:<br />
pacman -Q package <br />
<br />
To search (query) the local (your machine) package database for a given package and list all pertinent information:<br />
pacman -Qi package<br />
<br />
To list all files installed by a given ''package'':<br />
<tt>pacman -Ql ''package''</tt><br />
Conversely, to find the package that owns a given file (in this example, the ''ls'' executable):<br />
<tt>pacman -Qo /bin/ls</tt><br />
To find all unused packages (orphans):<br />
pacman -Qdt<br />
Missing libraries: Suppose you receive an error message like this:<br />
<tt>mplayer: error while loading shared libraries: ''libgssapi.so.2'': cannot open shared object file: No such file or directory</tt><br />
This may be an indication that a package you have previously installed is now corrupt (some or all of its files are missing). You should try to find the package name that provides the missing shared library. In this example, you could type:<br />
<tt>pacman -Ql | grep ''libgssapi.so.2''</tt><br />
The first column in the output is the package name:<br />
<tt>heimdal /usr/lib/libgssapi.so.2<br />
heimdal /usr/lib/libgssapi.so.2.0.0<br />
</tt><br />
Then, you can just re-install it:<br />
<tt>pacman -Sy heimdal</tt><br />
<br />
To defragment pacman's cache database and optimize for speed:<br />
pacman-optimize<br />
<br />
To count how many packages are currently on your system:<br />
pacman -Q | wc -l<br />
<br />
To install a package compiled from source using ABS and makepkg:<br />
pacman -U packagename.pkg.tar.gz<br />
<br />
Note: There are countless additional pacman functions and commands. Try man pacman and consult the [[pacman]] wiki entries.<br />
<br />
====Files====<br />
There are a number of files left and created by pacman and other programs to facilitate maintenance and to conform to a safe computing practice. When pacman is installing something, the package contains information on whether to back up a particular file. Such files will have the '''.pacsave''' extension. When you force a "NoUpgrade" on a file via [http://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf], it will not be replaced during an upgrade and the new file will come with the '''.pacnew''' extension. For example, you have edited a configuration file thoroughly and you do not want an upgrade of the respective package to replace the file with a new one, we must have the following line in '''/etc/pacman.conf''':<br />
NoUpgrade = /path/to/config/file<br />
To view the differences of the old and new versions of these files, we can either edit them manually or use a '''diff''' utility to take note of the differences. There is an automated tool to find and view such files available from the '''community''' repository:<br />
pacman -S pacman-contrib<br />
cd ~/<br />
pacdiff # as root<br />
There is a bug in the above tool where if you navigate to '''/etc''' and run it from there, the paths will be messed up. We remain on the safer side by being at "home". You may want to run it as user first in case you happen to be a careless person (you may just overwrite or remove files because you ''think'' that is the right way).<br><br />
<br />
There are other types of leftovers depending on the programs available on your system. Some will create backups with a '''.bak''' extension, while others with something like "'''~'''" or "'''-'''". Unfortunately, there is currently no way to "automatically" find and review them. Fear not, as we have no need for automated tools to deal with such trivial tasks. Simply use '''locate''' to search for them:<br />
locate -e *.~ *.- *.bak<br />
And we can use something useful like '''vimdiff''' to look at the differences manually:<br />
pacman -S vim<br />
vimdiff file1 file2<br />
<br />
==Polishing & Further information==<br />
For further information and support you can go to the [http://www.archlinux.org/ homepage], [[Special:Search|search the wiki]], the [http://bbs.archlinux.org/ forums], the [[ArchChannel|IRC channel]], and the [http://www.archlinux.org/mailman/listinfo/ mailing lists].<br />
=====FAQs=====<br />
See [[Arch FAQs for newbies]]<br />
<br />
There is also an [http://bbs.archlinux.org/viewforum.php?id=23 Arch Subforum] devoted to beginners.<br />
<br />
=====Terminology=====<br />
For more information on the jargon used in Arch, look at [[Arch Terminology/Jargon for newbies|this article]].<br />
<br />
=====Where to go from here?=====<br />
<br />
You may also be interested in:<br />
<br />
[[Post Installation Tips]]<br />
<br />
[[ArchLinux User-community Repository (AUR)]]<br />
<br />
[[Get All Mouse Buttons Working]]<br />
<br />
[[Improve Pacman Performance]]<br />
<br />
[[Kernel Compilation]]<br />
<br />
[[Pm-utils]]<br />
<br />
[[Cpufrequtils]]<br />
<br />
[[:Category:Eye candy (English)| Eye Candy]]<br />
<br />
==External links==<br />
* [http://archux.com/page/installation-guide/ Arch Linux installation guide with images and videos]<br />
{{translateme}}</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Fluxbox&diff=47218
Fluxbox
2008-08-06T15:50:37Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Fluxbox}}<br />
{{i18n_entry|Русский|Fluxbox (Русский)}}<br />
{{i18n_entry|Česky|Fluxbox (Česky)}}<br />
{{i18n_entry|Italiano|Fluxbox (Italiano)}}<br />
{{i18n_links_end}}<br />
<br />
===Installing Fluxbox===<br />
Install fluxbox from the repositories. New users may want to also install menumaker and/or fluxconf.<br />
pacman -Sy fluxbox fluxconf<br />
<br />
===Starting Fluxbox===<br />
====Method 1: kdm/gdm====<br />
This will automaticly be added to the session types. Select fluxbox from the menu.<br />
<br />
''Note:'' you will have to have '''login manager''' enabled at first. For instructions how to do that, look [[Adding_a_login_manager_(KDM%2C_GDM%2C_or_XDM)_to_automatically_boot_on_startup|here]].<br />
<br />
====Method 2: xinitrc====<br />
In your home folder add the code below to your .xinitrc file<br />
exec fluxbox <br />
or if you like to use the 'startfluxbox' file use :<br />
exec startfluxbox <br />
It is better to use 'startfluxbox', because only then file ~/.fluxbox/startup file is used.<br />
Remember: there can only be one exec line in your .xinitrc file<br />
<br />
''Note'' : if it crashes on startup, it may be a locale problem.. Setting LC_ALL to the default "C" locale, may avoid this crash. [http://bbs.archlinux.org/viewtopic.php?t=25797 1]<br />
Then you can start fluxbox with startx command.<br />
<br />
===Configuring Fluxbox===<br />
====Menus====<br />
=====Fast method:=====<br />
build in command :<br />
fluxbox-generate_menu<br />
this command will generate a .fluxbox/menu/ file based on your installed programms. There is also "helper / regenerate menu" in the fluxbox menu.<br />
=====MenuMaker=====<br />
Menumaker was moved to unsupported, to install you need download tarball from aur.<br />
wget http://aur.archlinux.org/packages/menumaker/menumaker.tar.gz<br />
tar xvf menumaker.tar.gz<br />
cd menumaker<br />
makepkg<br />
Install it with:<br />
pacman -U menumaker-0.99.7-2-i686.pkg.tar.gz<br />
Modify if necessary.<br />
<br />
Run with:<br />
mmaker -v Fluxbox<br />
<br />
======Archlinux xdg menu======<br />
Requires [http://aur.archlinux.org/packages.php?do_Details=1&ID=10535&O=0&L=0&C=0&K=archlinux-xdg-menu&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=ndarchlinux-xdg-menu Archlinux xdg menu] <br><br />
xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
Tip: replace default xterm/urxvt<br />
sed -i 's/xterm/urxvt/g' ~/.fluxbox/menu<br />
More info<br />
xdg_menu --help<br />
See also: <br />
[[XdgMenu|Archlinux xdg menu]]<br />
<br />
=====Creating a custom menu with fluxconf=====<br />
To start the menu section of fluxconf run:<br />
fluxmenu<br />
In the window you will see three columns: Type, Title, & Command/Comment.<br><br />
Clicking on an entry in this will allow you to edit it.<br><br />
Clicking on "Add sub" will add a submenu.<br><br />
Clicking on "Add exec" will add a command.<br><br />
<br />
the type column has several valid options:<br />
#begin, required to start the menu file. The title option is the menu header.<br><br />
#submenu, a "folder" inside the menu. Title is the name of the submenu.<br><br />
#exec, a command line. Title is what is shown and Command/Comment is the command to be executed.<br />
#separator, a divider in the menu. No arguments to this one.<br />
#workspaces, a list of workspaces and what applications are running on each. Title is what will be shown to the user.<br />
#stylesdir, a directory containing styles. Title is the path to the dir. Recommended that you put this into its own subdirectory as it can get quite large. directories to use: /usr/share/fluxbox/styles ~/.fluxbox/styles .<br />
#config, a menu with many options for configuring behavior of fluxbox. Title is the name of the menu shown to the user.<br />
#reconfig, reloads the config file. Title is the title shown to the user.<br />
#restart, restarts fluxbox. Title is the title shown to the user.<br />
#exit, exit fluxbox, will drop back to the desktop manager or exit X depending on the startup method you used. Title is the title shown to the user.<br />
<br />
Remember to hit save before closing<br />
=====Manualy=====<br />
Use comand:<br />
nano ~/.fluxbox/menu<br />
Then write lines in this style:<br />
[exec] (name) {command}<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
Then done save and exit. There is no need to restart fluxbox.<br />
<br />
====Hotkeys====<br />
Fluxbox offers a basic hotkeys functionality. fluxbox key file is:<br />
~/.fluxbox/keys<br />
Control key is represented by "Control". Mod1 corresponds to Alt and Mod4 corresponds to Meta (not a standard key but many map meta to the win key)<br><br />
<br />
Here is a quick way of controlling your Master volume, using CTRL-ALT+ Arrow up or down:<br />
Control Mod1 Up :Exec amixer sset Master,0 5%+ <br />
Control Mod1 Down :Exec amixer sset Master,0 5%- <br />
<br />
If you installed fluxconf, you may use its method of editing this in GUI with the command:<br />
fluxkeys<br />
<br />
The First text box is for a button and the second is for an action. select execCommand to set a command and put the name of the command into the 3rd text box.<br />
<br />
More functions of this can be used from the 2nd text box (A drop down menu is available)<br />
<br />
====Workspaces====<br />
Fluxbox defaults to having four workspaces available to the user. available with the alt+F1-4 keys or the arrows on the toolbar next to where it says "one"<br><br />
Right clicking on desktop and going to your Workspaces menu (menumaker users: FluxBox>Workspaces, fluxconf users: the workspaces title) will let you interact with the workspaces.<br />
Workspaces Menu:<br />
Icons - shows minimized applications<br />
--separator--<br />
Workspaces names (default: one,two,three,four) - Shows all the applications on that desktop<br />
--separator--<br />
New Workspace - Adds a workspace<br />
Edit Current workspace name - lets you title your workspace whatever you want. Will show up on the left side of the toolbar <br />
Remove Last - Removes the last workspace on the list, dumps all of the applications running on that desktop into the one before it<br />
====Background====<br />
Setting the background requires a background setter you will need to install one of these packages:<br />
*eterm <br />
*feh (lacks menu transparency). <br />
<br />
there are others but these are the most recommended two, to see others check out the fbsetbg documentation in the "Additional Links section"<br />
To set the background:<br />
fbsetbg /path/to/background.image<br />
<br />
You can also add (or modify) the following line to the file ~/.fluxbox/init to something like this:<br />
session.screen0.rootCommand: fbsetbg /path/to/wallpaper<br />
<br />
Or simply:<br />
session.screen0.rootCommand: fbsetbg -l<br />
<br />
<br />
Additional notes for people who like to change wallpaper a lot.<br />
<br />
Place the following submenu in your fluxbox menu<br />
<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
<br />
Then put your background images into ~/.fluxbox/backgrounds or any other folder you specify, they will then appear in the same fashion as your styles.<br />
=====Feh=====<br />
Install feh with:<br />
pacman -S feh<br />
You may add a quick submenu to your ~/.fluxbox/menu file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Wallpaper)<br />
[wallpapers] (/path/to/your/wallpapers) {feh –bg-scale}<br />
[end]<br />
(Note: there are two dashes '--' before 'bg' in the feh --bg-scale command.)<br />
<br />
====Theming====<br />
Links to some theme sites are provided below.<br><br />
To install a theme extract the archive to a stylesdir the default ones are:<br />
*global - /usr/share/fluxbox/styles <br />
*user only - ~/.fluxbox/styles <br />
====Autostarting Applications====<br />
xinitrc users should put all code into their .xinitrc. However, fluxbox provides functionality to autostart applications on its own.<br><br />
The ~/.fluxbox/startup file is a script for autostarting applications as well as starting fluxbox itself.<br><br />
The <nowiki>#</nowiki> symbol denotes a comment.<br><br />
<br />
a sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Additional Links===<br />
<br />
* [http://fluxbox.sourceforge.net/ Fluxbox Homepage]<br />
* [http://gentoo-wiki.com/HOWTO_Fluxbox gentoo-wiki Fluxbox HowTo]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://www.xs4all.nl/~hanb/software/fbsetbg/fbsetbg.html fbsetbg documentation]<br />
* [http://archux.com/page/application-recommendations Application recommendations]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Fluxbox_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=47217
Fluxbox (Русский)
2008-08-06T15:49:31Z
<p>Alsvartr: I retranslated this article from scratch (seems like me and original author were doing translations at the same time :) ). My version is more full and correct.</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Русские_HowTo]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Русский|Fluxbox (Русский)}}<br />
{{i18n_entry|English|Fluxbox}}<br />
{{i18n_entry|Česky|Fluxbox (Česky)}}<br />
{{i18n_entry|Italiano|Fluxbox (Italiano)}}<br />
{{i18n_links_end}}<br />
<br />
===Установка Fluxbox===<br />
Просто проинсталлируйте fluxbox из репозиториев (он находится в Extra). Также некоторым могут пригодиться утилиты для его настройки: menumaker (автоматический генератор меню) и fluxconf (графический конфигуратор).<br />
pacman -Sy fluxbox fluxconf<br />
Menumaker находится в AUR: http://aur.archlinux.org/packages.php?ID=10894<br />
<br />
<br />
===Запуск Fluxbox===<br />
====Способ № 1: kdm/gdm====<br />
Если у вас установлен экранный менеджер (KDM, GDM, XDM), то fluxbox будет автоматически добавлен в его меню.<br />
Инструкции по настройке менеджеров можно найти [[Добавление экранного менеджера входа в систему (KDM, GDM или XDM) в автозагрузку|здесь]].<br />
<br />
====Способ № 2: xinitrc====<br />
В качестве альтернативы можно просто добавить следующий текст в файл .xinitrc:<br />
exec fluxbox <br />
В этом случае fluxbox будет автоматически запущен при запуске X.Org.<br />
Однако, лучше вместо "exec fluxbox" использовать данную команду:<br />
exec startfluxbox <br />
В этом случае будет прочитан и выполнен файл ~/.fluxbox/startup (список команд автозагрузки).<br />
Запомните: в файле .xinitrc команда exec может встречаться только один раз!<br />
<br />
''Примечание'' : если fluxbox "падает" при запуске, то это может быть связано с локалью. Установив переменную LC_ALL в значение по умолчанию, "C", можно избежать "падений"[http://bbs.archlinux.org/viewtopic.php?t=25797 1].<br />
<br />
После добавления нужной строки в .xinitrc можно запустить fluxbox командой startx.<br />
<br />
===Настройка Fluxbox===<br />
====Меню====<br />
=====Быстрый способ=====<br />
встроенная команда<br />
fluxbox-generate_menu<br />
данная команда автоматически сгенерирует файл меню ~/.fluxbox/menu, исходя из установленных у вас программ.<br />
=====MenuMaker=====<br />
Программа Menumaker была перенесена в unsupported, поэтому сначала ее нужно собрать :<br />
wget http://aur.archlinux.org/packages/menumaker/menumaker.tar.gz<br />
tar xvf menumaker.tar.gz<br />
cd menumaker<br />
makepkg<br />
Затем можно установить:<br />
pacman -U menumaker-0.99.7-2-i686.pkg.tar.gz<br />
Имя файла пакета может отличаться.<br />
<br />
Команда запуска:<br />
mmaker -v Fluxbox<br />
<br />
======Archlinux xdg menu======<br />
Требуется [http://aur.archlinux.org/packages.php?do_Details=1&ID=10535&O=0&L=0&C=0&K=archlinux-xdg-menu&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=ndarchlinux-xdg-menu Archlinux xdg menu] <br><br />
xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
Дополнительная информация о программе:<br />
xdg_menu --help<br />
Смотрите также: <br />
[[XdgMenu|Archlinux xdg menu]]<br />
<br />
=====Создание меню вручную с помощью fluxconf=====<br />
Чтобы запустить редактор меню, который входит в состав программы fluxconf, наберите:<br />
fluxmenu<br />
Окно редактора разбито на три колонки: Type, Title и Command/Comment.<br><br />
Поля можно редактировать кликнув по ним.<br><br />
Кнопка "Add sub" позволяет добавить подменю.<br><br />
Кнопка "Add exec" добавит поле для команды.<br><br />
<br />
Колонка Type может принимать следующие значения:<br />
#begin, необходимо для открытия и загрузки, собственно, файла меню. Поле Title в этом случае - заголовок меню.<br><br />
#submenu, Подменю в составе меню. Title - отображаемое название данного подменю.<br><br />
#exec, строка команды. Title - название пункта меню, Command/Comment - команда для запуска.<br />
#separator, разделитель пунктов меню, без дополнительных аргументов.<br />
#workspaces, список рабочих столов и приложений, которые на них запущены. Title - название пункта меню.<br />
#stylesdir, отображает список стилей fluxbox. Title должен принимать значение пути к директории со стилями (например, /usr/share/fluxbox/styles ~/.fluxbox/styles).<br />
#config, меню с настройками для конфигурации fluxbox. В поле Title помещается название данного меню.<br />
#reconfig, повторная загрузка файла конфигурации. Title - название данного пункта меню.<br />
#restart, перезапустить fluxbox. Поле Title аналогично предыдущему.<br />
#exit, выход из fluxbox к окну логина экранного менеджера или к консоли, в зависимости от способа настройки . Title - аналогично предыдущему.<br />
<br />
Не забудьте нажать кнопку Save перед выходом из редактора.<br />
=====Редактирование файла меню вручную=====<br />
Откройте файл меню с помощью любого редактора:<br />
nano ~/.fluxbox/menu<br />
Переходите к редактированию, добавляя новые команды меню:<br />
[exec] (name) {command}<br />
Или создавая подменю:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
Когда закончите редактирование, сохраните файл и выходите из редактора. Перезапускать fluxbox нет необходимости.<br />
<br />
====Горячие клавиши====<br />
Горячие клавиши во fluxbox описываются в файле:<br />
~/.fluxbox/keys<br />
Клавиша Control задается текстом "Control". Alt - "Mod1" и Meta - "Mod4". Meta - это не стандартная клавиша, но многие привязывают ее к клавише win key.<br><br />
<br />
Например, вот быстрый способ контроля уровня звука с помощью комбинации CTRL-ALT+ Стрелка вниз или вверх:<br />
Control Mod1 Up :Exec amixer sset Master,0 5%+ <br />
Control Mod1 Down :Exec amixer sset Master,0 5%- <br />
<br />
Если у вас установлен fluxconf, то вы можете настроить горячие клавиши через графический интерфейс:<br />
fluxkeys<br />
<br />
Первое текстовое поле - для названия клавиши, второе - для действия, совершаемого по нажатию на эту клавишу. Выберите execCommand и впишите название команды в третье поле.<br />
<br />
====Рабочие столы====<br />
По умолчанию во fluxbox используются четыре рабочих стола, по которым можно переключаться с помощью Alt+F1-4 или с помощью стрелок на нижней панели.<br><br />
Щелкнув правой кнопкой мыши и тем самым вызвав меню, можно выбрать в нем пункт Workspaces и увидеть список рабочих столов.<br />
====Фон рабочего стола====<br />
Для установки фона необходима специальная пргорамма, например:<br />
*eterm <br />
*feh <br />
<br />
Есть и другие, но эти - самые часто-используемые. Список других программ можно получить в документации к fbsetbg в секции "Дополнительных ссылок".<br />
Для установки фона выполните:<br />
fbsetbg /путь/к/изображению<br />
<br />
Также можно добавить или изменить нижеследующую строчку в файле ~/.fluxbox/init для автоматической установки фона при логине:<br />
session.screen0.rootCommand: fbsetbg /путь/к/изображению<br />
<br />
Или:<br />
session.screen0.rootCommand: fbsetbg -l<br />
<br />
Это установит фоном последнее изображение, которое вы задавали с помощью fbsetbg.<br />
<br />
Для тех, кто любит часто менять фоновое изображение, возможно поместить следующее подменю в файл меню ~/.fluxbox/menu:<br />
<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
<br />
В данном подменю появится список изображений, наличествующих в вышезаданных директориях.<br />
=====Feh=====<br />
Программу Feh можно установить из репозиториев:<br />
pacman -S feh<br />
<br />
Также можно добавить подменю в файл меню для быстрой смены фона:<br />
[submenu] (Wallpaper)<br />
[wallpapers] (/path/to/your/wallpapers) {feh --bg-scale}<br />
[end]<br />
<br />
====Темы оформления====<br />
Ссылки на ресурсы с темами представлены ниже.<br><br />
Чтобы установить тему, нужно распаковать архив с ней в одну из следующих директорий:<br />
*глобальная установка (для всех пользователей) - /usr/share/fluxbox/styles <br />
*только для вашего пользователя - ~/.fluxbox/styles <br />
====Автозапуск программ====<br />
Существуют два способа автозапуска: помещение названий соответствующих команд в системный файл ~/.xinitrc (выполняется при запуске X.Org) или в файл ~/.fluxbox/startup.<br><br />
<br />
Например:<br />
fbsetbg -l <nowiki>#</nowiki> устанавливает последнее заданное фоновое изображение;<br />
<nowiki>#</nowiki> данная команда очень часто используется пользователями fluxbox<br />
<nowiki>#</nowiki> важно помнить, что для запуска тех программ, которые не завершаются сразу (менеджер рабочего стола и т.п.),<br />
<nowiki>#</nowiki> следует указывать амперсанд (&) в конце строки. <br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> для запуска, собственно, самого fluxbox используется следующая команда (без амперсанда)<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> также можно сохранять лог работы fluxbox следующей командой вместо предыдущей:<br />
exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Дополнительные ссылки===<br />
<br />
* [http://fluxbox.sourceforge.net/ Официальный сайт fluxbox]<br />
* [http://gentoo-wiki.com/HOWTO_Fluxbox настройка fluxbox в gentoo-wiki]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml документация fluxbox в gentoo]<br />
* [http://box-look.org/ темы для fluxbox]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://www.xs4all.nl/~hanb/software/fbsetbg/fbsetbg.html документация fbsetbg]<br />
* [http://archux.com/page/application-recommendations рекомендуемые программы]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Fluxbox_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=47215
Fluxbox (Русский)
2008-08-06T15:42:34Z
<p>Alsvartr: Fluxbox (Russian) moved to Fluxbox (Русский): Due to article naming guideline.</p>
<hr />
<div>{{accuracy}}<br />
{{translateme}}<br />
[[Category:Русский]]<br />
[[Category:Русские_HowTo]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Russian|Fluxbox (Russian)}}<br />
{{i18n_entry|English|Fluxbox}}<br />
{{i18n_entry|Česky|Fluxbox (Česky)}}<br />
{{i18n_entry|Italiano|Fluxbox (Italiano)}}<br />
{{i18n_links_end}}<br />
<br />
===Установка Fluxbox===<br />
Установите fluxbox из репозиториев. Новички могут захотеть также установить редактор меню и/или fluxconf.<br />
pacman -Sy fluxbox fluxconf<br />
<br />
===Запуск Fluxbox===<br />
====Метод 1: kdm/gdm====<br />
Fluxbox будет автоматически добавлен. Просто выберите fluxbox из меню.<br />
<br />
''Замечание:'' в первую очередь у вас должен быть установлен '''менеджер входа в систему'''. Для дальнейших инструкций смотрите [[Добавление_экранного_менеджера_входа_в_систему_%28KDM%2C_GDM_или_XDM%29_в_автозагрузку|специальную статью]].<br />
<br />
====Метод 2: xinitrc====<br />
В вашей домашней папке добавьте в ваш файл .xinitrc следующую строчку<br />
exec fluxbox <br />
или же<br />
exec startfluxbox <br />
Лучше выбрать 'startfluxbox', потому что только тогда файл ~/.fluxbox/startup будет использоваться.<br />
Помните: в вашем файле .xinitrc может быть только одна строчка exec<br />
<br />
''Замечание'' : если в итоге все падает при запуске, это может быть локальная проблема. Настройка LC_ALL в стандартный "C", может исправить эту проблему. [http://bbs.archlinux.org/viewtopic.php?t=25797 1]<br />
Теперь вы можете запускать fluxbox командой startx.<br />
<br />
===Настройка Fluxbox===<br />
====Меню====<br />
=====Быстрый метод:=====<br />
введите следующую команду :<br />
fluxbox-generate_menu<br />
эта команда сгенерирует файл .fluxbox/menu/. Также можно использовать "helper / regenerate menu" в вашем меню fluxbox.<br />
=====Редактор меню=====<br />
Редактор меню теперь в unsupported, чтобы установить его, нужно скачать тарбол из aur.<br />
wget http://aur.archlinux.org/packages/menumaker/menumaker.tar.gz<br />
tar xvf menumaker.tar.gz<br />
cd menumaker<br />
makepkg<br />
И установить:<br />
pacman -U menumaker-0.99.7-2-i686.pkg.tar.gz<br />
При необходимости поменяйте.<br />
<br />
Запускаем:<br />
mmaker -v Fluxbox<br />
<br />
======Archlinux xdg меню======<br />
Потребуется [http://aur.archlinux.org/packages.php?do_Details=1&ID=10535&O=0&L=0&C=0&K=archlinux-xdg-menu&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=ndarchlinux-xdg-menu Archlinux xdg меню] <br><br />
xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
Совет: переместите xterm/urxvt по умолчанию<br />
sed -i 's/xterm/urxvt/g' ~/.fluxbox/menu<br />
Больше информации<br />
xdg_menu --help<br />
Также смотрите: <br />
[[XdgMenu|Archlinux xdg menu]]<br />
<br />
=====Создание собственного меню в fluxconf=====<br />
Запустите секцию меню fluxconf:<br />
fluxmenu<br />
В окне вы увидите три колонки: Type, Title, & Command/Comment.<br><br />
Щелчок на элементе позволит редактировать его.<br><br />
Щелчком на "Add sub" вы добавите субменю.<br><br />
Щелчком на "Add exec" вы добавите команду.<br><br />
<br />
Тип колонки имеет несколько опций:<br />
#begin, необходимость старта файла меню. Title - опция заголовка меню.<br><br />
#submenu, "папка" в меню. Title - опция имен субменю.<br><br />
#exec, командная строка. Title - то что будет показано и Command/Comment - команда, которая будет запускаться.<br />
#separator, разделитель меню.<br />
#workspaces, список рабочих мест и приложений, запущенных на них. Title - то, что будет показано юзеру.<br />
#stylesdir, папка, содержащая стили. Title - путь к папке. Рекомендуется в собственную субдиректорию, поскольку она может стать весьма большой. Используемые директории: /usr/share/fluxbox/styles ~/.fluxbox/styles .<br />
#config, меню со множеством опций поведения fluxbox. Title - имя меню, показываемое пользователю.<br />
#reconfig, перезагрузить файлы конфигурации. Title - заголовок, показываемый пользователю.<br />
#restart, перезапустить fluxbox. Title - заголовок, показываемый пользователю.<br />
#exit, выйти из fluxbox, перенесет обратно к менеджеру рабочего стола или выйдет из X в зависимости от используемого метода. Title - тут уж сами догадайтесь =).<br />
<br />
Не забудьте сохранить перед выходом!<br />
=====Ручной способ=====<br />
Отредактируйте файл меню:<br />
nano ~/.fluxbox/menu<br />
Записывайте строчки в таком стиле:<br />
[exec] (name) {command}<br />
Если вы хотите добавить субменю, добавьте:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
Когда закончите, сохраните и выйдете. Вам не нужно перезагружать fluxbox.<br />
<br />
====Горячие клавиши====<br />
Fluxbox предлагает базовые возможности горячих клавиш. Горячие клавиши находятся здесь:<br />
~/.fluxbox/keys #а вовсе не на клавиатуре, как вы могли бы подумать =)<br />
Управляющие клавиши представлены в разделе "Control". Mod1 соответствует Alt и Mod4 соответствует Meta (это не стандартная клавиша, но многие клавишу win)<br><br />
<br />
Это быстрый способ управления вашим Master звуком, используя CTRL-ALT+ вверх или вниз:<br />
Control Mod1 Up :Exec amixer sset Master,0 5%+ <br />
Control Mod1 Down :Exec amixer sset Master,0 5%- <br />
<br />
Ежели у вас установлен fluxconf, вы можете использовать GUI для настройки клавиш:<br />
fluxkeys<br />
<br />
Первое текстовове поле для обозначения клавиш и второе для обозначения действия. Выберете execCommand для установки команды и запишите имя команды в третье текстовое поле.<br />
<br />
Больше функций вы можете использовать во втором текстовом поле (благодаря выпадающему вниз меню)<br />
<br />
====Рабочие места====<br />
Fluxbox defaults to having four workspaces available to the user. available with the alt+F1-4 keys or the arrows on the toolbar next to where it says "one"<br><br />
Right clicking on desktop and going to your Workspaces menu (menumaker users: FluxBox>Workspaces, fluxconf users: the workspaces title) will let you interact with the workspaces.<br />
Workspaces Menu:<br />
Icons - shows minimized applications<br />
--separator--<br />
Workspaces names (default: one,two,three,four) - Shows all the applications on that desktop<br />
--separator--<br />
New Workspace - Adds a workspace<br />
Edit Current workspace name - lets you title your workspace whatever you want. Will show up on the left side of the toolbar <br />
Remove Last - Removes the last workspace on the list, dumps all of the applications running on that desktop into the one before it<br />
====Background====<br />
Setting the background requires a background setter you will need to install one of these packages:<br />
*eterm <br />
*feh (lacks menu transparency). <br />
<br />
there are others but these are the most recommended two, to see others check out the fbsetbg documentation in the "Additional Links section"<br />
To set the background:<br />
fbsetbg /path/to/background.image<br />
<br />
You can also add (or modify) the following line to the file ~/.fluxbox/init to something like this:<br />
session.screen0.rootCommand: fbsetbg /path/to/wallpaper<br />
<br />
Or simply:<br />
session.screen0.rootCommand: fbsetbg -l<br />
<br />
<br />
Additional notes for people who like to change wallpaper a lot.<br />
<br />
Place the following submenu in your fluxbox menu<br />
<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
<br />
Then put your background images into ~/.fluxbox/backgrounds or any other folder you specify, they will then appear in the same fashion as your styles.<br />
=====Feh=====<br />
Install feh with:<br />
pacman -S feh<br />
You may add a quick submenu to your ~/.fluxbox/menu file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Wallpaper)<br />
[wallpapers] (/path/to/your/wallpapers) {feh –bg-scale}<br />
[end]<br />
(Note: there are two dashes '--' before 'bg' in the feh --bg-scale command.)<br />
<br />
====Theming====<br />
Links to some theme sites are provided below.<br><br />
To install a theme extract the archive to a stylesdir the default ones are:<br />
*global - /usr/share/fluxbox/styles <br />
*user only - ~/.fluxbox/styles <br />
====Autostarting Applications====<br />
xinitrc users should put all code into their .xinitrc. However, fluxbox provides functionality to autostart applications on its own.<br><br />
The ~/.fluxbox/startup file is a script for autostarting applications as well as starting fluxbox itself.<br><br />
The <nowiki>#</nowiki> symbol denotes a comment.<br><br />
<br />
a sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Additional Links===<br />
<br />
* [http://fluxbox.sourceforge.net/ Fluxbox Homepage]<br />
* [http://gentoo-wiki.com/HOWTO_Fluxbox gentoo-wiki Fluxbox HowTo]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://www.xs4all.nl/~hanb/software/fbsetbg/fbsetbg.html fbsetbg documentation]<br />
* [http://archux.com/page/application-recommendations Application recommendations]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Installing_VMware_Player&diff=47073
Installing VMware Player
2008-08-05T01:27:16Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:Emulators (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Installing_vmware_player}}<br />
{{i18n_entry|Русский|Installing_vmware_player (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
<br />
== Background ==<br />
The quickest and easiest way I've found to install vmware player under Arch<br />
<br />
This WIKI was done for vmwareplayer 1.03 with Kernel 2.6.20<br />
<br />
The package names will change for later versions, please substitute the new names at that point.<br />
<br />
For this exercise download all files needed and place them in a directory called ~/pkgbuild<br />
<br />
You don't need to download the vmware-player and kernel modules yourself, as the makepkg script will do that for itself.<br />
<br />
TIP: If you have already downloaded one/both of these 'large files', just place them into their respective directories,which will be referred to below as:<br />
<br />
~/pkgbuild/vmware-player-modules/ and ~/pkgbuild/vmware-player/ <br />
<br />
<br />
<br />
== VMWARE-PLAYER-MODULES ==<br />
<br />
Setting up vmware-player-modules<br />
<br />
You will need to visit the vmware-player-modules page on the AUR site and download vmware-player-modules.tar.gz<br />
<br />
http://aur.archlinux.org/packages/vmware-player-modules/vmware-player-modules.tar.gz<br />
Extract them into:<br />
<br />
~/pkgbuild/vmware-player-modules/<br />
<br />
cd ~/pkgbuild/vmware-player-modules/<br />
<br />
makepkg<br />
<br />
this will download the files needed and make a file called something similar to:<br />
<br />
~/pkgbuild/vmware-player-modules/vmware-player-modules-1.0.3_34682-2.pkg.tar.gz<br />
<br />
This file will now be installed with pacman:<br />
<br />
pacman -A ~/pkgbuild/vmware-player-modules/vmware-player-modules-1.0.3_34682-2.pkg.tar.gz<br />
<br />
If all went well the vmware kernel modules will now be installed.<br />
<br />
<br />
== VMWARE-PLAYER ==<br />
<br />
<br />
Next we need to setup vmware player:<br />
<br />
You will need to visit the vmware-player page on the AUR site and download vmware-player.tar.gz<br />
<br />
http://aur.archlinux.org/packages/vmware-player/vmware-player.tar.gz<br />
<br />
Extract them into:<br />
~/pkgbuild/vmware-player<br />
<br />
cd ~/pkgbuild/vmware-player/<br />
<br />
makepkg<br />
<br />
this will download the files needed and make a file called something similar to:<br />
<br />
~/pkgbuild/vmware-player/vmware-player-1.0.3_34682-1.pkg.tar.gz<br />
<br />
This file will now be installed with pacman:<br />
<br />
pacman -A ~/pkgbuild/vmware-player/vmware-player-1.0.3_34682-1.pkg.tar.gz<br />
<br />
If all went well the vmware player will now be installed.<br />
<br />
<br />
== NOTE: ==<br />
<br />
You need to configure VMware Player by invoking /usr/bin/vmware-config.pl<br />
<br />
Also, you should add vmware to the DAEMONS array in /etc/rc.conf<br />
<br />
'''->''' ''concerns arch64 only:''<br />
in case you get this error when loading an .vmx file: <br><tt>/usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libXtst.so.6: wrong ELF class: ELFCLASS64</tt><br />
<br />
make sure that lib32-libxtst [found in community repo] is installed.<br />
<br />
(edited 3/16/08)<br />
<br />
== FUTURE KERNEL UPDATES: ==<br />
<br />
If there is a kernel update in the future and vmwareplayer will not load:<br />
<br />
you will have to recompile the modules package<br />
<br />
you don't need to download the vmware-player-modules.tar.gz again, only if it has changes<br />
<br />
You can search at http://aur.archlinux.org/packages.php for vmware-player-modules<br />
<br />
Then cd ~/pkgbuild/vmware-player-modules/<br />
<br />
run:<br />
makepkg<br />
<br />
Then install the package with pacman -U<br />
<br />
pacman -U ~/pkgbuild/vmware-player-modules/vmware-player-modules-1.0.3_34682-2.pkg.tar.gz<br />
<br />
Thanking pizzapunk who kindly helped me with my vmware-player installation.<br />
<br />
<br />
<br />
--[[User:Habtool|habtool]] 11:13, 20 February 2007 (EST)</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Installing_VMware_Player_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=47072
Installing VMware Player (Русский)
2008-08-05T01:26:42Z
<p>Alsvartr: New page: Category:Эмуляция Category:Русский {{i18n_links_start}} {{i18n_entry|English|Installing_vmware_player}} {{i18n_entry|Русский|Installing_vmware_player (Рус...</p>
<hr />
<div>[[Category:Эмуляция]]<br />
[[Category:Русский]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Installing_vmware_player}}<br />
{{i18n_entry|Русский|Installing_vmware_player (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
<br />
== Предисловие ==<br />
Ниже представлен, возможно, самый быстрый способ установки vmware player на ArchLinux.<br />
<br />
Данное руководство было написано для версий vmware player 1.03 и ядра 2.6.20. Однако, актуально и для более поздних версий.<br />
<br />
Названия и версии пакетов в данном руководстве могут отличаться от актуальных.<br />
<br />
Вам потребуется скачать нужные для сборки файлы и поместить их в директорию ~/pkgbuild или в другую на ваше усмотрение.<br />
<br />
Нет необходимости скачивать vmware-player и его модули для ядра самостоятельно, это будет сделано автоматически при вызове makepkg.<br />
<br />
Замечание: если у вас уже имеются один или оба этих больших файла, просто поместите их в соответствующие директории. Например:<br />
<br />
~/pkgbuild/vmware-player-modules/ и ~/pkgbuild/vmware-player/ <br />
<br />
<br />
<br />
== Установка vmware-player-modules ==<br />
<br />
Необходимо скачать архив vmware-player-modules.tar.gz со страницы vmware-player-modules в AUR. Данный архив содержит инструкции для сборки и нужные патчи. Ссылка:<br />
<br />
http://aur.archlinux.org/packages/vmware-player-modules/vmware-player-modules.tar.gz<br />
<br />
Далее распакуйте архив сюда:<br />
<br />
~/pkgbuild/vmware-player-modules/<br />
<br />
и выполните:<br />
<br />
<pre><br />
cd ~/pkgbuild/vmware-player-modules/<br />
<br />
makepkg<br />
</pre><br />
<br />
таким образом, все нужные для сборки файлы скачаются и создастся пакет с, например, таким именем:<br />
<br />
~/pkgbuild/vmware-player-modules/vmware-player-modules-1.0.3_34682-2.pkg.tar.gz<br />
<br />
Этот пакет следует установить с помощью pacman:<br />
<br />
<pre><br />
pacman -A ~/pkgbuild/vmware-player-modules/vmware-player-modules-1.0.3_34682-2.pkg.tar.gz<br />
</pre><br />
<br />
Если все прошло хорошо, значит пакет vmware-player-modules установлен.<br />
<br />
<br />
<br />
== Установка vmware-player ==<br />
<br />
Как и в предыдущий раз, нужно скачать архив (vmware-player.tar.gz) со страницы AUR:<br />
<br />
http://aur.archlinux.org/packages/vmware-player/vmware-player.tar.gz<br />
<br />
И распаковать сюда:<br />
~/pkgbuild/vmware-player<br />
<br />
Далее:<br />
<pre><br />
cd ~/pkgbuild/vmware-player/<br />
<br />
makepkg<br />
</pre><br />
<br />
В результате появится пакет:<br />
<br />
~/pkgbuild/vmware-player/vmware-player-1.0.3_34682-1.pkg.tar.gz<br />
<br />
Устанавливаем:<br />
<br />
<pre><br />
pacman -A ~/pkgbuild/vmware-player/vmware-player-1.0.3_34682-1.pkg.tar.gz<br />
</pre><br />
<br />
<br />
<br />
== Конфигурация ==<br />
<br />
Для конфигурации VMware Player нужно запустить скрипт по адресу /usr/bin/vmware-config.pl<br />
<br />
Также следует добавить vmware в строку загружаемых демонов (DAEMONS) в файле /etc/rc.conf<br />
<br />
'''->''' ''для пользователей arch64:'' Если при попытке загрузить файл .vmx возникает следующая ошибка:<br />
<br />
<pre><br />
/usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libXtst.so.6: wrong ELF class: ELFCLASS64<br />
</pre><br />
<br />
убедитесь, что пакет lib32-libxtst (находится в community) установлен.<br />
<br />
<br />
<br />
== Обновления ядра ==<br />
<br />
В случае установки новой версии ядра системы, vmware может перестать загружаться.<br />
<br />
В этом случае нужно пересобрать vmware-player-modules</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=CUPS&diff=47057
CUPS
2008-08-05T00:30:47Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:Printers (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|CUPS}}<br />
{{i18n_entry|Рolski|CUPS (Polski)}}<br />
{{i18n_entry|Русский|CUPS (Русский)}}<br />
{{i18n_links_end}}<br />
=Introduction=<br />
<br />
==What is CUPS?==<br />
<br />
Straight from the CUPS website: "The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments. It is based on the "Internet Printing Protocol" and provides complete printing services to most Postscript and raster printers. CUPS is provided under the GNU GPL..." Although there are other printing packages such as LPRNG, CUPS is quite popular and relatively easy to use. It is the default printing system on Arch Linux as well as many other Linux distributions.<br />
<br />
==Troubleshooting CUPS & components==<br />
<br />
The best way to get printing working is to set 'LogLevel' in '/etc/cups/cupsd.conf' to:<br />
<pre><br />
LogLevel debug2<br />
</pre><br />
And then viewing the output from '/var/log/cups/error_log' like this:<br />
<pre><br />
# tail -n 100 -f /var/log/cups/error_log<br />
</pre><br />
The characters at the left of the output stands for:<br />
<pre><br />
D = Debug<br />
E = Error<br />
I = Information<br />
etc...<br />
</pre><br />
These files may also prove useful.<br />
<pre><br />
/var/log/cups/page_log 'spits out a new entry each time a print is successful.'<br />
/var/log/cups/access_log 'lists all cupsd http1.1 server activity'<br />
</pre><br />
<br />
Of course it's important to know how CUPS work if you want to solve your problems, this is somewhat correct:<br />
<br />
# An application sends a .ps file (PostScript, a script language that details how the page will look) to CUPS when you select 'print' (99% of apps do).<br />
# CUPS then looks at your printers PPD file (printer description file) and figures out what filters it needs to use to convert the .ps file to a language that the printer understands (like PJL,PCL). Usually it needs ghostscript.<br />
# GhostScript takes the input and figures out which filters it should use, then applies them and converts the .ps file to a format understood by the printer.<br />
# Then it is sent to the backend. For example, if you have your printer connected to a USB port, it uses the USB backend.<br />
<br />
Print a document and watch 'error_log' to get a more detailed and correct image of the printing process.<br />
<br />
=Installing CUPS=<br />
<br />
==Packages==<br />
<br />
You will need CUPS and Ghostscript for sure:<br />
# pacman -S cups ghostscript gsfonts<br />
<br />
* <b>cups</b> - The actual CUPS software<br />
* <b>ghostscript</b> - An interpreter for the Postscript language<br />
* <b>gsfonts</b> - Ghostscript standard Type1 fonts<br />
<br />
<br />
Some of the following driver packages, it depends on the printer you own. If unsure, install gutenprint.<br />
<br />
* <b>gutenprint</b> - A collection of high quality drivers for Canon, Epson, Lexmark, Sony, Olympus, and PCL printers for use with Ghostscript, CUPS, Foomatic, and the Gimp.<br />
* <b>foomatic</b>, <b>foomatic-db</b>, <b>foomatic-db-engine</b>, <b>foomatic-db-ppd</b> and <b>foomatic-filters</b> - Foomatic is a database-driven system for integrating free software printer drivers with common spoolers under Unix<br />
* Installing <b>foomatic-filters</b> should solve your problems if the cups error_log is reporting "stopped with status 22!"<br />
* <b>hplip</b> - HP Linux inkjet driver. Provides support for DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet printer models.<br />
* <b>cups-pdf</b> - A nice package that allows one to setup a virtual PDF Printer that generates a PDF out of anything sent to it.<br />
<br />
<br />
If your system is connected to a networked printer using the samba protocol or if the system is to be a print server for Windows clients:<br />
# pacman -S samba<br />
<br />
==Download Printer PPD==<br />
<br />
Depending on your printer, this step is optional and may not be needed, as the standard CUPS installation already comes with quite a few PPD (Postscript Printer Description) files. Moreover, the <i>foomatic-filters</i>, <i>gimp-print</i> and <i>hplip</i> packages already include quite a few PPD files which will automatically be detected by CUPS.<br />
<br />
<br />
Here's an explanation of what a PPD file is from the Linux Printing website: "For every PostScript printer the manufacturers provide a PPD file which contains all printer-specific information about the particular printer model: Basic printer capabilities as whether the printer is a color printer, fonts, PostScript level, etc., and especially the user-adjustable options, as paper size, resolution, etc."<br />
<br />
<br />
*To get the PPD file for your printer, go to http://www.linuxprinting.org/printer_list.cgi and select the manufacturer and model of your printer.<br />
<br />
<br />
*Now, you will need to copy the file to the cups folder so it can detect the file. If you are in the folder where you downloaded the PPD file, you can use the following command:<br />
<br />
<pre><br />
# cp your_printer.ppd /usr/share/cups/model/<br />
</pre><br />
<br />
<br />
If you cannot find your printer on the website, you may want to try similar models or using generic printer drivers. Just do some googling or ask your manufacturer (good luck with that).<br />
<br />
=Configuring Cups=<br />
<br />
==Options==<br />
<br />
Now that you have cups installed, you have a variety of options on how to setup CUPS. You can always use the tried and true command line. Likewise, various desktop environments such as GNOME and KDE have useful programs that can help you manage your printers. However, in order to make this process easy for the largest amount of users, we will use the web interface provided by CUPS.<br />
<br />
Please note that if you are planning on connecting to a network printer, rather than one that is directly connected to your computer, you may wish to jump to the Printer Sharing section first. Linux to Linux printer sharing is quite easy and involves very little configuration. Windows to Linux and vice-versa requires a little bit more effort, but is relatively easy as well.<br />
<br />
==Kernel Modules==<br />
<br />
Before we can use the CUPS web interface, we must install the appropriate kernel modules. The following are steps that I got from the Gentoo Printing Guide. <br />
===USB printers===<br />
If you want to use a USB printer with a 2.6.x kernel, use the following command:<br />
<br />
<pre><br />
# modprobe usblp<br />
</pre><br />
<br />
If you are using a USB printer and a 2.4.x kernel, use the following command:<br />
<br />
<pre><br />
# modprobe printer<br />
</pre><br />
<br />
Note, this assumes that you are using the stock kernels from Arch Linux. If you custom-rolled your own, you may need to run this first:<br />
<br />
<pre><br />
# modprobe usbcore<br />
</pre><br />
<br />
Once you have the modules installed, you should plug in your printer and check if the kernel detected it by running the following:<br />
<br />
<pre><br />
# tail /var/log/messages.log<br />
</pre><br />
<br />
or<br />
<br />
<pre><br />
# dmesg<br />
</pre><br />
<br />
<br />
You should see something like this:<br />
<br />
<pre><br />
Feb 19 20:17:11 kernel: printer.c: usblp0: USB Bidirectional<br />
printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300E<br />
Feb 19 20:17:11 kernel: usb.c: usblp driver claimed interface cfef3920<br />
Feb 19 20:17:11 kernel: printer.c: v0.13: USB Printer Device Class driver<br />
</pre><br />
<br />
===Parallel port printers===<br />
If you plan on using a parallel port printer, the configuration is pretty much the same. Kernel 2.6.x users have to first type in:<br />
<br />
<pre><br />
# modprobe lp<br />
</pre><br />
<br />
And then both 2.4.x and 2.6.x kernel users can enter in:<br />
<br />
<pre><br />
# modprobe parport<br />
# modprobe parport_pc<br />
</pre><br />
<br />
Once again, you can check your setup by running:<br />
# tail /var/log/messages.log<br />
You should see something like this:<br />
<br />
<pre><br />
lp0: using parport0 (polling).<br />
</pre><br />
<br />
<br />
Note: Installing my Brother HL 1250 I found that permissions for the device won't let CUPS write on the device, so it doesn't print. To fix it:<br />
<br />
<pre><br />
[root@mihal ~]# ls /dev/usb/<br />
lp0<br />
[root@mihal ~]# chgrp lp /dev/usb/lp0<br />
<br />
</pre><br />
<br />
===Auto-loading===<br />
You may also want to have the system automatically load the kernel module every time the computer starts up. To do this use your favorite text editor to open up <code>/etc/rc.conf</code> and add the appropriate module to the <i>MODULES=()</i> line. Here's a portion of the text from my <code>rc.conf</code> file:<br />
<br />
<pre><br />
MODULES=(!usbserial scsi_mod sd_mod snd-ymfpci snd-pcm-oss lp parport parport_pc ide-scsi)<br />
</pre><br />
<br />
==CUPS Daemon==<br />
<br />
With the kernel modules installed, you are now ready to start the actual CUPS daemon. To do this, simply run this command:<br />
<br />
<pre><br />
# /etc/rc.d/cups start<br />
</pre><br />
<br />
If you want to have cups start up automatically every time you start your computer, then you need to add it to your DAEMONS=() line in the <code>/etc/rc.conf</code> file. For example:<br />
<br />
<pre><br />
DAEMONS=(pcmcia syslogd klogd !fam esd mono network autofs cups crond gdm)<br />
</pre><br />
<br />
==Web Interface and tool kit.==<br />
<br />
Once the daemon is running, if a web interface is available. Open up your browser and go to:<br />
<br />
<i>http://localhost:631</i><br />
<br />
(You may need to replace ''localhost'' with your hostname found in <code>/etc/hosts</code>)<br />
<br />
'''or''' install "GNOME CUPS Manager" GUI frontend (see Appendix: A.1 [http://wiki.archlinux.org/index.php/CUPS_Setup#Alternative_CUPS_Interfaces Alternative CUPS Interfaces])<br />
<br />
From here, all you have to do is follow the various wizards to add your printer. To setup my Samsung ML-1250 printer, I started out by clicking on <i>Manage Printers</i>, and then <i>Add Printer</i>. I was then prompted for a username and password. I just logged in as root. I entered in ml1250 for my printer name, My Room for location and then Peter's Samsung ML-1250 Laster Printer for description. Next you will select the device. Since my printer is a USB device, I just selected <i>USB Printer #1</i>. The name of my printer also showed up next to the label <i>USB Printer #1</i>, so look for that. Next, I simply chose the appropriate drivers and the installation was complete.<br />
<br />
Once the installation is complete, you can test your configuration by pressing the Print Test Page button.<br />
<br />
=Printer Sharing=<br />
<br />
==Linux to Linux==<br />
<br />
Once you have CUPS setup on your Linux print server, sharing the printer with another Linux box is relatively easy. There are several ways to configure such a scenario -- here we will describe the manual setup. On the server computer (the one managing and connecting to the printer) simply open up <code>/etc/cups/cupsd.conf</code> and allow access to the server by modifying the location lines. For instance:<br />
<br />
<pre><br />
<Location /><br />
Order Deny,Allow<br />
Deny From All<br />
Allow From 127.0.0.1<br />
Allow From 10.0.0.*<br />
</Location><br />
</pre><br />
<br />
You will also need to make sure the server is listening on the IP address your client will be addressing. Add the following line after "Listen localhost:631":<br />
<br />
<pre><br />
Listen 10.0.0.1:631<br />
</pre><br />
<br />
using your server's IP address instead of 10.0.0.1.<br />
<br />
Add the IP address of the client computer by doing Allow From client_ip_address. After you make your modifications, you will want to restart CUPS by doing:<br />
<br />
<pre><br />
# /etc/rc.d/cups restart<br />
</pre><br />
<br />
On the client side, open up <code>/etc/cups/client.conf</code> and edit the ServerName option to match the IP address or the name of your server. For instance, I named my server beast and have an entry in my hosts file to point to it. So in my <code>client.conf</code> file, I just edited this line:<br />
<br />
<pre><br />
ServerName beast<br />
</pre><br />
<br />
Next, run the following command to update the client computer:<br />
<br />
<pre><br />
# lpq<br />
</pre><br />
<br />
You should see something like this:<br />
<br />
<pre><br />
ml1250 is ready<br />
no entries<br />
</pre><br />
<br />
There are more configuration possibilities including an automatic configuration which are described in detail on http://localhost:631/sam.html#CLIENT_SETUP (this link works on your printer server).<br />
<br />
When prompted for username and password, use root to access.<br />
Then follow the instructions from here<br />
http://www.digitalhermit.com/linux/printing/<br />
if it's a TCP/IP printer, use JetDirect.<br />
<br />
That's it for Linux to Linux printer sharing.<br />
<br />
==Linux to Windows==<br />
<br />
If you are connected to a Windows print server (or any other Samba capable print server), you can skip the section about kernel modules and such. All you have to do is start the CUPS daemon and complete the web interface as specified in section 3.3 and 3.4. Before this, you need to activate the Samba CUPS backend. You can do this by entering the following command:<br />
<br />
<pre><br />
# ln -s `which smbspool` /usr/lib/cups/backend/smb<br />
</pre><br />
<br />
Note that the symbol before is ` (underneath the ~ on a standard US keyboard) and not '. After this, you will have to restart CUPS using the command specified in the previous section. Next, simply log in on the CUPS web interface and choose to add a new printer. For device, there should be an option that says something to the effect of "Windows Printer Via Samba" near the button of the device list. For the device location, enter:<br />
<br />
<pre><br />
smb://username:password@hostname/printer_name<br />
</pre><br />
<br />
Or without a password:<br />
<br />
<pre><br />
smb://username@hostname/printer_name<br />
</pre><br />
<br />
Make sure that the user actually has access to the printer on the Windows computer. Select the appropriate drivers and that's about it. If the computer is located on a domain, make sure the username includes the domain: <br />
<pre><br />
smb://username:password@domain/hostname/printer_name<br />
</pre><br />
<br />
Note: If your network contains many printers, use "lpoptions -d your_desired_default_printer_name" to set your preferred printer<br />
<br />
Note: I, thepizzaking, was having 'NT_STATUS_ACCESS_DENIED' errors and to fix them I needed to use a slightly different syntax:<br />
<pre><br />
smb://workgroup/username:password@hostname/printer_name<br />
</pre><br />
<br />
==Windows to Linux==<br />
<br />
Sometimes you might want to allow a Windows computer to connect to your Linux server. There are a few ways to do this, and the one I am most familiar with is using Samba. In order to do this, you will have to edit your <code>/etc/samba/smb.conf</code> file to allow access to your printers. Your <code>smb.conf</code> can look something like this:<br />
<br />
<pre><br />
[global]<br />
workgroup = Heroes<br />
server string = Arch Linux Print Server<br />
security = user<br />
<br />
[printers]<br />
comment = All Printers<br />
path = /var/spool/samba<br />
browseable = yes<br />
# to allow user 'guest account' to print.<br />
guest ok = no<br />
writable = no<br />
printable = yes<br />
create mode = 0700<br />
write list = @adm root neocephas<br />
</pre><br />
<br />
That should be enough to share your printer, but you just might want to add an individual printer entry:<br />
<br />
<pre><br />
[ML1250]<br />
comment = Samsung ML-1250 Laser Printer<br />
printer=ml1250<br />
path = /var/spool/samba<br />
printing = cups<br />
printable = yes<br />
printer admin = @admin root neocephas<br />
user client driver = yes<br />
# to allow user 'guest account' to print.<br />
guest ok = no<br />
writable = no<br />
write list = @adm root neocephas<br />
valid users = @adm root neocephas<br />
</pre><br />
<br />
Please note that in my configuration I made it so that users must have a valid account to access the printer. To have a public printer, set ''guest ok'' to ''yes'', and remove the ''valid users'' line. To add accounts, you must set up a regular Linux account and then set up a Samba password on the server. For instance:<br />
<br />
<pre><br />
# useradd neocephas<br />
# smbpasswd -a neocephas<br />
</pre><br />
<br />
After setting up any user accounts that you need, you will also need to set up the samba spool directory:<br />
<br />
<pre><br />
# mkdir /var/spool/samba<br />
# chmod 777 /var/spool/samba<br />
</pre><br />
<br />
The next items that need changing are <code>/etc/cups/mime.convs</code> and <code>/etc/cups/mime.types</code>:<br />
<br />
<code>mime.convs</code>:<br />
<pre><br />
# The following line is found at near the end of the file. Uncomment it.<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
</pre><br />
<br />
<code>mime.types</code>:<br />
<pre><br />
# Again near the end of the file.<br />
application/octet-stream<br />
</pre><br />
<br />
The changes to <code>mime.convs</code> and <code>mime.types</code> are needed to make CUPS print Microsoft Office document files. Many people seem to need that.<br />
<br />
After this, restart your Samba daemon:<br />
<br />
<pre><br />
# /etc/rc.d/samba restart<br />
</pre><br />
<br />
Obviously there are a lot of tweaks and customizations that can be done with setting up a Samba print server, so I advise you to look at the Samba and CUPS documentation for more help. The <code>smb.conf.example</code> file also has some good samples to that you might want to look at.<br />
<br />
==Windows 2000 and Windows XP to Linux==<br />
<br />
For the most modern flavors of Windows, an alternative way of connecting to your Linux printer server is to use the CUPS protocol directly. The Windows client will need to be using Windows 2000 or Windows XP. Make sure you allow the clients to access the print server by editing the location settings as specified in section 4.1.<br />
<br />
On the Windows computer, go to the printer control panel and choose to Add a New Printer. Next, choose to give a URL. For the URL, type in the location of your printer:<br />
<br />
<i>http://host_ip_address:631/printers/printer_name</i><br />
<br />
where host_ip_address is the Linux server's IP address and printer_name is the name of the printer you are connecting to. After this, install the printer drivers for the Windows computer. If you setup the CUPS server to use its own printer drivers, then you can just select a generic postscript printer for the Windows client. You can then test your print setup by printing a test page.<br />
<br />
==Others to Linux, Linux to others==<br />
<br />
More information on interfacing CUPS with other printing systems can be found in the CUPS manual, e.g. on http://localhost:631/sam.html#PRINTING_OTHER<br />
<br />
=Appendix=<br />
<br />
==Alternative CUPS Interfaces==<br />
<br />
If you are a GNOME user, you can manage and configure your printer by using the gnome-cups-manager.<br />
<br />
Update: this package is now available through pacman if you have the "community" repository uncommented in <code>/etc/pacman.conf</code><br />
<br />
<pre><br />
# pacman -S gnome-cups-manager<br />
</pre><br />
<br />
The package is also still available from the [http://aur.archlinux.org/packages.php?do_Details=1&ID=66&O=0&L=0&C=0&K=cups&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR].<br />
<br />
KDE users can modify their printers from the Control Center. Both should refer to those desktop environments' documentation for more information on how to use the interfaces.<br />
<br />
There is also gtklp. It is in the "extra" repository.<br />
<br />
<pre><br />
# pacman -S gtklp<br />
</pre><br />
<br />
==PDF Virtual Printer==<br />
<br />
A nice little package that I submitted is CUPS-PDF. This package allows one to setup a virtual printer that will generate a PDF from anything sent to it. For example, I wrote this document in AbiWord and then printed it to the Virtual Printer which generated a PDF in my <code>/var/spool/cups-pdf/neocephas</code> directory. Obviously this package is not necessary, but it can be quite useful.<br />
This package can be installed by the following comamnd:<br />
<pre><br />
# pacman -S cups-pdf<br />
</pre><br />
After installing the package, you can set it up as you would for any other printer in the web interface. For the Device, select '''CUPS-PDF (Virtual PDF Printer)'''; Make/Manufacturer, choose '''Postscript'''; Model/Driver, select '''Generic postscript color printer'''. Alternatively, provide the PPD file from this link: [http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/cups-pdf-CURRENT/extra/CUPS-PDF.ppd].<br />
<br />
==Online Resources==<br />
<br />
Here is a listing of web sites that may be of use to you:<br />
<br />
* <b>Official CUPS documentation on your computer</b> http://localhost:631/documentation.html<br />
* <b>Official CUPS Website</b> - http://www.cups.org/<br />
* <b>Linux Printing</b> - http://www.linuxprinting.org/<br />
* <b>Tips and Suggestions on common CUPS problems</b> - http://home.nyc.rr.com/computertaijutsu/cups.html<br />
* <b>Gentoo's Printing Guide</b> - http://www.gentoo.org/doc/en/printing-howto.xml<br />
* <b>Arch Linux User Forums</b> - http://bbs.archlinux.org/<br />
<br />
==Specialized Cases==<br />
<br />
This section is dedicated to specific problems and their solutions. If you managed to get some unusual printer working, please put the solution here.<br />
<br />
===Printing does not work/aborts with the HP Deskjet 700 Series Printers.===<br />
<br />
*The solution is to install <b>pnm2ppa</b> printer filter for the HP Deskjet 700 series. Without this the print jobs will be aborted by the system. A [[ABS - The Arch Build System | PKGBUILD]] for pnm2ppa can be found in [http://aur.archlinux.org/packages.php?do_Details=1&ID=696&O=0&L=0&C=0&K=pnm&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0 AUR].<br />
<br />
===Getting HP LaserJet 1010 to work===<br />
I had to compile ghostscript myself because ESP gs in rep was 7.07 and had not fixed some bugs like ESP 8.15.1 had. I never downloaded 'foomatic' in rep. I think that is an old package. <br />
<pre><br />
$ pacman -Qs cups a2ps psutils foo ghost<br />
local/cups 1.1.23-3<br />
The CUPS Printing System<br />
local/a2ps 4.13b-3<br />
a2ps is an Any to PostScript filter<br />
local/psutils p17-3<br />
A set of postscript utilities.<br />
local/foomatic-db 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-engine 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-ppd 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-filters 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/espgs 8.15.1-1<br />
ESP Ghostscript<br />
</pre><br />
I also had to set LogLevel in <code>/etc/cups/cupsd.conf</code> to debug2 before i saw that I missed some "Nimbus" fonts. Then I had to rename and put them where the log told me to. Some fancy google searching had to be applied, e.g., http://www.google.com/search?q=n019003l+filetype%3Apfb since the fonts turned out to be proprietary (I'm sure Windows comes with these by default). Nevertheless, after downloading them (about 7 fonts) and putting them in the correct directory, printing started working.<br />
<br />
Before, I was getting all the errors said here: http://linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1010 'Unsupport PCL' etc...<br />
<br />
I'm sure it could have worked with ESP gs 7.07 too (in rep) if I were smart enough to turn on DebugLevel2 sooner :/ UPDATE: yeah it did... maybe this info is useful for someone else though... sorry for the inconvenience.<br />
<br />
===Getting HP LaserJet 1020 to work===<br />
After a lot of tries with hplib and gutenprint, I finally found the solution to get my printer HP LaserJet 1020 printing. <br />
<br />
First of all, you only need to install cups and ghostscript. Then follow the link on http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1020 to the http://foo2zjs.rkkda.com/ printer driver page and follow the install instructions. Log in as root. After you've downloaded the package and extracted the archive, change into the foo2zjs directory. Now you can follow the original installation instructions with a minor modification to change the userid for printing:<br /><br />
<br />
$ make<br />
$ ./getweb 1020<br />
<br />
Open the ''Makefile''<br />
$ nano Makefile<br />
and search for the line<br />
# LPuid=-olp<br />
and modify it to<br />
# LPuid=-oroot<br />
then continue with the script<br />
$ make install<br />
$ make install-hotplug<br />
$ make cups<br />
<br />
Or you can use the package foo2zjs from AUR and modify the PKGBUILD. Change the line:<br />
<br />
./getweb all<br />
<br />
to<br />
<br />
./getweb 1020<br />
<br />
(or if you're setting another printer, change this line to what you need).<br />
<br />
As a last step, add and configure the printer in the CUPS manager. The printer should be recognized automatically. It works fine for root and all users. When booting the operating system, the printer is initialized and indicates it's working.<br />
<br />
=== Printer connected to an Airport Express Station ===<br />
The first thing to do is to scan the airport express station. It<br />
seems that there are different addresses depending on the model.<br />
<pre><br />
[root@somostation somos]# nmap 192.168.0.4<br />
<br />
Starting Nmap 4.20 ( http://insecure.org ) at 2007-06-26 00:50 CEST<br />
Interesting ports on 192.168.0.4:<br />
Not shown: 1694 closed ports<br />
PORT STATE SERVICE<br />
5000/tcp open UPnP<br />
9100/tcp open jetdirect<br />
10000/tcp open snet-sensor-mgmt<br />
MAC Address: 00:14:51:70:D5:66 (Apple Computer)<br />
<br />
Nmap finished: 1 IP address (1 host up) scanned in 25.815 seconds<br />
</pre><br />
With my station, the port is 9100. The airport station is accessed like<br />
an HP JetDirect printer.<br />
Afterwards, you can edit your <code>printer.conf</code> file in this way:<br />
<pre><br />
# Printer configuration file for CUPS v1.2.11<br />
# Written by cupsd on 2007-06-26 00:44<br />
<Printer LaserSim><br />
Info SAMSUNG ML-1510 gdi<br />
Location SomoStation<br />
DeviceURI socket://192.168.0.4:9100<br />
State Idle<br />
StateTime 1182811465<br />
Accepting Yes<br />
Shared Yes<br />
JobSheets none none<br />
QuotaPeriod 0<br />
PageLimit 0<br />
KLimit 0<br />
OpPolicy default<br />
ErrorPolicy stop-printer<br />
</Printer><br />
</pre><br />
It should work. I had a few problems. They were resolved by removing foomatic and installing foomatic-db, foomatic-db-engine, foomatic-db-ppd instead.<br />
<br />
===Performing Utility Functions on Epson Printers===<br />
<br />
====Escputil====<br />
<br />
Here we explain how to perform some of the utility functions such as nozzle cleaning and nozzle checks on Epson printers. We will use the escputil utility, which is part of the gutenprint package.<br />
<br />
There is a man page ("man escputil") that provides pretty good information, but it does not include necessary information on how to identify your printer. There are two parameters that can be used. One is --printer; what it expects is the name you used to identify your printer when you configured it. The other is --raw-device. What this option expects is is something beginning with "/dev". If your printer is a serial printer, and the only serial printer, it is "/dev/lp0". If it is a USB printer, it is "/dev/usb/lp0". If you have more than one printer, they will have names ending in "lp1", "lp2", etc. <br />
<br />
* To clean the printer heads:<br />
<br />
escputil -u --clean-head<br />
<br />
* To print the nozzle-check pattern, allowing you to verify that the previous head cleaning worked. (Or to determine that you need to clean the heads)<br />
<br />
escputil -u --nozzle-check<br />
<br />
If you want to perform an operation that requires two-way communication with a printer, you must use the "--raw-device" specification and your user must be root or be a member of the group "lp". <br />
<br />
* The following is an example of getting the printer's internal identification:<br />
<br />
sudo escputil --raw-device=/dev/usb/lp0 --identify<br />
<br />
* To print out the ink levels of the printer:<br />
<br />
sudo escputil --raw-device=/dev/usb/lp0 --ink-level<br />
<br />
====Mtink====<br />
<br />
This is a printer status monitor which enables to get the remaining ink quantity, to print test patterns, to reset printer and to clean nozzle. It use an intuitive graphical user interface. Package can be downloaded from [http://aur.archlinux.org/packages.php?do_Details=1&ID=476&O=0&L=0&C=0&K=mtink&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR].<br />
<br />
==Another Source for Printer Drivers==<br />
<br />
On <i>http://www.turboprint.de/english.html</i> is a really good printer driver for many printers not yet supported by Linux (especially Canon i*). The only problem is that high-quality-prints are either marked with a turboprint-logo or you have to pay for it -- it's not open source.<br />
<br />
{{Wikipedia|Common_Unix_Printing_System}}<br />
<br />
=Troubleshooting=<br />
==As a result of upgrade==<br />
<br />
===Error with gnutls===<br />
After updating, if you get something like :<br />
/usr/sbin/cupsd: error while loading shared libraries: libgnutls.so.13: cannot open shared object file: No such file or directory<br />
<br />
You need to update gnutls:<br />
<pre><br />
# pacman -Sy gnutls<br />
</pre><br />
<br />
In addition, in <code>/etc/cups</code>, there will be a file named <code>cupsd.conf.pacnew</code>. Rename it <code>cupsd.conf</code>.<br />
<br />
===All jobs are "stopped"===<br />
After updating CUPS, if all jobs sent to the printer become "stopped", delete the printer and add it again.<br />
Using the CUPS web interface (http://localhost:631), go to Printers > Delete Printer.<br />
<br />
''Note:'' If you don't remember your printer's settings, go to Printers > Modify Printer. Copy down the information displayed, click 'Modify Printer' to proceed to the next page(s), etc.</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Arch_build_system_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=47029
Arch build system (Русский)
2008-08-04T23:28:34Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Управление пакетами]]<br />
[[Category:Руководства]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Česky|ABS - The Arch Build System (Česky)}}<br />
{{i18n_entry|English|ABS - The Arch Build System}}<br />
{{i18n_entry|繁體中文|ABS - The Arch Build System (繁體中文)}}<br />
{{i18n_entry|Русский|ABS - The Arch Build System (Russian)}}<br />
{{i18n_links_end}}<br />
<br />
==== Вступление ====<br />
<br />
Arch Build System ("Система Сборки для Arch", сокращенно ABS) используется для:<br />
* Создания новых пакетов программ, которых нет в ArchLinux<br />
* Пересборки существующих пакетов (включение или выключение опций сборки)<br />
* Перестройки всей системы с использованием новых флагов компиляции "a la freebsd" (и получение работающих модулей с Вашим новым ядром)<br />
<br />
ABS полезна, но не является необходимой для использования ArchLinux.<br />
<br />
Это описание - краткий обзор ABS и пакетов ArchLinux, а не полное руководство. Если Вы хотите узнать больше, обратитесь к man-страницам.<br />
<br />
<br />
<br />
==== Установка пакетов ====<br />
<br />
Для использования ABS Вы должны установить '''cvsup''' и '''wget''':<br />
<br />
<pre><br />
pacman -Sy cvsup wget<br />
</pre><br />
<br />
<br />
Или, если Вы уже имеете скачанные пакеты в каталоге 'foo' (например):<br />
<br />
<pre><br />
cd foo <br />
pacman -A cvsup-*.pkg.tar.gz wget-*.pkg.tar.gz<br />
</pre><br />
<br />
==== Что такое пакет? ====<br />
<br />
Обычно пакет - это файл вида ''foo''.pkg.tar.gz.<br />
<br />
Это просто архив tar.gz, который содержит:<br />
* Файлы для инсталляции<br />
* .PKGINFO : содержит все метаданные, необходимые для pacman, зависимости и т.п.<br />
* .INSTALL : содержит команды, запускаемые после инсталляции/обновления/деинсталляции. (Этот файл создается только если указан в PKGBUILD)<br />
<br />
<br />
<br />
==== Что за файл PKGBUILD и что он содержит?====<br />
<br />
Как упоминалось раньше, PKGBUILD содержит метаданные для пакета. Это простой текстовый файл, например:<br />
<br />
<pre><br />
# $Id: PKGBUILD,v 1.12 2003/11/06 08:26:13 dorphell Exp $<br />
# Maintainer: judd <jvinet@zeroflux.org><br />
# Contributor: Judd Vinet <jvinet@zeroflux.org><br />
pkgname=foo<br />
pkgver=0.99 # note: if the pkgver had been '0.99-10' then use an underscore. like '0.99_10'<br />
pkgrel=1<br />
pkgdesc="short description of foo"<br />
arch=(i686 x86_64)<br />
url="http://www.foo.org"<br />
license="GPL"<br />
groups=<br />
provides=<br />
depends=('qt' 'python')<br />
makedepends=('guile')<br />
conflicts=('yafoo')<br />
replaces=('mffoo')<br />
backup=('etc/foo/foo.conf')<br />
install=('foo.install')<br />
source=(http://www.foo.org/download/$pkgname-$pkgver.tar.gz)<br />
md5sums=('2c0cca3ef6330a187c6ef4fe41ecaa4d35175bee593a7cc7d6205584a94d8625')<br />
<br />
build() {<br />
cd $startdir/src/$pkgname-$pkgver<br />
./configure --prefix=/usr<br />
make || return 1<br />
make prefix=$startdir/pkg/usr install<br />
}<br />
</pre><br />
<br />
<br />
Итак, давайте рассмотрим каждое поле:<br />
<br />
* '''# text''' : комментарий<br />
* '''# $Id: PKGBUILD,v ...''' : cvs-tag для этого пакета (из archlinux-cvs)<br />
* '''# Maintainer''' : тот, кто разместил этот пакет в официальном репозитории<br />
* '''# Contributor''' : тот, кто написал первый PKGBUILD для этого пакета<br />
* '''pkgname''' : название пакета<br />
* '''pkgver''' : версия пакета<br />
* '''pkgrel''' : номер релиза пакета. Он отличается от версии пакета тем, что он увеличивается при изменениях в PKGBUILD. Для этого есть несколько причин, например, Вы изменили какие-нибудь опции компиляции.<br />
* '''pkgdesc''' : короткое описание пакета. Его можно увидеть при просмотре [http://archlinux.org/packages/ базы пакетов]<br />
* '''arch''' : указывает, на каких архитектурах работает этот пакет. См. [[Arch64_FAQ]] для детальной информации<br />
* '''url''' : домашняя страница пакета (которая откроется, когда Вы кликните по имени пакета в базе пакетов)<br />
* '''license''' : лицензия, по которой распространяется программа<br />
* '''groups''' : используется для группы пакетов: например, когда Вы попробуете установить kde, будут установлены все пакеты, входящие в группу kde<br />
* '''provides''' : используется, если пакет обеспечивает другой пакет, например, kernel-scsi обеспечивает kernel <br />
* '''depends''' : список run-time зависимостей пакета (которые нужны для работы пакета)<br />
* '''makedepends''' : зависимости, нужные только для сборки пакета<br />
* '''conflicts''' : список пакетов, которые не могут существовать в системе одновременно с "нашим" пакетом<br />
* '''replaces''' : "наш" пакет заменяет указанный<br />
* '''backup''' : список файлов, которые необходимо сохранить (в виде file.pacsave) когда пакет будет деинсталлирован<br />
* '''install''' : указывает на специальный скрипт, который будет включен в пакет (должен быть в том же каталоге, где и PKGBUILD)<br />
* '''source''' : список адресов с исходниками(!) для пакета. Это могут быть и локальные файлы, и адреса в интернете. В именах можно использовать ''pkgver'' чтобы не изменять адрес каждый раз при изменении версии<br />
* '''md5sums''' : список контрольных сумм для исходников(!)<br />
<br />
<br />
Теперь рассмотрим функции:<br />
<br />
* '''build''' : все действия, необходимые для сборки пакета (более подробно будет рассмотрено позже) <br />
<br />
<br />
Итак, Вы видите, что PKGBUILD содержит всю информацию, необходимую для менеджера пакетов. Это сердце pacman и abs.<br />
<br />
<br />
Есть еще файлы install. Наш PKGBUILD указывает на 'foo.install' как на инсталляционный скрипт. Вот пример такого файла:<br />
<br />
<pre><br />
post_install() {<br />
/bin/true<br />
}<br />
<br />
post_upgrade() {<br />
/bin/true<br />
}<br />
<br />
pre_remove() {<br />
/bin/true<br />
}<br />
<br />
op=$1<br />
shift<br />
<br />
$op "$@"<br />
</pre><br />
<br />
<br />
Назначения функций:<br />
<br />
* '''post_install''' : этот скрипт будет выполнен сразу после инсталляции файлов, он принимает один аргумент : <br />
** версия пакета<br />
* '''post_upgrade''' : этот скрипт будет выполнен после обновления всех файлов, он получает два параметра :<br />
** новая версия пакета<br />
** старая версия пакета<br />
* '''pre_remove''' : этот скрипт будет выполнен перед удалением файлов (например, остановка демонов), он принимает один аргумент : <br />
** версия пакета<br />
<br />
Три строки в конце файла необходимы для правильной работы.<br />
<br />
==== Функция build====<br />
<br />
Если Вы не знакомы с построением пакетов, Вы должны знать, что большинство пакетов (но не все) могут быть построены следующим образом:<br />
<br />
* распаковка исходных файлов : <br />
<br />
<pre><br />
tar -xzf foo-0.99.tar.gz<br />
tar -xjf foo-0.99.tar.bz2</pre><br />
<br />
<br />
* переход в каталог<br />
<br />
<pre>cd foo-0.99</pre><br />
<br />
<br />
* конфигурирование: в общем случае, это небольшой скрипт <code>configure</code> в каталоге исходников, который используется для конфигурирования пакета (добавить или убрать возможности, изменить путь инсталляции и т.п.) и проверки, что в Вашей системе установлены все необходимые программы. Он может быть запущен так:<br />
<br />
<pre>./configure [[option]]</pre><br />
<br />
<br />
Вы можете сначала почитать подсказку: <br />
<br />
<pre>./configure --help</pre><br />
<br />
<br />
* компиляция программы :<br />
<br />
<pre>make</pre><br />
<br />
<br />
* инсталляция<br />
<br />
<pre>make install</pre><br />
<br />
<br />
<br />
Вы должны всегда читать файл <code>INSTALL</code>, чтобы знать, как надо собирать пакет. '''Не все пакеты используют систему <code>configure; make; make install</code>!'''<br />
<br />
Итак, взглянем на стандартное содержимое функции build:<br />
<br />
<pre><br />
build() {<br />
cd $startdir/src/$pkgname-$pkgver<br />
./configure --prefix=/usr<br />
make || return 1<br />
make prefix=$startdir/pkg/usr install<br />
}<br />
</pre><br />
<br />
Что мы делаем:<br />
<br />
* переходим в каталог, куда были распакованы исходники:<br />
<br />
<pre>cd $startdir/src/$pkgname-$pkgver</pre><br />
<br />
<br />
Когда Вы попробуете собирать свой пакет, удостоверьтесь, что это правильный каталог, иногда исходники распаковываются в другой каталог:<br />
<br />
<pre>tar -xzf foo-0.99.tar.gz</pre><br />
<br />
<br />
и <code>ls</code> может выдать:<br />
<br />
<pre><br />
.<br />
..<br />
foo-0.99.tar.gz<br />
foo/</pre><br />
<br />
<br />
а не:<br />
<br />
<pre><br />
.<br />
..<br />
foo-0.99.tar.gz<br />
foo-0.99/</pre><br />
<br />
<br />
* конфигурируем пакет и указываем, что он будет установлен в каталог <code>/usr</code> :<br />
<br />
<pre><br />
./configure --prefix=/usr</pre><br />
<br />
<br />
* компилируем<br />
<br />
<pre><br />
make || return 1</pre><br />
<br />
<br />
* инсталлируем программу, но не в <code>/usr</code>, а в <code>$startdir/pkg/usr</code>, чтобы pacman мог управлять файлами.<br />
<br />
<pre><br />
make prefix=$startdir/pkg/usr install</pre><br />
<br />
<br />
Здесь мы заставляем <code>make</code> устанавливать файлы пакета не в указанный при конфигурировании каталог <code>/usr</code>, а в специальный каталог <code>$startdir/pkg/usr</code>. Теперь, <code>makepkg</code> может увидеть все устанавливаемые файлы и собрать их в пакет.<br />
<br />
<br />
'''NOTE''': Не всегда <code>prefix</code> используется в <code>Makefile</code>; часто вместо этого используется <code>DESTDIR</code>. Если пакет создавался с помощью autoconf/automake, используйте <code>DESTDIR</code>, это [http://sources.redhat.com/automake/automake.html#Install указано] в документации. Проверьте генерируемый файл <code>filelist</code>. Если он пуст, попробуйте <code>make DESTDIR=$startdir/pkg install</code>. Если это не работает, то надо смотреть, как работает "<code>make <...> install=</code>".<br />
<br />
==== Дерево ABS====<br />
<br />
Когда Вы запускаете '''abs''' впервые<br />
<br />
<pre><br />
# abs</pre><br />
<br />
<br />
он синхронизирует то, что может быть названо "Дерево ABS", с arch сервером используя систему cvs. <br />
<br />
Что же такое дерево ABS? Оно находится в каталоге <code>/var/abs</code> и выглядит примерно так:<br />
<br />
<pre><br />
|-<br />
| -- base/<br />
|-<br />
| ||-- autoconf/<br />
|-<br />
| ||-- automake/<br />
|-<br />
| ||-- ...<br />
|-<br />
| -- devel/<br />
|-<br />
| -- ...<br />
|-<br />
| -- extra/<br />
|-<br />
| || -- daemons/<br />
|-<br />
| || || -- acpid/<br />
|-<br />
| || || || -- PKGBUILD<br />
... ... ... ...<br />
</pre><br />
<br />
<br />
Дерево ABS имеет ту же структуру, что и база пакетов:<br />
<br />
* Первый уровень каталогов - категории<br />
* Второй уровень каталогов - пакеты<br />
* PKGBUILD содержит всю информацию о пакете <br />
<br />
Исключение - один специальный каталог '''local'''. Это "Ваш" каталог, в нем Вы можете делать что угодно. Остальные каталоги изменять нельзя.<br />
<br />
<br />
'''Примечание:''' Первая загрузка дерева будет происходить долго, затем будут только обновления. Но не пугайтесь, если у Вас только модемное соединение - передается только текст, который сжимается при передаче.<br />
<br />
<br />
Теперь, когда мы знаем, что такое дерево ABS, как мы можем использовать его?<br />
<br />
==== Первое использование ABS: изменение пакета====<br />
<br />
Эта ситуация может возникнуть, когда Вы считаете, что официальные пакеты собраны с определенным количеством <code>--enable</code> или <code>--disable</code> опций и это не то, что выбрали бы Вы.<br />
<br />
Для примера возьмем пакет ''foo''. ''foo'' собран без поддержки '''arts'''. Допустим, мы хоти включить '''arts'''.<br />
<br />
Вот что мы будем делать:<br />
<br />
<br />
* находим, где расположен пакет ''foo''. Это можно сделать так:<br />
<br />
искать ''foo'' на [http://archlinux.org/packages.php]<br />
использовать find:<br />
<br />
<pre><br />
find /var/abs -name "foo"</pre><br />
<br />
<br />
использовать slocate:<br />
<br />
<pre><br />
slocate foo | grep ^/var/abs</pre><br />
<br />
<br />
В любом случае, мы должны обнаружить, что ''foo'' находится в <code>extra</code> и <code>multimedia</code><br />
<br />
<br />
* копируем ''foo'' файл <code>PKGBUILD</code> в <code>/var/abs/local/foo</code><br />
<br />
<pre><br />
mkdir /var/abs/local/foo<br />
cp /var/abs/extra/multimedia/foo/* /var/abs/local/foo<br />
cd /var/abs/local/foo</pre><br />
<br />
<br />
* изменяем <code>PKGBUILD</code>: добавляем поддержку '''arts''':<br />
<br />
<pre><br />
build() {<br />
cd $startdir/src/$pkgname-$pkgver<br />
./configure --prefix=/usr<br />
make || return 1<br />
make prefix=$startdir/pkg/usr install<br />
}</pre><br />
<br />
<br />
изменяем на:<br />
<br />
<pre><br />
build() {<br />
cd $startdir/src/$pkgname-$pkgver<br />
./configure --enable-arts --prefix=/usr<br />
make || return 1<br />
make prefix=$startdir/pkg/usr install<br />
}</pre><br />
<br />
<br />
* запускаем <code>makepkg</code> :<br />
<br />
<pre><br />
makepkg</pre><br />
<br />
<br />
* устанавливаем новый пакет используя одну из следующий команд: (<code>-A</code> для установки нового или <code>-U</code> для обновления уже установленного пакета):<br />
<br />
<pre><br />
pacman -A foo-*.pkg.tar.gz<br />
pacman -U foo-*.pkg.tar.gz</pre><br />
<br />
==== Флаги компиляции и настройка makepkg====<br />
<br />
Настроечный файл для <code>makepkg</code> - <code>/etc/makepkg.conf</code>. Здесь Вы можете установить переменные окружения для <code>gcc</code>, <code>make</code> и непосредственно <code>makepkg</code>. <br />
Это пример файла <code>/etc/makepkg.conf</code>:<br />
<br />
<pre><br />
# Программа, с помощью которой makepkg будет скачивать исходники<br />
export FTPAGENT="/usr/bin/wget --continue --passive-ftp --tries=3 --waitretry=3"<br />
<br />
# Информация для gcc о типе компьютера<br />
export CARCH="i686"<br />
export CHOST="i686-pc-linux-gnu"<br />
<br />
# Флаги компиляции для gcc<br />
export CFLAGS "-march athlon-tbird -O2 -pipe"<br />
export CXXFLAGS "-march athlon-tbird -02 -pipe"<br />
<br />
# Флаги для make<br />
export MAKEFLAGS="-j 2"<br />
<br />
# Расцветка вывода<br />
export USE_COLOR="y"<br />
<br />
# Оставшиеся переменные служат для настройки makepkg<br />
<br />
# Включить fakeroot для сборки пакетов непривилегированным пользователем.<br />
# 'man fakeroot' для информации<br />
export USE_FAKEROOT="y"<br />
<br />
# Каталог, куда будут сваливаться собранные пакеты (default is ./)<br />
export PKGDEST=/home/packages<br />
<br />
# Корень ABS дерева (default is /var/abs)<br />
export ABSROOT=/var/abs<br />
<br />
# Имя, которое будет фигурировать в Ваших пакетах <br />
export PACKAGER="John Doe <nowhere@microsoft.com>"<br />
</pre><br />
<br />
Пара слов предостережения: пользователи должны быть уверены, что изменения переменных <code>CFLAGS</code>, <code>CXXFLAGS</code>, и <code>MAKEFLAGS</code> не приведет к неработоспособности собираемых пакетов. Также, обычно пользовать Arch Linux не нуждается в изменении значений переменных <code>CARCH</code>, <code>CHOST</code> и <code>USE_FAKEROOT</code>.<br />
<br />
Ссылки на флаги gcc и make:<br />
* [[Safe_Cflags]]<br />
* [http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Option-Summary.html#Option-Summary]<br />
* [http://www.gnu.org/software/make/manual/html''chapter/make''9.html#SEC102]<br />
<br />
==== Дополнительно о ABS====<br />
<br />
Пара ссылок на wiki страницы, которые помогут лучше понять ABS:<br />
* [[The Arch package making HOW-TO - with guidelines]]<br />
* [[Custom local repository with ABS and gensync]]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=CUPS_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=46978
CUPS (Русский)
2008-08-04T19:27:44Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:Принтеры]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|CUPS}}<br />
{{i18n_entry|Русский|CUPS (Русский)}}<br />
{{i18n_entry|Рolski|CUPS (Polski)}}<br />
{{i18n_entry|正體中文|CUPS支持的印表機打印}}<br />
{{i18n_links_end}}<br />
= Введение =<br />
<br />
== Что такое CUPS? ==<br />
<br />
Прямо с сайта CUPS : "Common UNIX Printing System ("CUPS", общая UNIX система печати) - это кроссплатформенное решение для печати для всех UNIX систем. Оно основано на "Internet Printing Protocol" (IPP, интернет-протокол печати) и предоставляет полный спектр возможностей для печати для большинства Postscript и растровых принтеров. CUPS рапространяется под GNU GPL..." Хотя существуют другие пакеты печати, такие как LPRNG, CUPS более популярен и довольно прост в использовании. Это система печати по умолчанию как в ArchLinux, так и во многих других Linux дистрибутивах.<br />
<br />
== Устранение неисправностей в системе CUPS и её компонентах ==<br />
<br />
Наилучший способ борьбы с неисправностями - это выставить 'LogLevel' в файле '/etc/cups/cupsd.conf' в:<br />
<pre><br />
LogLevel debug2<br />
</pre><br />
А потом смотреть вывод из файл '/var/log/cups/error_log' так:<br />
<pre><br />
tail -n 100 -f /var/log/cups/error_log<br />
</pre><br />
Символы слева от вывода означают следующее:<br />
<pre><br />
D = Debug (отладка)<br />
E = Error (ошибка)<br />
I = Information (информация)<br />
</pre><br />
Эти файлы также могут быть полезны:<br />
<pre><br />
/var/log/cups/page_log 'каждый раз при успешной печати, пишет новую запись'<br />
/var/log/cups/access_log 'записывает всю активность на cupsd http1.1 сервере'<br />
</pre><br />
<br />
Конечно, важно знать, как работает CUPS, если вы хотите решить ваши проблемы. Вот краткая информация об этом:<br />
<br />
# Приложение посылает .ps файл (PostScript, язык-скрипт, который описывает, как выглядит страница) в систему CUPS, когда вы жмёте 'печать' (99% приложений делают так).<br />
# CUPS смотрит на PPD файл (файл описания принтера) и находит, какие фильтры ему нужно использовать, чтобы преобразовать .ps файл в файл, который понимает ваш принтер (например, PJL,PCL). Обычно ему требуется ghostscript.<br />
# GhostScript принимает ввод и решает, какие фильтры ему использовать, потом применяет их и преобразовывает .ps файл в формат, который понимает принтер.<br />
# Затем файл передается бэкенду. Например, если у вас принтер подключен к usb порту, то используется usb бэкенд<br />
<br />
Напечатайте документ и смотрите 'error_log', чтобы получить более детализированную картину процесса печати.<br />
<br />
= Установка CUPS =<br />
<br />
== Пакеты ==<br />
<br />
Вам наверняка потребуются CUPS и Ghostscript:<br />
# pacman -S cups ghostscript<br />
<br />
* <b>cups</b> - собственно пакет CUPS<br />
* <b>ghostscript</b> - интерпретатор для языка Postscript<br />
<br />
<br />
Некоторые из пакетов с драйверами для принтеров, зависит от используемого вами принтера. Если неуверены, установите gutenprint.<br />
<br />
* <b>gutenprint</b> - Набор высококачественных драйверов для Canon, Epson, Lexmark, Sony, Olympus и PCL printers для использования с Ghostscript, CUPS, Foomatic и Gimp.<br />
* <b>foomatic</b>, <b>foomatic-db</b>, <b>foomatic-db-engine</b>, <b>foomatic-db-ppd</b> и <b>foomatic-filters</b> - Foomatic - это система под управлением базы данных для интерграции открытых драйверов для принтера с обычными спулерами под Unix<br />
* Установка <b>foomatic-filters</b> должна разрешить ваши проблемы, если error.log от CUPS сообщает: "stopped with status 22!"<br />
* <b>hplip</b> - драйвер для струйных принтеров HP для Linux. Предоставляет поддержку для моделей DeskJet, OfficeJet, Photosmart, Business Inkjet и некоторых LaserJet.<br />
* <b>cups-pdf</b> - Хороший пакет, который позволяет настроить виртуальный PDF принтер, который будет создавать PDF из всего, что будет послано на принтер.<br />
<br />
<br />
Если ваша система подключена к сетевому принтеру с использованием samba протокола или система является сервером печати для Windows клиентов:<br />
# pacman -S samba<br />
<br />
== Загрузка PPD для принтера ==<br />
<br />
В зависимости от вашего принтера этот пункт является необязательным и может быть пропущен, так как CUPS в стандартной установке уже содержит несколько PPD (Postscript Printer Description, postscript описание принтера) файлов. Более того, пакеты <i>foomatic-filters</i>, <i>gimp-print</i> и <i>hplip</i> уже включают в себя некоторое количество PPD файлов, которые автоматически определяются CUPS.<br />
<br />
<br />
Вот объяснение того, что такое PPD файл с сайта Linux Printing: "Для каждого PostScript принтера производитель предоставляет PPD файл, который содержит всю особенную для принтера информацию об этой модели: основные возможности принтера (цветной он или нет, шрифты, уровень PostScript и т. д.) и особенно настройки, которые может изменять пользователь, такие как размер бумаги, разрешение печати и т. д."<br />
<br />
<br />
*Для того чтобы получить PPD файл для вашего принтера, зайдите на http://www.linuxprinting.org/printer_list.cgi и выберите производителя и модель вашего принтера.<br />
<br />
<br />
*Теперь вам следует скопировать файл в каталог cups, чтобы он обнаружил этот файл. Если вы находитесь в каталоге, где лежит скаченный вами PPD файл, то вы можете использовать следующую команду:<br />
<br />
<pre><br />
# cp your_printer.ppd /usr/share/cups/model/<br />
</pre><br />
<br />
<br />
Если вы не можете найти ваш принтер на вебсайте, то, возможно, захотите попробовать похожие модели или общие драйвера для принтера. Немного погуглите или спросите производителя (удачи вам во всём этом...).<br />
<br />
= Настройка CUPS =<br />
<br />
== Опции ==<br />
<br />
Итак, после того как у вас появился установленный CUPS, вы имеете множество способов его настройки. Вы всегда можете использовать старую добрую командную строку. You can always use the tried and true command line. Также некоторые DE, такие как Gnome и KDE, предоставляют удобные программы, которые могут вам помочь в управлении принтерами. Однако, для того чтобы сделать этот процесс максимально доступным обыкновенному пользователю, мы будем использовать web-интерфейс, предоставляемый CUPS.<br />
<br />
Пожалуйста, обратите внимание, что если вы хотите подключиться к сетевому принтеру, а не к подключённому локально, то, возможно, вы захотите вначале просмотреть секцию разделения принтеров. Разделение с Linux на Linux довольно просто и требует небольшой настройки. Разделение с Windows на Linux и наоборот может потребовать каких-то более серьёзных настроек, но так же относительно просто.<br />
<br />
== Модули ядра ==<br />
<br />
Прежде чем вы сможете использовать веб-интерфейс CUPS, вам необходимо установить требуемые модули ядра. Далее следуют шаги, взятые из руководства по установке принтера в Gentoo. <br />
=== USB принтеры ===<br />
Если вы хотите использовать USB принтер с ядром 2.6.x, загрузите модуль usblp:<br />
<br />
<pre><br />
# modprobe usblp<br />
</pre><br />
<br />
Если же у вас ядро 2.4.х, то подключите модуль принтер:<br />
<br />
<pre><br />
# modprobe printer<br />
</pre><br />
<br />
Обратите внимание, что приведённые команды подразумевают, что вы используете ядра от ArchLinux. Если вы запускаете самособранное ядро, то, возможно, вам потребуется вначале это:<br />
<br />
<pre><br />
# modprobe usbcore<br />
</pre><br />
<br />
После того как вы подключили указанные модули, включите ваш принтер и проверьте, обнаружило ли его ядро с помощью следующей команды:<br />
<br />
<pre><br />
# tail /var/log/messages.log<br />
</pre><br />
<br />
или<br />
<br />
<pre><br />
# dmesg<br />
</pre><br />
<br />
<br />
Вы должны увидеть что-нибудь типа:<br />
<br />
<pre><br />
Feb 19 20:17:11 kernel: printer.c: usblp0: USB Bidirectional<br />
printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300E<br />
Feb 19 20:17:11 kernel: usb.c: usblp driver claimed interface cfef3920<br />
Feb 19 20:17:11 kernel: printer.c: v0.13: USB Printer Device Class driver<br />
</pre><br />
<br />
=== Принтеры с параллельным портом ===<br />
Если вы желаете использовать принтер с параллельным портом, настройка в общем-то такая же. Пользователи ядер 2.6.x должны вначале ввести:<br />
<br />
<pre><br />
# modprobe lp<br />
</pre><br />
<br />
Далее как для ядер 2.4.x, так и для 2.6.x следует написать:<br />
<br />
<pre><br />
# modprobe parport<br />
# modprobe parport_pc<br />
</pre><br />
<br />
Теперь вы можете проверить, обнаружен ли принтер:<br />
# tail /var/log/messages.log<br />
Вы должны увидеть что-нибудь типа:<br />
<br />
<pre><br />
# lp0: using parport0 (polling).<br />
</pre><br />
<br />
=== Автозагрузка ===<br />
Возможно, вы захотите, чтобы система загружала соответствующий модуль при старте системы. Для этого откройте в вашем текстовом редакторе файл <code>/etc/rc.conf</code> и добавьте нужный модуль в строку <i>MODULES=()</i>. Например, так:<br />
<br />
<pre><br />
MODULES=(!usbserial scsi_mod sd_mod snd-ymfpci snd-pcm-oss lp parport parport_pc ide-scsi)<br />
</pre><br />
<br />
== Демон CUPS ==<br />
<br />
После установки соответствующих модулей ядра, вы готовы к запуску демона CUPS. Для этого просто запустите:<br />
<br />
<pre><br />
# /etc/rc.d/cups start<br />
</pre><br />
<br />
Если вы хотите, чтобы CUPS загружался каждый раз при включении компьютера, добавьте cups в список DAEMONS=() в файле <i>/etc/rc.conf</i>. Если у вас принтер HP, то проверьте, что hplip загружается перед cups.<br />
<br />
== Web-интерфейс и средства управления ==<br />
<br />
После того как запущен демон, доступен для настройки web-интерфейс. Откройте ваш браузер и зайдите на:<br />
<br />
<i>http://localhost:631</i><br />
<br />
либо установите "Gnome Cups Manager" - графический фронтенд для Gnome (подробнее [http://wiki.archlinux.org/index.php/CUPS#Alternative_CUPS_Interfaces Alternative CUPS Interfaces])<br />
<br />
Теперь всё, что вам нужно сделать - это следовать различным мастерам для добавления вашего принтера. Например, для установки Samsung ML-1250, следует нажать на <i>Manage Printers</i>, а потом на <i>Add Printer</i>. Появился запрос об имени пользователя и пароле. Войдите как root. Далее введите ml1250 в качестве имени принтера, My Room как location и Samsung ML-1250 как description. Потом вам будет предложено выбрать устройство. Поскольку этот принтер является USB устройством, надо выбрать <i>USB Printer #1</i>. Имя принтера должно появиться после надписи <i>USB Printer #1</i>, обратите на это внимание. Далее просто выберите подходящий драйвеп и установка будет завершена.<br />
<br />
После завершения установки, проверьте ваши настройки, нажав на кнопку Print Test Page (Печать тестовой страницы).<br />
<br />
= Разделение принтера =<br />
<br />
== с Linux-клиента на Linux-сервер ==<br />
<br />
После того как вы настроили CUPS на вашем Linux сервере печати, разделить принтера с другой Linux системой довольно легко. Есть несколько возможностей для этого, а здесь будет описана лишь ручная настройка. На сервере (тот, который управляет и подсоединён к принтеру) просто откройте файл <i>/etc/cups/cupsd.conf</i> и разрешите доступ к серверу, изменив строчки с тэгом Location. Например:<br />
<br />
<pre><br />
<Location /><br />
Order Deny,Allow<br />
Deny From All<br />
Allow From 127.0.0.1<br />
Allow From 10.0.0.*<br />
</Location><br />
</pre><br />
<br />
Добавьте IP адреса компьютера клиента в строчке Allow From client_ip_address. После того как вы внесли исправления, перезапустите CUPS, выполнив:<br />
<br />
<pre><br />
# /etc/rc.d/cups restart<br />
</pre><br />
<br />
На стороне клиента откройте <i>/etc/cups/client.conf</i> и измените опцию ServerName в соответствии с IP адресом или именем сервера. Например, сервер называется beast и имеет запись в файле hosts. Итак, в вашем файле <i>client.conf</i>, просто отредактируйте строчку так:<br />
<br />
<pre><br />
ServerName beast<br />
</pre><br />
<br />
Потом запустите следующую команду для обновления клиента:<br />
<br />
<pre><br />
# lpq<br />
</pre><br />
<br />
Вы увидите что-то вроде:<br />
<br />
<pre><br />
ml1250 is ready<br />
no entries<br />
</pre><br />
<br />
Есть другие возможности для настройки, включая автоматическую, которые подробно описаны на http://localhost:631/sam.html#CLIENT_SETUP (эта ссылка доступна с вашего сервера печати).<br />
<br />
когда вас спросят о логине и пароле, войдите как root, потом проследуйте инструкциям с http://www.digitalhermit.com/linux/printing/<br />
если это TCP/IP принтер, использующий Jetdirect.<br />
<br />
Вот и всё, что касается Linux на Linux разделения принтера.<br />
<br />
==Linux to Windows==<br />
<br />
If you are connected to a Windows print server (or any other Samba capable print server), you can skip the section about kernel modules and such. All you have to do is start the CUPS daemon and complete the web interface as specified in section 3.3 and 3.4. Before this, you need to activate the Samba CUPS backend. You can do this by entering the following command:<br />
<br />
<pre><br />
# ln -s `which smbspool` /usr/lib/cups/backend/smb<br />
</pre><br />
<br />
Note that the symbol before is ` (underneath the ~ on a standard US keyboard) and not '. After this, you will have to restart CUPS using the command specified in the previous section. Next, simply login into the CUPS web interface and choose to add a new printer. For device, there should be an option that says something to the effect Windows Printer Via Samba near the button of the device list. For the device location enter:<br />
<br />
<pre><br />
smb://username:password@hostname/printer_name<br />
</pre><br />
<br />
Or without a password:<br />
<br />
<pre><br />
smb://username@hostname/printer_name<br />
</pre><br />
<br />
Make sure that the user actually has access to the printer on Windows computer. Select the appropriate drivers and that's about it. If the computer is located on a domain, make sure the username includes the domain: <br />
smb://username:password@domain/hostname/printer_name<br />
<br />
Note: if your network contains many printers use "lpoptions -d your_desired_default_printer_name" to set your preferred printer<br />
<br />
== с Windows-клиента на Linux-сервер ==<br />
<br />
Иногда необходимо разрешить Windows компьютеру подключаться к вашему. Есть несколько способов реализации, здесь будет описан способ, использующий Samba. Для того чтобы сделать это, вам следует отредактировать ваш файл <i>/etc/samba/smb.conf</i> для разрешения доступа к принтеру. Ваш smb.conf может выглядеть примерно так:<br />
<br />
<pre><br />
[global]<br />
workgroup = Heroes<br />
server string = Arch Linux Print Server<br />
security = user<br />
<br />
[printers]<br />
comment = All Printers<br />
path = /var/spool/samba<br />
browseable = yes<br />
# to allow user 'guest account' to print.<br />
guest ok = no<br />
writable = no<br />
printable = yes<br />
create mode = 0700<br />
write list = @adm root neocephas<br />
</pre><br />
<br />
Этого должно быть достаточно для разделения вашего принтера, но, возможно, вы захотите добавить собственный раздел для принтера:<br />
<br />
<pre><br />
[ML1250]<br />
comment = Samsung ML-1250 Laser Printer<br />
printer=ml1250<br />
path = /var/spool/samba<br />
printing = cups<br />
printable = yes<br />
printer admin = @admin root neocephas<br />
user client driver = yes<br />
# to allow user 'guest account' to print.<br />
guest ok = no<br />
writable = no<br />
write list = @adm root neocephas<br />
valid users = @adm root neocephas<br />
</pre><br />
<br />
Обратите внимание, что в приведённых настройках сделано так, что каждый пользователь должен иметь существующую учётную запись для доступа к принтеру. Для того чтобы сделать принтер общим, установите guest ok в yes, у удалите строчку valid users. Для того чтобы добавить учётные записи, вам нужно установить обычную учётную запись в Linux и потом пароль для Samba на сервере. Например:<br />
<br />
<pre><br />
# useradd neocephas<br />
# smbpasswd -a neocephas<br />
</pre><br />
<br />
После настройки учётных записей для пользователей вам нужно будет настроить каталог спулинга для samba:<br />
<br />
<pre><br />
# mkdir /var/spool/samba<br />
# chmod 777 /var/spool/samba<br />
</pre><br />
<br />
Следующие файлы, которые предстоит отредактировать - это /etc/cups/mime.convs и /etc/cups/mime.types:<br />
<br />
mime.convs:<br />
<pre><br />
# Эта строчка находится ближе к концу файла. Раскомментируйте её.<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
</pre><br />
<br />
mime.types:<br />
<pre><br />
# Опять где-то ближе к концу файла.<br />
application/octet-stream<br />
</pre><br />
<br />
Изменения в mime.convs и mime.types необходимы для того чтобы CUPS мог печатать документы Microsoft Office. Многим людям это требуется.<br />
<br />
После того необходимо перезапустить демон Samba:<br />
<br />
<pre><br />
# /etc/rc.d/samba restart<br />
</pre><br />
<br />
Конечно, существует множество настроек и улучшений, которые могут быть сделаны при настройке Samba сервера печати, поэтому вы можете обратиться к документации CUPS и Samba за дальнейшими подробностями. Файл <i>smb.conf.example</i> также содержит несколько хороших примеров, на которые, возможно, вы захотите посмотреть.<br />
<br />
== Windows 2000- и Windows XP-клиенты на Linux-сервер ==<br />
<br />
Для последних версий Windows существует другой путь подсоединения к вашему Linux серверу печати, используюющий непосредственно протокол CUPS. Клиент Windows должен использовать Windows 2000 или Windows XP. Удостоверьтесь, что вы разрешили клиентам доступ к серверу печати, отредактировав секцию location, как указано в разделе 4.1.<br />
<br />
На компьютере с Windows, зайдите в Панель Управления -> Принтеры и выберите "Добавить новый принтер". Потом выберите опцию задавания URL. В поле для url введите нахождение вашего принтера:<br />
<br />
<i>http://host_ip_address:631/printers/printer_name</i><br />
<br />
где host_ip_address - это IP адрес вашего Linux сервера, а printer_name - это имя принтера, к которому вы подключаетесь. После этого установите драйвера для принтера на компьютер с Windows. Если вы настроите сервер CUPS так, чтобы он использовал свои собственные драйвера для принтера, то вы можете выбрать общий postscript принтер на Windows клиенте. Вы можете проверить ваши настройки, попробовав напечатать тестовую страницу.<br />
<br />
== с остальных на Linux, с Linux на остальные ==<br />
<br />
Подробная информация о взаимодействии CUPS с другими серверами печати может быть найдена в мануале по CUPS, например, на http://localhost:631/sam.html#PRINTING_OTHER<br />
<br />
=Приложение=<br />
<br />
==CUPS альтернативные интерфейсы==<br />
<br />
Если вы пользуетесь GNOME, вы можете конфингурировать ваш принтер с помощью gnome-cups-manager.<br />
Update: Сейчас этот пакет не доступен, установить его вы можете с помощью pacman, если в файле /etc/pacman.conf у вас раскомментрован репозиторий "community"<br />
<br />
pacman -S gnome-cups-manager<br />
Так же этот пакет доступен на [http://aur.archlinux.org/packages.php?do_Details=1&ID=66&O=0&L=0&C=0&K=cups&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR].<br />
Пользователи KDE могут изменять настройки из "Control Center" (kcontrol). <br />
Чтобы получить больше информации, рекомендуем обратиться к документации к вашему рабочему окружению (DE).<br />
<br />
Также существует gtklp. Находится в репозитории "extra"<br />
pacman -S gtklp<br />
<br />
==Виртуальный принтер PDF==<br />
<br />
Существует прекрасный пакет (ftp://ftp.archlinux.org/incoming) CUPS-PDF. Этот пакет позволяет настроить виртуальный принтер, который будет генерировать PDF файлы из отправленного на печать, на него. For example, I wrote this document in AbiWord and then printed it to the Virtual Printer which generated a pdf in my <i>/var/spool/cups-pdf/neocephas</i> folder. Obviously, this package is not necessary, but it can be quite useful. After downloading the package from the ftp server and installing it, you can set it up as you would for any other printer in the web interface. Select Virtual PDF Printer as the device and choose Postscript -> Postscript Color Printer for the drivers.<br />
<br />
==Внешние ресурсы==<br />
<br />
Список вебсайтов, которые могут быть вам полезны:<br />
<br />
* <b>Official CUPS documentation on your computer</b> http://localhost:631/documentation.html<br />
* <b>Official CUPS Website</b> - http://www.cups.org/<br />
* <b>Linux Printing</b> - http://www.linuxprinting.org/<br />
* <b>Tips and Suggestions on common CUPS problems</b> - http://home.nyc.rr.com/computertaijutsu/cups.html<br />
* <b>Gentoo's Printing Guide</b> - http://www.gentoo.org/doc/en/printing-howto.xml<br />
* <b>Arch Linux User Forums</b> - http://bbs.archlinux.org/<br />
<br />
==Особые случаи==<br />
<br />
Дальнейшее описание посвящено специфическим проблемам и их решениям. Если вы сталкивались с какой-либо ''необычной'' работой принтера, пожалуйста, поместите решение проблемы здесь.<br />
<br />
===Печать не работает/прерывается на принтерах HP Deskjet 700===<br />
<br />
Проблема решается установкой фильтра pnm2ppa для принтеров HP Deskjet 700 series. Без этого задания на печать будут отменяться системой. [[ABS_-_The_Arch_Build_System_(Russian) | PKGBUILD]] для pnm2ppa можно найти здесь: [http://aur.archlinux.org/index.php?setlang=ru AUR].<br />
<br />
===Заставить работать HP LaserJet 1010===<br />
Мне для этого пришлось самому собрать ghostscript, потому что gs ESP в репозитории был версии 7.07 и имел некоторые ошибки, исправленные в ESP 8.15.1. Я никогда не пользовался пакетом 'foomatic' из репозитория. Я думаю что этот пакет устарел.<br />
<pre><br />
$ pacman -Qs cups a2ps psutils foo ghost<br />
local/cups 1.1.23-3<br />
The CUPS Printing System<br />
local/a2ps 4.13b-3<br />
a2ps is an Any to PostScript filter<br />
local/psutils p17-3<br />
A set of postscript utilities.<br />
local/foomatic-db 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-engine 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-ppd 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-filters 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/espgs 8.15.1-1<br />
ESP Ghostscript<br />
</pre><br />
Также я был вынужден выставить LogLevel в /etc/cups/cupsd.conf в debug2 для того чтобы обнаружить отсутствие некоторых шрифтов "Nimbus". Затем я переименовал их и положил туда, куда мне подсказывал лог. Тут нужно привести хитрый способ поиска в google, наподобие:<br />
http://www.google.com/search?q=n019003l+filetype%3Apfb т.к. шрифты являются проприетарными (уверен что в windows это по умолчанию). В любом случае, после скачивания шрифтов (около 7) и помещения их в правильную директорию печать заработала.<br />
<br />
До этого я получал ошибки описанные здесь: http://linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1010 'Unsupport PCL' и т.п...<br />
<br />
Уверен что это работало бы и с gs ESP 7.07 (в репозитории) если бы у меня раньше хватило ума включить DebugLevel2 :-/<br />
<br />
''Обновление:'' да, это работает... может быть эта информация окажется полезной для кого-либо ещё... извините за неудобства.<br />
<br />
===Заставить работать HP LaserJet 1020===<br />
После множества попыток связанных с hplib и gutenprint я наконец нашёл решение как заставить мой HP Laserjet 1020 печатать. <br />
<br />
Первым делом вам надо уставить cups и ghostscript. Затем пройдите по ссылке <br />
http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1020 на страницу драйверов печати http://foo2zjs.rkkda.com/ и следуйте интрукциям по установке. Залогиньтесь как root. После скачивания и распаковки архива переместитесь в распакованную директорию foo2zjs. Теперь вы можете делать всё по оригинальной инструкции по установке, лишь с небольшой модификацией для изменения userid пользователя для печати:<br />
<pre><br />
$ make<br />
$ ./getweb 1020<br />
</pre><br />
Откройте ''Makefile''<br />
<pre>$ nano Makefile</pre><br />
найдите там строку<br />
<pre># LPuid=-olp</pre><br />
и модифицируйте её таки образом:<br />
<pre># LPuid=-oroot</pre><br />
дальше выполняйте сборку<br />
<pre><br />
$ make install<br />
$ make install-hotplug<br />
$ make cups<br />
</pre><br />
Вы также можете взять пакет foo2zjs из [http://aur.archlinux.org/index.php?setlang=ru AUR] и модифицировать [[ABS_-_The_Arch_Build_System_(Russian) | PKGBUILD]]: измените строку<br />
<pre>./getweb all</pre><br />
на<br />
<pre>./getweb 1020</pre><br />
(или, если устанавливаете другой принтер, измените эту строку на что, что вам нужно).<br />
<br />
Последним шагом является добавление и конфигурирование принтера в CUPS manager. Принтер должен определиться автоматически. Это отлично работает для root'а и всех ползователей. Когда ОС загружается, принтер инициализируется и сигнализирует о том, что он работает.<br />
<br />
===Выполнение сервисных операций на принтерах Epson===<br />
====Escputil====<br />
<br />
Здесь объясняется как выполнить некоторые вспомогательные операции, такие как очистка и проверка сопел на принтерах Epson. Для этого мы будем использовать утилиту escputil, которая входит в состав пакета gutenprint.<br />
<br />
Man-страница этой утилиты ("man escputil") содержит очень полезную информацию, но не включает в себя необходимых сведений о том как идентифицировать ваш принтер. Для этого могут быть использованы два параметра. Первый из них --printer; он принимает имя принтера, которое вы использовали при его конфигурировании. Другой &mdash --raw-device. Эта опция примаетпуть к устройству. Если ваш принтер подключен к последовательному порту, то устройство будет выглядеть примерно как "/dev/lp0". Если же ваш принтер подключен к USB, по устройство будет "/dev/usb/lp0". Если у вас более одного принтера они будут иметь имена файлов устройств "lp1", "lp2" и т.д.<br />
<br />
* очистка печатающей головки:<br />
<pre>escputil -u --clean-head</pre><br />
<br />
* проверка сопел:<br />
<pre>escputil -u --nozzle-check</pre><br />
<br />
Если вам необходимо произвести операцию, которая требует двухстороннего общения с принтером вы должны использовать спецификацию "--raw-device", а ваш пользователь должен состоять в группе "lp" или быть root'ом.<br />
<br />
* получение внутреннего имени принтера:<br />
<br />
sudo escputil --raw-device=/dev/usb/lp0 --identify<br />
<br />
* получение уровня чернил:<br />
<br />
sudo escputil --raw-device=/dev/usb/lp0 --ink-level<br />
<br />
====Mtink====<br />
<br />
Это монитор состояния принтера, который позволяет получить количество оставшихся чернил, печатать тестовые страницы, сбрасывать принтер и очищать сопла. Он использует интуитивный графический интерфейс пользователя. Пакет можно скачать отсюда: <br />
[http://aur.archlinux.org/packages.php?do_Details=1&ID=476&O=0&L=0&C=0&K=mtink&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR].<br />
<br />
==Другие источники драйверов для принтеров==<br />
<br />
На ''http://www.turboprint.de/english.html'' есть действительно хорошие драйверы для многих моделей принтеров, которые до сих пор ещё не поддерживаются в Linux (особенно Canon i*). Единственная проблема в том, что отпечатки высокого качества либо с логотипом turboprint или за них необходимо заплатить... Эти драйверы не Open-Source.<br />
<br />
=Решение проблем=<br />
==В результате обновления==<br />
<br />
После обновления вы можете увидеть ошибку такого вида:<br />
/usr/sbin/cupsd: error while loading shared libraries: libgnutls.so.13: cannot open shared object file: No such file or directory<br />
<br />
Это значит, что вам надо обновить gnutls:<br />
<br />
Pacman -Sy gnutls<br />
<br />
Вдобавок, в /etc/cupsбудет лежать файл с названием cupsd.conf.pacnew. Переименуйте его в cupsd.conf.<br />
<br />
[[Category:Русский]]</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Cursor_themes&diff=46871
Cursor themes
2008-08-02T10:04:21Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|X11 Cursors}}<br />
{{i18n_entry|Русский|Курсоры X11}}<br />
{{i18n_entry|Español|Cursores en X11}}<br />
{{i18n_links_end}}<br />
<br />
There are many cursor themes available for the X11 Windowing System besides the default black pointer.<br />
This guide will instruct you on where to get them, installing them, and configuring them.<br />
<br />
<b>Getting Mouse Cursor Themes</b><br><br />
Here are links to where you may download cursor:<br />
*[http://kde-look.org/index.php?xcontentmode=36 KDE Look]<br />
<!--<br />
this link doesn't work<br />
*[http://www.themedepot.org/showarea.php4?area=19 Theme Depot]<br />
--><br />
*[http://themes.freshmeat.net/browse/982/ Freshmeat]<br />
*[http://www.customize.org/list/xcursors Customize.org]<br />
Also, some themes available through [http://aur.archlinux.org/packages.php?O=0&L=0&C=17&K=cursor&SeB=nd&SB=n&SO=a&PP=50&do_Search=Go AUR]<br />
<br><br><br />
<b>Installing Mouse Cursor Themes</b><br><br />
* Extract the cursor theme package:<br />
<pre><br />
tar -zxvf foobar-cursor-theme-package-foo.tar.gz<br />
or<br />
tar -jxvf foobar-cursor-theme-package-foo.tar.bz2<br />
</pre><br />
* Make a directory for the cursor theme:<br><br />
Example: ~FooBar-~AweSoMe-Cursors-v2.98beta<br />
<br><br><br />
Per-user installation:<br />
<pre><br />
mkdir -p ~/.icons/foobar/cursors<br />
</pre><br />
<br>System-wide installation:<br />
<pre><br />
mkdir -p /usr/share/icons/foobar/cursors<br />
</pre><br />
<br />
<br><br />
Be sure to simplify the name of the theme ('foobar' instead of '~FooBar-~AweSoMe-Cursors-v2.98beta')<br />
* Copy cursor files into the appropriate directory:<br />
<pre><br />
cp -R FooBar-AweSoMe-Cursors-v2.98beta/cursors/* /usr/share/icons/foobar/cursors/<br />
</pre><br />
<br><br />
If the package includes index.theme file check if there is an "Inherits" line inside.<br />
If yes, check whether the inherited theme also exists under this name in your system (rename if needed).<br><br />
Note that X already comes with the 'redglass' and 'whiteglass' themes in /usr/X11R6/lib/icons or /usr/share/icons.<br><br />
Some applications keep using the default X11 cursor when a themed version of left_ptr_watch and the like should be shown. Have a look at the symlinks in the changelog belonging to the [http://www.kde-look.org/content/show.php?content=5265 3Dcursors project at KDE-Look] to fix this.<br />
<br />
* Copy index.theme file into diretory:<br />
<pre><br />
cp -R FooBar-AweSoMe-Cursors-v2.98beta/index.theme /usr/share/icons/foobar/index.theme<br />
</pre><br />
If the package doesn't have index.theme or if it doesn't include an "Inherits" line you don't have to copy this file.<br><br />
<br><br />
<b>Configuring Cursor Themes</b><br><br />
To locally change a cursor theme, add this line to your ~/.Xdefaults:<br />
<br><br />
<pre><br />
Xcursor.theme: foobar<br />
</pre><br />
<br><br />
Make sure the file ~/.Xdefaults is called by your window manager.<br><br />
You can force it to get loaded by running xrdb ~/.Xdefaults before loading your window manager (for example from .xinitrc if you use startx).<br><br />
Refer to your window manager documentation for details.<br><br />
Alternatively, you can create a symlink "default" in ~/.icons, which should points to your installed cursor theme:<br />
<pre><br />
ln -s /usr/share/icons/foobar/ ~/.icons/default<br />
</pre><br />
<br><br />
If you rather want to change the cursor globally, or if you experience problems with above method (for example in Firefox), create the /usr/share/icons/default/index.theme file. Then edit it, and add the following:<br />
<br><br />
<pre><br />
[icon theme] <br />
Inherits=foobar<br />
</pre><br />
<br><br />
You can optionally add this line to ~/.Xdefaults if your cursor theme supports multiple sizes:<br />
<br><br />
<pre><br />
Xcursor.size: 32 # 32, 48 or 64 are probably good values<br />
</pre><br />
<br><br />
If you don't know about supported cursor sizes just start X without this setting and let it choose the cursor size automatically.<br><br />
<br><br />
<b>More information</b><br />
<br><br />
For more information about cursors in X (supported directories, formats, compatibility, etc.) refer to the man page:<br />
<br><br />
<pre><br />
man Xcursor<br />
</pre><br />
<br><br />
<br />
'''Note:'''<br />
if the animations are flickering on your nvidia card, add the following line to your xorg.conf file, into the nvidia device section, to fix it:<br />
Option "HWCursor" "off"<br />
<br />
<br />
Enjoy!<br />
<br />
WikiMigration--[[User:Dlanor|dlanor]] 13:33, 23 Jul 2005 (EDT)</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Cursor_themes&diff=46870
Cursor themes
2008-08-02T10:00:29Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|X11 Cursors}}<br />
{{i18n_entry|Русский|Курсоры X11}}<br />
{{i18n_entry|Español|Cursores en X11}}<br />
{{i18n_links_end}}<br />
<br />
There are many cursor themes available for the X11 Windowing System besides the default black pointer.<br />
This guide will instruct you on where to get them, installing them, and configuring them.<br />
<br />
<b>Getting Mouse Cursor Themes</b><br><br />
Here are links to where you may download cursor themes:<br />
*[http://kde-look.org/index.php?xcontentmode=36 KDE Look]<br />
<!--<br />
this link doesn't work<br />
*[http://www.themedepot.org/showarea.php4?area=19 Theme Depot]<br />
--><br />
*[http://themes.freshmeat.net/browse/982/ Freshmeat]<br />
*[http://www.customize.org/list/xcursors Customize.org]<br />
Also, some themes available through [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=cursor+theme&SeB=nd&SB=n&SO=a&PP=25&do_Search=Go AUR]<br />
<br><br />
<b>Installing Mouse Cursor Themes</b><br><br />
* Extract the cursor theme package:<br />
<pre><br />
tar -zxvf foobar-cursor-theme-package-foo.tar.gz<br />
or<br />
tar -jxvf foobar-cursor-theme-package-foo.tar.bz2<br />
</pre><br />
* Make a directory for the cursor theme:<br><br />
Example: ~FooBar-~AweSoMe-Cursors-v2.98beta<br />
<br><br><br />
Per-user installation:<br />
<pre><br />
mkdir -p ~/.icons/foobar/cursors<br />
</pre><br />
<br>System-wide installation:<br />
<pre><br />
mkdir -p /usr/share/icons/foobar/cursors<br />
</pre><br />
<br />
<br><br />
Be sure to simplify the name of the theme ('foobar' instead of '~FooBar-~AweSoMe-Cursors-v2.98beta')<br />
* Copy cursor files into the appropriate directory:<br />
<pre><br />
cp -R FooBar-AweSoMe-Cursors-v2.98beta/cursors/* /usr/share/icons/foobar/cursors/<br />
</pre><br />
<br><br />
If the package includes index.theme file check if there is an "Inherits" line inside.<br />
If yes, check whether the inherited theme also exists under this name in your system (rename if needed).<br><br />
Note that X already comes with the 'redglass' and 'whiteglass' themes in /usr/X11R6/lib/icons or /usr/share/icons.<br><br />
Some applications keep using the default X11 cursor when a themed version of left_ptr_watch and the like should be shown. Have a look at the symlinks in the changelog belonging to the [http://www.kde-look.org/content/show.php?content=5265 3Dcursors project at KDE-Look] to fix this.<br />
<br />
* Copy index.theme file into diretory:<br />
<pre><br />
cp -R FooBar-AweSoMe-Cursors-v2.98beta/index.theme /usr/share/icons/foobar/index.theme<br />
</pre><br />
If the package doesn't have index.theme or if it doesn't include an "Inherits" line you don't have to copy this file.<br><br />
<br><br />
<b>Configuring Cursor Themes</b><br><br />
To locally change a cursor theme, add this line to your ~/.Xdefaults:<br />
<br><br />
<pre><br />
Xcursor.theme: foobar<br />
</pre><br />
<br><br />
Make sure the file ~/.Xdefaults is called by your window manager.<br><br />
You can force it to get loaded by running xrdb ~/.Xdefaults before loading your window manager (for example from .xinitrc if you use startx).<br><br />
Refer to your window manager documentation for details.<br><br />
Alternatively, you can create a symlink "default" in ~/.icons, which should points to your installed cursor theme:<br />
<pre><br />
ln -s /usr/share/icons/foobar/ ~/.icons/default<br />
</pre><br />
<br><br />
If you rather want to change the cursor globally, or if you experience problems with above method (for example in Firefox), create the /usr/share/icons/default/index.theme file. Then edit it, and add the following:<br />
<br><br />
<pre><br />
[icon theme] <br />
Inherits=foobar<br />
</pre><br />
<br><br />
You can optionally add this line to ~/.Xdefaults if your cursor theme supports multiple sizes:<br />
<br><br />
<pre><br />
Xcursor.size: 32 # 32, 48 or 64 are probably good values<br />
</pre><br />
<br><br />
If you don't know about supported cursor sizes just start X without this setting and let it choose the cursor size automatically.<br><br />
<br><br />
<b>More information</b><br />
<br><br />
For more information about cursors in X (supported directories, formats, compatibility, etc.) refer to the man page:<br />
<br><br />
<pre><br />
man Xcursor<br />
</pre><br />
<br><br />
<br />
'''Note:'''<br />
if the animations are flickering on your nvidia card, add the following line to your xorg.conf file, into the nvidia device section, to fix it:<br />
Option "HWCursor" "off"<br />
<br />
<br />
Enjoy!<br />
<br />
WikiMigration--[[User:Dlanor|dlanor]] 13:33, 23 Jul 2005 (EDT)</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Cursor_themes&diff=46869
Cursor themes
2008-08-02T09:55:01Z
<p>Alsvartr: </p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|X11 Cursors}}<br />
{{i18n_entry|Русский|Курсоры X11}}<br />
{{i18n_entry|Español|Cursores en X11}}<br />
{{i18n_links_end}}<br />
<br />
There are many cursor themes available for the X11 Windowing System besides the default black pointer.<br />
This guide will instruct you on where to get them, installing them, and configuring them.<br />
<br />
<b>Getting Mouse Cursor Themes</b><br><br />
Here are links to where you may download cursor themes:<br />
*[http://kde-look.org/index.php?xcontentmode=36 KDE Look]<br />
<!--<br />
this link doesn't work<br />
*[http://www.themedepot.org/showarea.php4?area=19 Theme Depot]<br />
--><br />
*[http://themes.freshmeat.net/browse/982/ Freshmeat]<br />
*[http://www.customize.org/list/xcursors Customize.org]<br />
<br><br />
<b>Installing Mouse Cursor Themes</b><br><br />
* Extract the cursor theme package:<br />
<pre><br />
tar -zxvf foobar-cursor-theme-package-foo.tar.gz<br />
or<br />
tar -jxvf foobar-cursor-theme-package-foo.tar.bz2<br />
</pre><br />
* Make a directory for the cursor theme:<br><br />
Example: ~FooBar-~AweSoMe-Cursors-v2.98beta<br />
<br><br><br />
Per-user installation:<br />
<pre><br />
mkdir -p ~/.icons/foobar/cursors<br />
</pre><br />
<br>System-wide installation:<br />
<pre><br />
mkdir -p /usr/share/icons/foobar/cursors<br />
</pre><br />
<br />
<br><br />
Be sure to simplify the name of the theme ('foobar' instead of '~FooBar-~AweSoMe-Cursors-v2.98beta')<br />
* Copy cursor files into the appropriate directory:<br />
<pre><br />
cp -R FooBar-AweSoMe-Cursors-v2.98beta/cursors/* /usr/share/icons/foobar/cursors/<br />
</pre><br />
<br><br />
If the package includes index.theme file check if there is an "Inherits" line inside.<br />
If yes, check whether the inherited theme also exists under this name in your system (rename if needed).<br><br />
Note that X already comes with the 'redglass' and 'whiteglass' themes in /usr/X11R6/lib/icons or /usr/share/icons.<br><br />
Some applications keep using the default X11 cursor when a themed version of left_ptr_watch and the like should be shown. Have a look at the symlinks in the changelog belonging to the [http://www.kde-look.org/content/show.php?content=5265 3Dcursors project at KDE-Look] to fix this.<br />
<br />
* Copy index.theme file into diretory:<br />
<pre><br />
cp -R FooBar-AweSoMe-Cursors-v2.98beta/index.theme /usr/share/icons/foobar/index.theme<br />
</pre><br />
If the package doesn't have index.theme or if it doesn't include an "Inherits" line you don't have to copy this file.<br><br />
<br><br />
<b>Configuring Cursor Themes</b><br><br />
To locally change a cursor theme, add this line to your ~/.Xdefaults:<br />
<br><br />
<pre><br />
Xcursor.theme: foobar<br />
</pre><br />
<br><br />
Make sure the file ~/.Xdefaults is called by your window manager.<br><br />
You can force it to get loaded by running xrdb ~/.Xdefaults before loading your window manager (for example from .xinitrc if you use startx).<br><br />
Refer to your window manager documentation for details.<br><br />
Alternatively, you can create a symlink "default" in ~/.icons, which should points to your installed cursor theme:<br />
<pre><br />
ln -s /usr/share/icons/foobar/ ~/.icons/default<br />
</pre><br />
<br><br />
If you rather want to change the cursor globally, or if you experience problems with above method (for example in Firefox), create the /usr/share/icons/default/index.theme file. Then edit it, and add the following:<br />
<br><br />
<pre><br />
[icon theme] <br />
Inherits=foobar<br />
</pre><br />
<br><br />
You can optionally add this line to ~/.Xdefaults if your cursor theme supports multiple sizes:<br />
<br><br />
<pre><br />
Xcursor.size: 32 # 32, 48 or 64 are probably good values<br />
</pre><br />
<br><br />
If you don't know about supported cursor sizes just start X without this setting and let it choose the cursor size automatically.<br><br />
<br><br />
<b>More information</b><br />
<br><br />
For more information about cursors in X (supported directories, formats, compatibility, etc.) refer to the man page:<br />
<br><br />
<pre><br />
man Xcursor<br />
</pre><br />
<br><br />
<br />
'''Note:'''<br />
if the animations are flickering on your nvidia card, add the following line to your xorg.conf file, into the nvidia device section, to fix it:<br />
Option "HWCursor" "off"<br />
<br />
<br />
Enjoy!<br />
<br />
WikiMigration--[[User:Dlanor|dlanor]] 13:33, 23 Jul 2005 (EDT)</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Unofficial_user_repositories&diff=44388
Unofficial user repositories
2008-07-07T12:37:01Z
<p>Alsvartr: /* List of PUR (unofficial user repositories) | i686 */</p>
<hr />
<div>[[Category: Package management (English)]]<br />
[[Category: General (English)]]<br />
<br />
== Why unofficial user repositories ==<br />
Since the AUR only allows users to upload PKGBUILD and other package build related files, but does not provide a means for distributing a binary package, a user may want to create a binary repository of their packages elsewhere.<br />
<br />
'''However:''' Be advised, if you only put your packages in your private repo and neglect AUR, your package will never make it into community repo nor a central storage space(AUR) which is bad for users, since they will have to add 'YetAnotherThird-party-Repo'(YATR) to their /etc/pacman.conf which will make it slower to update. But the main reason you should not have repo-only packages is that not having packages in a central place confuses and gives users a second job in that they now have to search for ''Repositories'' in addition to ''Packages''.<br />
<br />
Thus the best way to have a private repo is to offer it as a ''supplement'' to the AUR for those users who don't want to compile. You should try to avoid to offer it as a ''substitute''.<br />
<br />
== The future of Unofficial repos ==<br />
I'd like to see more work of this type. Sometimes there are certain projects that don't mesh well with other things, such as the community repo. The 'kdemod' project is a good example.<br />
<br />
In the future, well-thought-out user repositories may be ideal for lots of supplementary things. Forming a "web of trust" is important in cases like this, so we may begin keeping a list of "recommended" repositories somewhere, in order to make it seem more official and trustworthy.<br />
<br />
[[User:Phrakture|Phrakture]] 12:50, 18 May 2007 (EDT)<br />
<br />
== The community repository, maintained by the TUs==<br />
<nowiki>[community]<br />
Server = ftp://ftp.archlinux.org/community/os/i686/</nowiki><br />
<br />
The community repository is included in pacman's default configuration, but disabled. You can enable it by removing the # in these two lines:<br />
<br />
[community]<br />
Include = /etc/pacman.d/community<br />
<br />
== List of PUR (unofficial user repositories) | i686 ==<br />
<nowiki><br />
[alsvartr]<br />
# just a small repo for a few programs in [unsupported]<br />
# (at this time - qutIM Instant Messenger and xneur/gxneur packages)<br />
Server = http://www.rootshell.be/~alsvartr/i686/<br />
<br />
[archie]<br />
Server = ftp://ftp.sunsite.dk/projects/archie/packages<br />
<br />
[archlinuxfr]<br />
## The french Arch Linux communities packages<br />
Server = http://repo.archlinux.fr/i686<br />
<br />
[archlinux.pl]<br />
## The polish Arch Linux communities packages<br />
Server = http://bednarek.org.pl/arch/i686<br />
<br />
[archlinuxve]<br />
# Home of the splashy packages<br />
Server = http://repo.archlinux.com.ve/i686<br />
<br />
[arch-graphics]<br />
# repository aimed to provide applications mainly for 3D graphics<br />
# for more info, look at http://arch-graphics.kx.cz/<br />
Server = http://arch-graphics.kx.cz/repo/i686<br />
<br />
[cgr-i686]<br />
# packages for some ChicoGeek's PKGBUILDs<br />
Server = http://cgr.i686.googlepages.com/<br />
<br />
[compiz-fusion]<br />
#compiz-fusion-git<br />
Server = http://compiz.dreamz-box.de/i686<br />
<br />
[deelab]<br />
Server = http://www.deelab.org/arch/i686<br />
<br />
[dibble]<br />
Server = http://dtw.jiwe.org/pkgs/dibble<br />
<br />
[hussam]<br />
## Contains daily Firefox trunk cvs i686 packages.<br />
Server = http://ht990332.googlepages.com/<br />
<br />
[janitux]<br />
Server = http://janitux.mortals.dy.fi <br />
<br />
[kasmol]<br />
Server = http://kasmol.netsons.org/arch/software<br />
<br />
[kde-split]<br />
## Splitted kde packages. Original kdebase and kdelibs are required. Work in progress<br />
Server = http://gotux.altervista.org/arch/packages/i686/<br />
<br />
[kdemod]<br />
# splitted KDE... take a look:<br />
# - http://bbs.archlinux.org/viewtopic.php?t=23319<br />
# - http://kdemod.ath.cx/<br />
# if there's a big change and you would stay on the bleeding edge you may replace<br />
# 'current' with 'testing'<br />
Server = http://kdemod.ath.cx/repo/current/i686<br />
<br />
[lnf]<br />
# packages include: firefox3-systemcairo, cairo-ubuntu (+deps)<br />
# tor-alpha, radeonhd-git, gajim-svn, mpd-svn, sonata-svn, vidalia<br />
Server = http://reactor.reality-protocol.de/lnf<br />
<br />
[Lapis]<br />
## Linux-sevenler packages.Zemberek , virtualbox and other stuff<br />
Server = http://arch.linux-sevenler.org/pkgs <br />
<br />
[nvidia-beta]<br />
## nvidia 0.9.* beta drivers<br />
Server = http://box.decemplex.net/~thomas/nvidia-beta/<br />
<br />
[obarchie]<br />
Server = http://dtw.jiwe.org/pkgs/obarchie<br />
<br />
[perlcpan]<br />
## More info here: http://wiki.archlinux.org/index.php/PerlCPAN_Repository<br />
Server = http://arch.os-zen.net/perlcpan/packages<br />
<br />
[rabyte]<br />
Server = http://oxygen4.free.fr/arch<br />
<br />
[seif]<br />
Server = http://seif.hopto.org/arch/<br />
<br />
[sergej-repo]<br />
# ion3 and some other stuff<br />
# http://code.google.com/p/archlinux-stuff/source/browse/trunk/my-repo<br />
Server = http://web.vrn.ru/sergej/sergej-repo/i686/<br />
<br />
[takhis] <br />
## e17, ...<br />
Server = ftp://takhis.net/arch/i686<br />
<br />
[tango]<br />
# dmdtango package (dmd compiler + tango library)<br />
Server = http://downloads.dsource.org/projects/tango/archlinux/i686<br />
<br />
[Tj]<br />
#New repo, currently only has wine (always latest :) ) and toribash (requested). <br />
#I will be compiling more stuff. I will always have latest wine though. <br />
#Requests are welcome, go to the site to find email link.<br />
Server = http://science.uwaterloo.ca/~tharihar<br />
<br />
[Victor]<br />
Server = http://personales.ya.com/vmromanos/arch/pkgs<br />
</nowiki><br />
<br />
== List of PUR (unofficial user repositories) | x86-64 ==<br />
<nowiki><br />
[archlinuxfr]<br />
## The french Archlinux communities packages<br />
Server = http://repo.archlinux.fr/x86_64/<br />
<br />
[kdemod]<br />
# splitted KDE... take a look:<br />
# - http://bbs.archlinux.org/viewtopic.php?t=23319<br />
# - http://kdemod.ath.cx/<br />
# if there's a big change and you would stay on the bleeding edge you may replace<br />
# 'current' with 'testing'<br />
Server = http://kdemod.ath.cx/repo/current/x86_64<br />
<br />
[olympus]<br />
## by zeus<br />
## see http://archlinux.org.ru/forum/index.php/topic,39.0.html for more info<br />
Server = http://zeus.hovel.ru/archlinux/olympus/<br />
<br />
[oo-voikko]<br />
## Openoffice and linguistic software and data for Finnish<br />
Server = http://www.kotikone.fi/purch/arch/oo-voikko/x86_64<br />
<br />
[homegnu]<br />
## Some packages for the tuxdroid + custom versions of some stuff<br />
Server = http://data.homegnu.net/archlinux<br />
<br />
[compiz-fusion]<br />
#compiz-fusion-git<br />
Server = http://compiz.dreamz-box.de/x86_64<br />
<br />
[archlinuxve]<br />
# Home of the splashy packages<br />
Server = http://repo.archlinux.com.ve/x86_64<br />
<br />
[sergej-repo]<br />
# ion3 and some other stuff<br />
# http://code.google.com/p/archlinux-stuff/source/browse/trunk/my-repo<br />
Server = http://web.vrn.ru/sergej/sergej-repo/x86_64/<br />
<br />
[haskell]<br />
# Complete Haskell libraries and tools suite, snapshot of hackage.haskell.org<br />
Server = http://code.haskell.org/arch/x86_64<br />
</nowiki><br />
<br />
== Add your own repository to this list ==<br />
If you have your own repository, please add this to this list, so that all other users knows where to find your packages.</div>
Alsvartr
https://wiki.archlinux.org/index.php?title=Unofficial_user_repositories&diff=44216
Unofficial user repositories
2008-07-04T14:11:14Z
<p>Alsvartr: /* List of PUR (unofficial user repositories) | i686 */</p>
<hr />
<div>[[Category: Package management (English)]]<br />
[[Category: General (English)]]<br />
<br />
== Why unofficial user repositories ==<br />
Since the AUR only allows users to upload PKGBUILD and other package build related files, but does not provide a means for distributing a binary package, a user may want to create a binary repository of their packages elsewhere.<br />
<br />
'''However:''' Be advised, if you only put your packages in your private repo and neglect AUR, your package will never make it into community repo nor a central storage space(AUR) which is bad for users, since they will have to add 'YetAnotherThird-party-Repo'(YATR) to their /etc/pacman.conf which will make it slower to update. But the main reason you should not have repo-only packages is that not having packages in a central place confuses and gives users a second job in that they now have to search for ''Repositories'' in addition to ''Packages''.<br />
<br />
Thus the best way to have a private repo is to offer it as a ''supplement'' to the AUR for those users who don't want to compile. You should try to avoid to offer it as a ''substitute''.<br />
<br />
== The future of Unofficial repos ==<br />
I'd like to see more work of this type. Sometimes there are certain projects that don't mesh well with other things, such as the community repo. The 'kdemod' project is a good example.<br />
<br />
In the future, well-thought-out user repositories may be ideal for lots of supplementary things. Forming a "web of trust" is important in cases like this, so we may begin keeping a list of "recommended" repositories somewhere, in order to make it seem more official and trustworthy.<br />
<br />
[[User:Phrakture|Phrakture]] 12:50, 18 May 2007 (EDT)<br />
<br />
== The community repository, maintained by the TUs==<br />
<nowiki>[community]<br />
Server = ftp://ftp.archlinux.org/community/os/i686/</nowiki><br />
<br />
The community repository is included in pacman's default configuration, but disabled. You can enable it by removing the # in these two lines:<br />
<br />
[community]<br />
Include = /etc/pacman.d/community<br />
<br />
== List of PUR (unofficial user repositories) | i686 ==<br />
<nowiki><br />
[archie]<br />
Server = ftp://ftp.sunsite.dk/projects/archie/packages<br />
<br />
[archlinuxfr]<br />
## The french Arch Linux communities packages<br />
Server = http://repo.archlinux.fr/i686<br />
<br />
[archlinux.pl]<br />
## The polish Arch Linux communities packages<br />
Server = http://bednarek.org.pl/arch/i686<br />
<br />
[archlinuxve]<br />
# Home of the splashy packages<br />
Server = http://repo.archlinux.com.ve/i686<br />
<br />
[arch-graphics]<br />
# repository aimed to provide applications mainly for 3D graphics<br />
# for more info, look at http://arch-graphics.kx.cz/<br />
Server = http://arch-graphics.kx.cz/repo/i686<br />
<br />
[cgr-i686]<br />
# packages for some ChicoGeek's PKGBUILDs<br />
Server = http://cgr.i686.googlepages.com/<br />
<br />
[compiz-fusion]<br />
#compiz-fusion-git<br />
Server = http://compiz.dreamz-box.de/i686<br />
<br />
[deelab]<br />
Server = http://www.deelab.org/arch/i686<br />
<br />
[dibble]<br />
Server = http://dtw.jiwe.org/pkgs/dibble<br />
<br />
[hussam]<br />
## Contains daily Firefox trunk cvs i686 packages.<br />
Server = http://ht990332.googlepages.com/<br />
<br />
[janitux]<br />
Server = http://janitux.mortals.dy.fi <br />
<br />
[kasmol]<br />
Server = http://kasmol.netsons.org/arch/software<br />
<br />
[kde-split]<br />
## Splitted kde packages. Original kdebase and kdelibs are required. Work in progress<br />
Server = http://gotux.altervista.org/arch/packages/i686/<br />
<br />
[kdemod]<br />
# splitted KDE... take a look:<br />
# - http://bbs.archlinux.org/viewtopic.php?t=23319<br />
# - http://kdemod.ath.cx/<br />
# if there's a big change and you would stay on the bleeding edge you may replace<br />
# 'current' with 'testing'<br />
Server = http://kdemod.ath.cx/repo/current/i686<br />
<br />
[lnf]<br />
# packages include: firefox3-systemcairo, cairo-ubuntu (+deps)<br />
# tor-alpha, radeonhd-git, gajim-svn, mpd-svn, sonata-svn, vidalia<br />
Server = http://reactor.reality-protocol.de/lnf<br />
<br />
[Lapis]<br />
## Linux-sevenler packages.Zemberek , virtualbox and other stuff<br />
Server = http://arch.linux-sevenler.org/pkgs <br />
<br />
[nvidia-beta]<br />
## nvidia 0.9.* beta drivers<br />
Server = http://box.decemplex.net/~thomas/nvidia-beta/<br />
<br />
[obarchie]<br />
Server = http://dtw.jiwe.org/pkgs/obarchie<br />
<br />
[perlcpan]<br />
## More info here: http://wiki.archlinux.org/index.php/PerlCPAN_Repository<br />
Server = http://arch.os-zen.net/perlcpan/packages<br />
<br />
[rabyte]<br />
Server = http://oxygen4.free.fr/arch<br />
<br />
[seif]<br />
Server = http://seif.hopto.org/arch/<br />
<br />
[takhis] <br />
## e17, ...<br />
Server = ftp://takhis.net/arch/i686<br />
<br />
[tango]<br />
# dmdtango package (dmd compiler + tango library)<br />
Server = http://downloads.dsource.org/projects/tango/archlinux/i686<br />
<br />
[Tj]<br />
#New repo, currently only has wine (always latest :) ) and toribash (requested). <br />
#I will be compiling more stuff. I will always have latest wine though. <br />
#Requests are welcome, go to the site to find email link.<br />
Server = http://science.uwaterloo.ca/~tharihar<br />
<br />
[Victor]<br />
Server = http://personales.ya.com/vmromanos/arch/pkgs<br />
<br />
[sergej-repo]<br />
# ion3 and some other stuff<br />
# http://code.google.com/p/archlinux-stuff/source/browse/trunk/my-repo<br />
Server = http://web.vrn.ru/sergej/sergej-repo/i686/<br />
<br />
[alsvartr]<br />
# just a small repo for a few programs in [unsupported]<br />
# (at this time - qutIM Instant Messenger and xneur/gxneur packages)<br />
Server = http://www.rootshell.be/~alsvartr/i686/<br />
</nowiki><br />
<br />
== List of PUR (unofficial user repositories) | x86-64 ==<br />
<nowiki><br />
[archlinuxfr]<br />
## The french Archlinux communities packages<br />
Server = http://repo.archlinux.fr/x86_64/<br />
<br />
[kdemod]<br />
# splitted KDE... take a look:<br />
# - http://bbs.archlinux.org/viewtopic.php?t=23319<br />
# - http://kdemod.ath.cx/<br />
# if there's a big change and you would stay on the bleeding edge you may replace<br />
# 'current' with 'testing'<br />
Server = http://kdemod.ath.cx/repo/current/x86_64<br />
<br />
[olympus]<br />
## by zeus<br />
## see http://archlinux.org.ru/forum/index.php/topic,39.0.html for more info<br />
Server = http://zeus.hovel.ru/archlinux/olympus/<br />
<br />
[oo-voikko]<br />
## Openoffice and linguistic software and data for Finnish<br />
Server = http://www.kotikone.fi/purch/arch/oo-voikko/x86_64<br />
<br />
[homegnu]<br />
## Some packages for the tuxdroid + custom versions of some stuff<br />
Server = http://data.homegnu.net/archlinux<br />
<br />
[compiz-fusion]<br />
#compiz-fusion-git<br />
Server = http://compiz.dreamz-box.de/x86_64<br />
<br />
[archlinuxve]<br />
# Home of the splashy packages<br />
Server = http://repo.archlinux.com.ve/x86_64<br />
<br />
[sergej-repo]<br />
# ion3 and some other stuff<br />
# http://code.google.com/p/archlinux-stuff/source/browse/trunk/my-repo<br />
Server = http://web.vrn.ru/sergej/sergej-repo/x86_64/<br />
<br />
[haskell]<br />
# Complete Haskell libraries and tools suite, snapshot of hackage.haskell.org<br />
Server = http://code.haskell.org/arch/x86_64<br />
</nowiki><br />
<br />
== Add your own repository to this list ==<br />
If you have your own repository, please add this to this list, so that all other users knows where to find your packages.</div>
Alsvartr