How to Install Arch Linux: Beginner’s Step-by-Step Installation Guide

The installation of Arch Linux has been and continues to be a daunting task for many. Well it's not anymore.

19
How to Install Arch Linux

Arch Linux is not difficult to install. In this guide I will going to show you how to easily install Arch Linux with the GNOME Desktop Environment.

Many Linux users really want to give Arch Linux a try, but the general notion that Arch is difficult to install and learn stops many of them. When people say it’s “hard,” they really mean that it takes effort. And they’re right – you do have to put a little bit more effort into installing your system, setting everything up, and reading about how to do what you want to do.

However, you end up with a system you understand very well and set up just the way you want it. Once installed, Arch Linux is as easy to run as any other distro, if not easier.

You can install Arch Linux directly to your computer by following this guide, but you can also install it on a virtual machine by using VirtualBox.

IMPORTANT! VirtualBox’s users must enable EFI in the virtual machine settings before starting the installation. Otherwise an error will occur when attempting to install the GRUB bootloader.

Arch Linux VirtualBox Install: Enable EFI

This Arch Linux how to installation guide shows the whole process in easy-to-follow steps.

So, without wasting any more time, let’s get started.

1. Download the Arch Linux Installation Image

The first thing that we need to do is to obtain an image of Arch Linux. To do so, visit the the Arch Linux download page to download the ISO image file. Grab the latest CD image. Both direct download and torrent links are available.

Related: Best Torrent Clients You Can Use on Linux Desktop

Download Arch Linux Installation Image

2. Prepare Live Bootable USB

Once your Arch Linux ISO file finishes downloading, you will have to create a live USB of Arch Linux from the ISO you just downloaded. There are many ways to prepare a live USB, one of them is by using the dd command.

Alternatively, you can use applications such as Etcher or Ventoy, which are also good options for creating a bootable USB drive.

3. Boot Arch Linux from the Live USB

Once you have created a live USB for Arch Linux, shut down your computer, plug the USB into it and then boot your system.

Please keep in mind, that in some cases you may not be able to boot from live USB with secure boot enabled. If that’s the case with you, access the BIOS and disable the secure boot first.

There are two possible options of Arch Linux installation – legacy and UEFI mode. The UEFI (Unified Extensible Firmware Interface) mode is more up-to-date and most of the modern hardware supports only the UEFI installation. Therefore, this Arch Linux how-to installation guide will use the UEFI mode.

Once you have properly booted into the Arch ISO, you should see something similar to the image shown below.

Boot from the Arch Linux Installation ISO File

Choose the Arch Linux install medium (x86_64, UEFI) option and hit the Enter.

After the installer decompresses and loads the Linux kernel you will be automatically thrown to a terminal with root privileges.

Start Installing Arch Linux

4. Verify Connectivity to the Internet

First of all, check the internet connection. To check internet connectivity, simply ping a website as shown in the example below.

ping -c 3 archlinux.org
PING archlinux.org (95.217.163.246) 56(84) bytes of data.
64 bytes from archlinux.org (95.217.163.246): icmp_seq=1 ttl=52 time=57.4 ms
64 bytes from archlinux.org (95.217.163.246): icmp_seq=2 ttl=52 time=57.4 ms
64 bytes from archlinux.org (95.217.163.246): icmp_seq=3 ttl=52 time=58.4 ms

--- archlinux.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 57.394/57.739/58.376/0.450 ms

If you use a wired connection, it is usually picked up automatically. In case you receive an error message, please check your internet connection or router.

Related: How To Set Static IP Address And Modifying Routing Table On Linux

Now after completed connectivity checks, we can move ahead to our Arch Linux installation.

5. Partition the Disk

The next step in our Arch Linux installation guide is to partition the hard drive. Here is where you will probably most likely find the most trouble if you are not familiar with partitioning tools such as fdisk or cfdisk. But don’t worry, it’s easy as you’ll see.

First list your disks:

fdisk -l
Disk /dev/sda: 20GiB, 21474836480 bytes, 41943040 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop0: 662.69 MiB, 694882304 bytes, 1357192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

For the purposes of this guide, a virtual machine has been created with a blank 20GB hard disk identified by /dev/sda. Change /dev/sda with your device name.

For a basic partition, we need to create the following partition layout:

  • /dev/sda1: EFI System partition with 512 MB size, FAT32 formatted. This provide space for storing boot loaders and other files required for booting.
  • /dev/sda2: Swap partition, 4GB size. Swap space is used to extend the virtual memory beyond the installed physical memory (RAM), or for suspend-to-disk support.
  • /dev/sda3: Linux partition, with size of the remaining free disk space, EXT4 formatted. This is the root (/) partition on which our Arch Linux operating system, files, and other information will be stored.

5.1 Create EFI System Partition

Now let’s actually start creating disk layout partition table by running cfdisk command against machine hard drive.

cfdisk /dev/sda
Arch Linux Install: Start Partitioning

Select GPT label type and hit Enter.

Then select Free Space and hit on New from the bottom menu. You can navigate through the menu options using the Tab or arrow keys.

Arch Linux Install: Create Boot Partition

Type the partition size in MB (512M) and press Enter key.

Set Boot Partition Size

With the /dev/sda1 partition still selected, select Type from the bottom menu and choose EFI System partition type.

Set Boot Partition Type
Set Boot Partition Type

You’ve finished configuring the EFI System partition.

Boot Partition Successfully Created

5.2 Create Swap Partition

Now let’s create the Swap partition using the same procedure. Select again the remaining Free space and and hit on New.

Arch Linux Install: Create Swap Partition

Type the partition size in GB (4G) and press Enter key.

Set Swap Partition Size

With the /dev/sda2 partition still selected, select Type from the bottom menu and choose Linux swap partition type.

Set Swap Partition Type
Set Swap Partition Type

You’ve finished configuring the Swap partition.

Swap Partition Successfully Created

5.3 Create Root Partition

Finally you need to create the root (/) partition. Once again select the remaining Free space and hit on New.

Arch Linux Install: Create Root Partition

For size, leave the default size value. This mean, all the remaining free space. Press Enter key.

Set Root Partition Size

With the /dev/sda3 partition still selected, select Type from the bottom menu and choose Linux filesystem partition type.

Root Partition Type
Set Root Partition Type

You’ve finished configuring the root partition.

Root Partition Successfully Created

5.3 Write Changes to Disk

Next you need to save the changes made. Choose Write from the bottom menu and hit Enter.

Write Changes to Disk

Type yes and press the Enter key.

Confirm Writing Changes to Disk

We’re done here. Select Quit and press Enter to do so.

Exit cfdisk Partitioning Tool

6. Create File System

Now that you have your disk partitions ready, it’s time to create file system on it. But let first review the partition table summary by running:

fdisk -l
Disk /dev/sda: 20GiB, 21474836480 bytes, 41943040 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8F633EFF-376D-3C46-8540-4C1BB8EBD4B1

Device       Start      End  Sectors  Size  Type
/dev/sda1     2048  1050623  1048576  512M  EFI System
/dev/sda2  1050624  9439231  8388608    4G  Linux swap
/dev/sda3  9439232 41943006 32503775 15.5G  Linux filesystem

Disk /dev/loop0: 662.69 MiB, 694882304 bytes, 1357192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

The /dev/sda disk should have three partitions (/dev/sda1, dev/sda2, and /dev/sda3) similar to those shown above.

The creation of the partitions in the previous steps simply drew boundaries on the storage space offered by the hard drive and specified the type of space between each boundary line. Now, it’s time to format the partitions with the required file systems.

We have to create 3 file systems here, so let’s get started.

For the EFI partition type, create a FAT32 file system.

mkfs.fat -F32 /dev/sda1

Prepare the swap partition:

mkswap /dev/sda2
swapon /dev/sda2

For the root partition, create an ext4 file system:

mkfs.ext4 /dev/sda3

7. Install Arch Linux

First sync the pacman repository so that you can download and install software:

pacman -Syy

We must mount the root partition (/dev/sda3) to the /mnt directory before we can perform any installation.

mount /dev/sda3 /mnt

With root mounted, it’s time to install all the necessary packages. Use the pacstrap command to install Arch Linux required packages.

pacstrap /mnt base linux linux-firmware sudo nano

It will take some time to download and install these packages. Now we can start configuring our system.

8. Configure the Installed Arch System

After the installation completes, generate fstab file for your new Arch Linux system by issuing the following command:

genfstab -U /mnt >> /mnt/etc/fstab

Now that we have installed Arch Linux, we need to switch to the physically installed root partition using the arch-chroot command.

arch-chroot /mnt

Next, let’s configure the timezone. To find your timezone, you can list (ls -l) the contents of the /usr/share/zoneinfo/ directory. Find your preferred timezone (/usr/share/zoneinfo/Zone/SubZone) where Zone/SubZone is your selection such as America/New_York, Europe/Paris, Asia/Bangkok, and so on. You got the idea.

Create a symbollic link to set the timezone (replace “America/New_York” with your timezone).

ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

Now we need to setting up locale. The file /etc/locale.gen contains locale settings and system languages and is commented by default. We must open this file using a text editor and uncomment the line which contains the desired locale.

nano /etc/locale.gen

Uncommnent en_US.UTF-8 UTF-8, en_US ISO-8859-1 (by removing the # sign), and and other needed locales in /etc/locale.gen. Then, press Ctrl+O Enter to save and Ctrl+X to exit the editor.

Arch Linux Install: Setting Up Locales

Now generate the locale config file using the below commands one by one:

locale-gen

Create and set the LANG variable.

echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8

Now we will move ahead and set the hostname. A hostname is the computer’s name. Let’s name it arch-pc. Use the following command:

echo arch-pc > /etc/hostname

You also need to add this name to the /etc/hosts file. Edit /etc/hosts file with Nano editor to add the following lines to it (replace arch-pc with hostname you chose earlier).

nano /etc/hosts
127.0.0.1      localhost
::1            localhost
127.0.1.1      arch-pc

You should also set the password for the root account using the passwd command:

passwd

Type your password twice. Be attentive, as you will see nothing while typing.

9. Install GRUB Bootloader on Arch Linux

Now we install the boot loader in order for Arch to boot up after restart. The default boot loader for Linux distributions and Arch Linux also is represented by the GRUB package.

Install the GRUB bootloader and EFI boot manager packages:

pacman -S grub efibootmgr os-prober mtools

Then create the mount point for /dev/sda1 and mount it.

mkdir /boot/efi
mount /dev/sda1 /boot/efi

Now let’s install our boot loader.

grub-install --target=x86_64-efi --bootloader-id=grub_uefi
Installing for x86_64-efi platform.
Installation finished. No error reported.

Finally, generate the /boot/grub/grub.cfg file.

grub-mkconfig -o /boot/grub/grub.cfg

10. Install a Desktop Environment on Arch Linux

For now, the Arch Linux system contains only the basic software packages needed to manage the system from command line, with no GUI (Graphical User Interface).

There are many desktop environments that can be used with Arch Linux. I will install GNOME as a desktop environment example.

First step is to install X environment. Type the below command to install the Xorg as display server.

pacman -S xorg-server xorg-apps

Then install an appropriate video driver.

Nvidia users:

pacman -S nvidia nvidia-utils

AMD / ATI users:

pacman -S xf86-video-ati

Intel users:

pacman -S xf86-video-intel

Now, you can install GNOME desktop environment on Arch Linux using:

pacman -S gnome gnome-extra networkmanager

GNOME offers a choice of provider for the download. For each prompt, select the appropriate provider and press Enter to proceed. If you are unsure, just press Enter to accept defaults.

Enable the GDM display manager and Network Manager.

systemctl enable gdm
systemctl enable NetworkManager

11. Create a Regular User Account

The method of creation for the user account will automatically create the home directory for the user as well. In addition, we can give this account sudo privileges. Write your name instead of linuxiac.

useradd -m -G wheel linuxiac

Be sure to set a password for the new user:

passwd linuxiac

Next, enable sudo privileges for a newly created user:

EDITOR=nano visudo

Scroll down the screen and find the line:

# %wheel ALL=(ALL) ALL

Uncomment it, by removing the # sign.

12. Arch Linux Installation is Done

Congratulations! Now we are done with our Arch Linux installation so we will now exit from the terminal and unmount our root partition and reboot to our newly installed Arch Linux system.

exit
umount -R /mnt
reboot
Arch Linux Successfully Installed

From this point, you can install what you want and configure your Arch Linux as you want.

Related: How to Use Pacman to Manage Software on Arch Linux

Arch Linux Successfully Installed with GNOME Desktop Environment

Conclusion

So, this step-by-step Arch Linux how to installation guide is over. I know it was long but I have tried to cover all steps in brief and other additional things from scratch. However, with a little patience, you can surely accomplish it and then tell the world that you use Arch Linux.

So, is Arch Linux hard to install? I think, not at all. It just looks lengthy for a new Linux user to install.

Arch Linux installation itself provides a great deal of learning. As you probably know, Arch Linux is a rolling-release distribution. This means that you shouldn’t have to install it more than once for any system.

In addition, as an Arch user, the Arch Wiki will be an extremely valuable resource to you. This resource is so well-composed and maintained that even non-Arch users glean knowledge and solutions from it daily.

If you want to share your experience about the Arch installation process, please feel free to leave your comment below.

I have tried to make this tutorial as simple as possible. Thanks for using it!

If this guide has helped you, please consider buying us a coffee.

Buy me a coffee!

Your support and encouragement are greatly appreciated!

19 Comments

      • Hi, thanks for your excelent tutorial! I have a question, when I run point 8 (genfstab -U /mnt >> /mnt/etc/fstab) , the fstab file does not included or added the /boot/efi partition, only swap and root partition. When I rebooted, it works perfectly but does not mount /boot/efi. It’s that ok or I needed to mount manually this partition to fstab file? Thanks

        • Hi Roberto,

          It’s OK and you should have no worries.
          If you mounted your EFI partition during installation, and set it to /boot/efi, it’s not going to be an issue.

  1. A good beginners’ tutorial! You could probably have mentioned *how* to find your timezone, which in my case I knew was Europe/Berlin – but maybe others don’t know that?

    For dual boot (with Windows): I stopped after creating the EFI partition. If you install Windows first, it will install a 100MB EFI partition which would be usable (worked for me in a dual boot scenario for many years), but could be a bit small for more advanced stuff. After leaving the Arch installer, install Windows first, then make it smaller, then install Arch using the already created EFI partition (rest as you wrote).

    For triple boot (which is what I did): do the dual boot steps like above, but leave /make room and more partitions. The Arch installer will not automatically detect other installed Linux distributions, so I would:

    1. create that EFI partion like above
    2. install indows, then make it smaller with its own tools (disk manager)
    3. create more partitions with the Arch installer (I used separate swap and root for each)
    4. install Arch as described in this nice guide
    5. install your second Linux (in my case, Debian Bullseye) which will detect the already installed Arch and won’t touch it

    Cheers,
    Wolfgang

    • Hi Wolfgang,

      Thank you very much for your remarks. An explanation has been added especially for the time zones.

      You can use the os-prober command that lists other operating systems. It is used during installation and reconfiguration to create a GRUB boot menu that shows other installed OSes.

      Then just regenerate GRUB with:
      grub-mkconfig -o /boot/grub/grub.cfg

      Тhank you again for your valuable explanations!

      Best,
      Bobby

  2. Why this difficult way. Every newby will be shocked. Better use the live system and start the installation with GUI from there?

    • Hi Marcel,

      Arch doesn’t come with its own native GUI installer. Generally speaking, there is no such thing in Arch.

      Of course, Arch-based distros such as Manjaro or EndeavorOS, offer exactly what you’re talking about.

      Best,
      Bobby

  3. That was excellent, thank you. I’m a longtime Ubuntu and Linux Mint user and have always feared installing Arch. The only thing that would keep me from trying the steps in this tutorial is worrying how to keep my /home directory intact, which I have set up on a separate partition.

  4. I know that most people who in stall Arch want a minimal system or to control what is installed. However, Arch needs an install script or graphical installer that takes you through the install, and at the end of it you should have a working system where you have at least one user set up, and ALL of the system hardware is functional. Part of the install script or installer should let you install a GUI desktop of your choice and install it if you choose to.

  5. What a garbage and mystification of installation. This returns us to stone age…
    The best and simplest way is to download and run calam-arch-installer (from Surceforge) with all of this described in text above but with GUI way.
    Enjoy!

  6. Installing arch is not hard, just time consuming.

    Follow the wiki.
    Hit a problem.
    Follow the wiki.
    Hit a problem.
    Follow the wiki.

    Repeat until you can boot arch and your networking works.

    Then you can keep incrementally fixing it every time anything goes wrong by… following the wiki.

  7. I was thrilled to see a concise and short Arch Linux install; however, after installing (virtualbox) there’s no internet connection. Even though ping -c 3 did work during the initial setup, it’s lost when you chroot into the system. No network tools are installed! Bummer.

    • Hi Michael,

      Please make sure that you do not forget to execute the command mentioned in point 10:
      systemctl enable NetworkManager

      You can run the following commands after restarting the system to make the network connectivity automatically available:
      sudo systemctl start NetworkManager
      sudo systemctl enable NetworkManager

      To install the network tools so that they are available immediately after installation, you can perform during installation (while you are in a chroot environment):
      pacman -S net-tools

      Regards

      • Thank you! I cannot believe I missed network manager. Installation is now complete with internet. I’m not a big fan of Gnome. So, I chose xfce. Only problem is I cannot get a display manager to work. I tried Slim and it errors. I guess I need to configure a conf file. Thanks again!

Leave a Reply

Your email address will not be published.

Latest from Linux Knowledge