How to install Arch Linux


Staff member
  • UEFI system with CSM turned off – Arch Linux is compatible with legacy BIOSes, but for the sake of simplicity, I will not cover that in this video.
  • Linux knowledge – please do not attempt to install and use Arch without having any Linux experience, otherwise you’re in for a very bumpy ride. If you’d like to use an Arch distribution that is simpler to use and set up, check out Manjaro Linux.
  • An internet connection over Ethernet – a guide for setting up WiFi connections can be found here.
  • A USB drive with the Arch Linux installation ISO on it.

Now, the first installation step is only applicable to users of non-US keyboard layouts: You need to load your keymap using the loadkeys command – if you’re unsure what your keyboard layout code is, use ls /usr/share/kbd/keymaps/**/*.map.gz.

Next up, use the command timedatectl set-ntp true in order to enable time syncing over NTP.


The next step is partitioning your disk. This depends on factors like whether or not you’d like to create a swap partition or other partitions, but I’ll be going with the most basic setup – an EFI system partition and a root partition for Arch itself.

To list the disks on your system, enter fdisk -l. Once you’ve identified the disk you want to install Arch on, enter the command fdisk /dev/diskName.

Then, press n to create a new partition, p to mark it as primary, and use the defaults for all other prompts except for “last sector”, where you need to enter a size of at least 300MB, but I’m giving it 500MB just to be sure. Next, press t to set the partition type and set it to EF.

Repeat the same process for the root partition, but do not enter a value for “last sector” and set the type to 83. Then press w to write your changes to the drive.


The next step is formatting your filesystem.

Format your EFI partition as FAT32 using the mkfs.fat -F 32 /dev/*partition* command.

For your root partition, you need to decide on which filesystem to use and use its respective formatting command. Personally, I went with BTRFS and the mkfs.btrfs /dev/*partition* command.


Once you’ve formatted your filesystem, mount it using the mount /dev/*partition* /mnt command. Then, mount your EFI partition using the mount --mkdir /dev/*partition* /mnt/boot command.


The next step is installing a base set of packages using the pacstrap command. Install whatever packages you need, including the kernel, boot manager, text editors, network managers, microcode updates, etc.


Next, you need to generate the fstab for your new installation using the genfstab -U /mnt >> /mnt/etc/fstab command.


Now you need to chroot into your new installation using the arch-chroot /mnt command.


After chrooting, set your system’s timezone using ln -sf /usr/share/zoneinfo/*Region*/*City* /etc/localtime and run the hwclock --systohc command.


Edit the /etc/locale.gen and /etc/locale.conf files according to your locale and run the locale-gen command. If you use a non-US keyboard, edit /etc/vconsole.conf to permanently set your layout.


Then, edit the /etc/hostname file to set your system hostname.

Update initramfs​

Run mkinitcpio -P to update your initramfs, though this is usually not needed.

Boot loader​

Set up your bootloader, I will be using GRUB in this tutorial as I am most familiar with it.

For GRUB, run the grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB command to install it, then generate a config file using grub-mkconfig -o /boot/grub/grub.cfg


Lastly, set your password using the passwd command.

Then, reboot your system. If your internet connection does not work, make sure to start your network manager.

And that’s it! You’ve successfully installed a barebones Arch system. You’d likely want to install some things, such as a desktop environment, which I will also cover in this guide.

Installing sudo​

The first thing I would recommend doing after installation is installing the sudo package. Run pacman -Sy sudo to install it.

User Accounts​

After installing sudo, create a new user account and add it to the wheel group using the useradd -m -G wheel *username* command.

Then, reset its password using the passwd *username* command.

Configuring sudo​

Next up is configuring sudo. With its default configuration, no users will be able to use sudo. Use the visudo command and uncomment the line allowing sudo for members of the wheel group.

Installing and configuring yay​

After setting up sudo, I would recommend installing yay, which is a package manager for the Arch User Repository. Run sudo pacman -S --needed git base-devel && git clone && cd yay && makepkg -si to install the dependencies, clone its AUR repo, and install it.

After installing yay, configure it to add any AUR development packages you may have already installed with yay -Y --gendb, then check for updates with yay -Syu --devel and permanently enable development package updates with yay -Y --devel --save.

Desktop Environment​

Now I would recommend installing a desktop environment. I will cover both GNOME and KDE in this guide, but there are many more options to choose from.


You can install the gnome and gnome-extra groups to install GNOME, though these groups contain a lot of bloatware. If you want a barebones GNOME install, use the gnome-shell group instead, however you will need a separate display manager if you choose to install that group.

After installing GNOME, start your display manager using systemctl start gdm. And there you go - you’ve successfully installed GNOME! You’ll likely want to install GPU drivers as well to take advantage of your GPU's acceleration capabilities.


You can install KDE with the plasma group, or the plasma-desktop group for a barebones install. After installing KDE, start your display manager using systemctl start sddm.