Arch Linux installation guide
Last updated: May 1, 2019
The installation guide below is a summarized version of the official Installation Guide.
Installing basic system
-
Choose correct keyboard keymaps
loadkeys keymap -
Assert boot mode
ls /sys/firmware/efi/efivars -
Make sure internet connection is present
ping 8.8.8.8 -
Set correct system time
timedatectl set-ntp true -
Partition the disks
-
List disks using
fdiskfdisk -l -
If UEFI is present, use
GPTand makeEFIpartition,swap, and root/cfdisk /dev/sdX # or /dev/nvme0nX -
Set correct size, type and write partition table.
-
-
Format the disks
-
Make
EFIpartitionmkfs.fat -F32 /dev/sdXA # A is EFI partition -
Make swap
mkswap /dev/sdXB # B is swap partition -
Turn swap on
swapon /dev/sdXB -
Make root fs
mkfs.ext4 /dev/sdaXC # C is root partition
-
-
Mount root partition to
mntmount /dev/sdXC /mnt -
Install necessary packages
pacstrap /mnt base base-devel linux linux-firmware vim nano man zshConfiguring system
-
Write filesystem table
genfstab -U /mnt >> /mnt/etc/fstab -
Change root to
/mntarch-chroot /mnt -
Set correct time zone
ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime hwclock --systohc -
Set locale
-
Uncomment the correct locale
vim /etc/locale.gen -
Set locale
locale-gen
-
-
Set hostname and hosts
-
Add your hostname
yourhostnameecho "yourhostname" >> /etc/hostname -
Append the following to
/etc/hosts127.0.0.1 localhost ::1 localhost 127.0.1.1 yourhostname.localdomain yourhostname
-
-
Setup root password using
passwdpasswd -
Add default users
-
Add new user
useradd -m -s /bin/zsh newuser -
Give new user a password with
passwdpasswd newuser -
Add new user to the
wheelusermod -aG wheel,audio,video,optical,storage newuser -
Setup
sudopacman -S sudo -
Enable
wheelwithvisudovisudo
-
-
Setup grub
-
Install grub and efi-tools
pacman -S grub efibootmgr dosfstoosl os-prober mtools -
Make efi boot directory
mkdir /boot/EFI -
Mount efi partition
mount /dev/sdXA /boot/EFI -
Install grub (efi) for x86-64
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck -
Make grub config file
grub-mkconfig -o /boot/grub/grub.cfg
-
-
Network manager for internet connectivity
pacman -S networkmanager systectl enable NetworkManager # enable network manager -
Optional: Reboot to conclude with bare system setup.exit # now back to iso image umount -R /mnt shutdown now # or reboot
Additional setup for a complete system
-
Install audio
pacman -S pulseaudio pulseaudio-alsa -
Install a Graphical user interface; Display server (
xorg), display driver (nvidia), desktop environment (gnome), window manager, display manager (gdm).-
Install packages
pacman -S gnome nvidia # gnome-extra for further applications -
Enable display manager for next reboot
systemctl enable gdm.service
-
-
Additional network tools
pacman -S openssh rsync -
Development tools:
git,htoppacman -S git htop -
Reboot
exit # now back to iso image umount -R /mnt shutdown now # or reboot