First of all, this tutorial doesn't prevent you from following the ArchWiki - Installation guide, it is not standalone.
First basic steps#
For those first steps, I think you are a big boy enough to do them alone.
So you can download the ArchLinux iso, verify its signature, boot the live environment, set the keyboard layout, verify the boot mode, connect to the internet, update the system clock. If you're not confident with those steps check the ArchWiki.
While creating you new virtual machine, you'll need to configure the VM settings in Virtualbox.
If you want to install Arch Linux in EFI mode inside VirtualBox, in the settings of the virtual machine, choose System item from the panel on the left and Motherboard tab from the right panel, and check the checkbox Enable EFI (special OSes only).
In UEFI mode you may experience a black screen, see #Black screen for guest in EFI mode for a workaround.
Partition the disks#
Identify the block device associated to disks with
Now we will use LVM to manage the disk and assume there is only one physical disk.
So we will have two partitions: one ESP and one partition that will host the LVM container.
# fdisk /dev/sda
Preparing the logical volumes#
Create a physical volume:
# pvcreate /dev/sda2
Create a volume group, adding the previously created physical volume to it:
# vgcreate myvg /dev/sda2
Create all your logical volumes on the volume group:
# lvcreate -l 100%FREE myvg -n root
Format your filesystems on each logical volume:
# mkfs.fat -F32 /dev/sda1
Mount your filesystems:
# mount /dev/myvg/root /mnt
Check the partition table:
lsblk -f /dev/sda.
Select the mirrors#
Again, here it let you select the mirrors.
Install the base packages#
Install the base + some useful packages:
# pacstrap /mnt base linux linux-firmware base-devel openssh sudo wget curl neovim lvm2
Generate an fstab file by UUID:
# genfstab -U /mnt >> /mnt/etc/fstab
/mnt/etc/fstab correctness and add
/efi /boot none defaults,bind 0 0 to mount the EFI mountpoint at boot since we mounted ESP outside of
So you should have something similar to:
# Static information about the filesystems.
Change root into the new system:
# arch-chroot /mnt
Set the time zone:
# ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
hwclock to generate
# hwclock --systohc
Uncomment locales in
/etc/locale.gen, and generate them with:
As I'm French, for me locales were:
Set variables in
/etc/locale.conf, for example:
Because I want all sort of format to be displayed like we do in France but keep the system and displayed messages in English.
Set the keyboard layout in
/etc/vconsole.conf, for example (for
AZERTY default keyboard):
Create the hostname file (
Add matching entries to
Configuring mkinitcpio HOOKS in
/etc/mkinitcpio.conf to work with
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block lvm2 filesystems fsck)
Recreate the initramfs image:
# mkinitcpio -p linux
# mkdir -p /efi/EFI/BOOT
Warning: Virtualbox will ony see
esp/EFI/BOOT/bootx64.efi automatically, see REFInd#VirtualBox.
Change root password:
I know what you're about to say:
WTF man! Why don't you use GRUB?
Because rEFInd works better for EFI partitions as the name states.
# pacman -S refind-efi
Then we need to edit
"Boot with standard options" "root=/dev/myvg/root rw add_efi_memmap initrd=/initramfs-%v.img"
/efi/EFI/refind/refind.conf in order to work with
So this way we have to configure the boot entries only once for multiple kernels.
Do not bind mount the ESP to
/boot before using
refind-install else it will fail:
# mount --bind /efi /boot
You know how to reboot right?
Ok ok, but it's better to quit the chroot and unmount all the partitions first
umount -R /mnt.
Before we begin#
It could be nice to setup a DHCP client to avoid manual IP configuration.
Enable DHCP client:
# systemctl start dhcpcd
Now we have Internet access, let's update the system before installing anything:
# pacman -Syu
We'll use a lot this terminal so let's get a fancier zsh shell:
# pacman -S zsh zsh-autosuggestions zsh-completions zsh-history-substring-search zsh-syntax-highlighting
Users, groups and privilege escalation#
We already installed
Add a new user and assign sudo privilege
# useradd -m -G wheel -s /bin/zsh noraj
%wheel ALL=(ALL) ALL.
Exit root session and log back as user.
Creating default XDG directories
$ sudo pacman -S xdg-user-dirs
Send stats about packages
$ sudo pacman -S pkgstats
Arch User Repository#
Install a pacman wrapper for AUR support, for example
$ sudo pacman -S git
Please, don't install
yaourt, check the pacman wrapper ArchWiki page.
Graphical user interface#
Display server and display drivers#
Install the display server, some utils and associated drivers
$ sudo pacman -S xorg-server xorg-xrandr
As we want a true graphical library backed desktop environment (understand a Qt DE as GTK is only the GIMP library), we have barely two choices: KDE or LXQT, but LXQT is very light (nice for a VM but too light for a nice desktop experience).
Install KDE Desktop Environment
$ sudo pacman -S plasma-meta
- System Settings > Startup and Shutdown > Background Services > disable all unneeded services
- System Settings > Desktop Behavior > Desktop Effects > Disable
Translucencythat behave bad for dark themes.
- System Settings > Search > File Search > Deselect "Enable File Search"
- System Settings > Regional Settings > Set Language and Formats
- System Settings > Input Devices > Keyboard > Layouts > Configure Layouts
Generate SDDM keyboard layout
$ sudo localectl set-x11-keymap fr
If not already installed, install NetworkManager network manager and applets:
$ sudo pacman -S networkmanager kdeplasma-addons plasma-nm
NetworkManager are: official package for KDE applet, integrated wifi manager, nice integration with KDE.
NetworkManger: does not support the use of
dhcpcd for IPv6 currently. So you can change for
If you want to change to
$ sudo pacman -S dhclient # not running as systemd service unlike dhcpcd
Encrypted Wi-Fi passwords by using KDE wallet.
$ sudoedit /etc/NetworkManager/conf.d/dns.conf
Install the Guest Additions#
virtualbox-guest-utils provided by
virtualbox-guest-modules-arch if you plan to keep the default vanilla kernel, else install it from
$ sudo pacman -S virtualbox-guest-utils
Load the VirtualBox kernel modules#
$ sudo systemctl enable vboxservice
Install a VTE (Virtual Terminal Emulator):
$ sudo pacman -S qterminal konsole
Install net browsers, Firefox is far more powerful but use GTK where Falkon is using Qt but is far to be complete and fast. But anyway having several browser is always useful.
$ sudo pacman -S firefox falkon
Install general software:
$ sudo pacman -S code kate okular dolphin xsel p7zip unrar kvantum-qt5 openssh ksysguard htop
Install some fonts!
$ sudo pacman -S ttf-liberation noto-fonts ttf-roboto ttf-anonymous-pro ttf-hack ttf-inconsolata noto-fonts-emoji powerline-fonts adobe-source-code-pro-fonts ttf-fira-mono
$ pikaur -S oh-my-zsh-git
Install a konsole color scheme, I installed bl1nk.
Aliases for color:
alias diff='diff --color=auto'
$ sudo pacman -S grc
$ sudo pacman -S papirus-icon-theme
SDDM theme: I installed Sugar Dark for SDDM.
Install a Terminal multiplexers:
$ sudo pacman -S tmux