First of all, this is unofficial Arch Linux installation guide. Arch Linux is not beginners distribution, so if you find it hard to follow this guide - just leave it.
- 1 Installation
- 1.1 Get internet access
- 1.2 Partitions
- 1.3 Install base Arch system
- 1.4 Generate fstab
- 1.5 Enter the chroot mode
- 2 Configuration in chroot mode
- 3 post installation
- 4 Post reboot
Get internet access
Test internet connection
type this command:
# ping -c 3 www.google.com
if you see a responses from a Google's server - you have Internet access. Move on...
Connect to a WiFi
type this command and at the end press TAB and Enter:
# wifi-menu wlp
Tab should complete the name of wifi interface for you automatically. Follow the instructions and connect to a wifi. Use
ping command to test internet connection.
To see a list of all possible devices, type:
# iw dev
To avoid partitioning below (which, some users find extremelly difficult), go ahead and install another disctribution in a graphical way - User:Erkexzcx#Dualboot. For example, install Ubuntu and imagine that you are installing Arch Linux. When you finished, just start from User:Erkexzcx#Mount_partitions, but don't forget to do steps at User:Erkexzcx#Dualboot.
# lsblk -f
to see the advanced information about your partitions and hard drives visible to your system.
Destroy a partition table
This completelly destroys data on your hard drive for sure :)
# sgdisk --zap-all /dev/sda
Create a partition table
Create 2 partitions:
- Linux filesystem
You might not need SWAP, but I would suggest to google what are benefits of installing&using SWAP.
# cgdisk /dev/sda
Follow the instructions. Select unallocated space, give a bit to SWAP (people say it must be twice bigger than your amount of RAM) and the rest of it for Linux filesystem. At the end - write the changes and quit
The new created partitions are unusable until you format them into a needed format.
Format the linux filesystem partition into EXT4 format:
# mkfs.ext4 /dev/sda1
Also, format the SWAP partition if you created it:
# mkswap /dev/sda2
Mount the linux partition (EXT4) on /mnt:
# mount /dev/sda1 /mnt
Then mount swap partition:
# swapon /dev/sda2
Install base Arch system
Install base packages to the hard drive. This is basically the whole base Arch Linux system:
# pacstrap -i /mnt base base-devel
fstab is a file, which is read by a system on every boot at a very early stage. The file contains what and how must be mounted before booting up.
Generate current mounts into a file using this command:
# genfstab -U /mnt > /mnt/etc/fstab
Enter the chroot mode
Chroot mode is kind of switching from live USB arch Linux boot into a booted system state. This basically allows you to gain more control over your "installed" system rather than just configuring it from your live usb.
Enter Chroot mode now:
# arch-chroot /mnt /bin/bash
Configuration in chroot mode
Setting locale and stuff
Set the US locale to your system.
#en_US.UTF-8 UTF-8 to
# nano /etc/locale.gen
Then apply changes to the system:
Also, export this for some reason... o.O
# echo LANG=en_US.UTF-8 > /etc/locale.conf
Set the correct timezone
Just run this and follow the steps:
So, the operation is simple as this. Remember to use Tab button and
ls if needed:
# ln -sf /usr/share/zoneinfo/Zone/SubZone /etc/localtime
# ln -sf /usr/share/zoneinfo/Europe/Vilnius /etc/localtime
Set the hardware clock
Just type this command:
# hwclock --systohc --utc
Set the system's hostname
Hostname is kind of a system's name in the network. When seeing only IP address, this will be visible instead. It can be anything you want, just ensure it's just one word (lowercase letters are acceptable).
Let's say, I want my hostname to be CUNTDESTROYER so this is what I do:
# echo CUNTDESTROYER > /etc/hostname
#<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 localhost.localdomain localhost CUNTDESTROYER ::1 localhost.localdomain localhost CUNTDESTROYER
We will definitely need network. After we boot straight to the system (not live, but on our computer's physical hard drive), we won't have
wifi-menu, so we need to install it first!
Install required software:
# pacman -S iw wpa_supplicant dialog
Set the password
Our root user needs password!
Enter this command and follow the instructions:
The bootloader is called GRUB.
# pacman -S grub
Install itself a grub bootloader into the system:
# grub-install --recheck /dev/sda
And generate configuration file for GRUB:
# grub-mkconfig -o /boot/grub/grub.cfg
You might want to continue in chroot mode (if you are on virtualbox), so you can download and install all the required stuff so you can boot straight into a GUI, otherwise you will need to configure internet.
Exit the chroot mode:
Unmount the mounted partitions (skip if fails):
# umount /mnt
If you got tired of coding all the way to here, these are the critical things you need to get right now:
- Working graphical user interface
- Get internet working in a GUI.
After you boot the system, you will need to enter just a single existing account:
Password: Your previously created password
Internet access (to install GUI)
As you are now logged in, test if you have working Internet connection:
# ping -c 3 www.google.com
if no, identify the WiFi interfaces:
# iw dev
You will see something similar to wlp4s0 and enp5s0. The wireless adapter interface always starts with w and Ethernet (cable) adapter interface starts with e.
So connect to the Internet using Wi-Fi interface:
# wifi-menu interface
Install X server
To be able to see graphcical desktop environment, we need a host for it. This is the software, called X Server and it used to host a desktop environment:
# pacman -S xorg-server xorg-server-utils xorg-xinit
It might ask you what GPU (or just video - whatever) drivers you are about to use. Just use default selected.
Install preferred DE
You might test other DEs later, but for now, let's install XFCE4.
For the list of Desktop Environments, see Desktop_environment. You are on your own to read Arch wiki to install any other WM or DE.
# pacman -S xfce4 xfce4-goodies
In addition, after we boot, we probably need Internet browser to find some information straight from the computer:
# pacman -S firefox
Network (in GUI)
Also, we would like to configure network from Desktop Environment rather than from terminal. So install:
# pacman -S network-manager-applet networkmanager gnome-keyring
Then we must enable Network Manager so we can control it through applet in the Desktop Environment:
# systemctl enable NetworkManager.service
Then, let's install a Login manager (tired of terminal typing, yep?):
# pacman -S lxdm
Also, enable it:
# systemctl enable lxdm.service
Tell the computer what DE you are using:
#!/bin/bash # Start XFCE4 exec startxfce4
Using root is not a good idea. Your system should crash and get unusable in a weeks, so new regular user is needed:
# useradd -m -G wheel,games,rfkill,users,uucp,audio,camera,disk,floppy,lp,network,optical,power,scanner,storage,sys,video -s /bin/bash user
If any of these groups does not exist, add them:
# groupadd group
Uncomment the line containing %wheel group, so your user will be able to manage system on his behalf, not just as root.
# nano /etc/sudoers
So your user is in wheel group and will be allowed to execute root (sudo) commands.
In section Login manager you typed this already, but type again as regular user (when typed as root, this will be created at
/root/.xinitrc and when typing as a regular user will be at
/home/user/.xinitrc. These are separate directories and both must contain the same):
#!/bin/bash # Start XFCE4 exec startxfce4
I would suggest you to reboot the PC so you will boot right to the GUI Desktop Environment :)
Enable multilib, so you can install 32bit packages on 64bit system. Uncomment the
[multilib] section (both lines):
[multilib] Include = /etc/pacman.d/mirrorlist
Then update the packages DB, so pacman will be able to install 32bit packages:
# pacman -Syu
Then install required packages:
# pacman -S pulseaudio pavucontrol pulseaudio-alsa lib32-alsa-plugins lib32-libpulse alsa-utils gstreamer0.10-plugins
Reboot the PC. Open terminal and configure settings (unmute, increase volume to 100%):
$ alsamixer $ pavucontrol
For the most part, your system is ready 2 use, but some FN action buttons might not work. Here is what I recomment:
- Ensure, that the FN+<BUTTON> produces output (check with
- Ensure, that button is binded in your DE settings (shortcuts).
- Google for your laptop's model in Arch Linux (via google). You might find useful information like this page!
Arch is mostly proud of Arch Wiki and AUR. AUR let's use use scripts, created by community, to install stuff, not even created for Arch Linux (let's say, Ubuntu DEB packages), in a specific way. The script can be downloaded from the aur website and installed, but I will show you how to do this quickly and merge with pacman:
yajl (this is a dependency):
# pacman -S yajl
Go to your download folder on your system and extract both these files using this command:
$ tar -xvzf archive.tar.gz
Then go to the each folder and execute the following command:
$ makepkg # pacman -U *.tar.xz
yaourt-gui package by following the instructions after installing via this command:
$ yaourt -S yaourt-gui
Then open yaourt-gui (it's terminal GUI):
Then enter number 20 and press Enter. Find these lines and (un)comment (and edit) just like this:
# Prompt NOCONFIRM=0 UP_NOCONFIRM=1 # No prompt while build upgrades (including -Sbu) BUILD_NOCONFIRM=1 # Only prompt for editing files PU_NOCONFIRM=1 # Add --noconfirm to $PACMAN -U EDITFILES=0 NOENTER=1
Save it and you are ready to forget
pacmanpackage manager. Use
yaourt-gui to install files both from AUR and official repositories.
Login manager produces login loops
Just when in login manager, make sure you selected XFCE4 rather than Default session.