Arch Linux installation guide
Last updated: May 1, 2021
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
fdisk
fdisk -l
-
If UEFI is present, use
GPT
and makeEFI
partition,swap
, and root/
cfdisk /dev/sdX # or /dev/nvme0nX
-
Set correct size, type and write partition table.
-
-
Format the disks
-
Make
EFI
partitionmkfs.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
mnt
mount /dev/sdXC /mnt
-
Install necessary packages
pacstrap /mnt base base-devel linux linux-firmware vim nano man zsh
Configuring system
-
Write filesystem table
genfstab -U /mnt >> /mnt/etc/fstab
-
Change root to
/mnt
arch-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
yourhostname
echo "yourhostname" >> /etc/hostname
-
Append the following to
/etc/hosts
127.0.0.1 localhost ::1 localhost 127.0.1.1 yourhostname.localdomain yourhostname
-
-
Setup root password using
passwd
passwd
-
Add default users
-
Add new user
useradd -m -s /bin/zsh newuser
-
Give new user a password with
passwd
passwd newuser
-
Add new user to the
wheel
usermod -aG wheel,audio,video,optical,storage newuser
-
Setup
sudo
pacman -S sudo
-
Enable
wheel
withvisudo
visudo
-
-
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
,htop
pacman -S git htop
-
Reboot
exit # now back to iso image umount -R /mnt shutdown now # or reboot