How to install Arch Linux and set up a Graphical Environment (Guide) (2024)

In this article, I am going to show you how to install Arch Linux on your laptop/computer, and after that, I will be showing you how to set up a graphical desktop environment. So, let’s jump right in.

  • This installation is not for beginners or people who are starting out with Linux. If you are a Linux newcomer, try something like Ubuntu or Pop!_OS.
  • This installation guide will wipe out ALL existing data on your Hard Drive/SSD. So please back up any important data before proceeding.
  • This installation requires a working internet connection to follow, as we will be downloading gigabytes of data.
  • 512MB RAM (2GB Recommended)
  • x86_64 (64-bit) system
  • 20GB of disk space
  • USB Stick (2GB or more)
  • A decent internet connection
  • A bit of familiarity using the command line
  • A LOT of time, installing Arch is a long process, especially if you have a slow internet connection
  1. Grabbing the ISO
  2. Burning the ISO to a USB stick
  3. Booting from the live USB
  4. Disk partitioning
  5. Creating filesystem
  6. Connecting to Internet
  7. Selecting a good mirror
  8. Installing to disk
  9. Configuring the system
  10. Installing a bootloader
  11. Adding a user
  12. Installing a desktop environment
  13. Configuring network postinstall

Grabbing the ISO

Head over here and download the latest ISO, either directly or over torrent. The file is going to have a .iso extension and should be about 700MB in size.

Burning the ISO to a USB Stick

To boot into Arch Linux, you need to burn the .iso file to a USB Stick, with a minimum size of 2GB. (Optional: use a USB 3.0 flash drive for faster write speeds and better experience.)

Follow these steps in order:

  • Download balenaEtcher for your platform (Windows, macOS, Linux)
  • Install and open it
  • Choose the ISO file you just downloaded
  • Plug in your USB Stick (Etcher should detect your USB automatically, if not then you can choose it manually).
  • Note: double-check before choosing the USB stick and I recommend to remove any other flash drives, so that there is no confusion.
  • Click on “Flash!” and wait for it to finish. (Note: All existing data on the USB stick will be lost).
  • You now have a bootable Arch Linux USB stick.

Alternative method: Using Android

If you are not able to use a computer for some reason, then do not worry, you can also use an Android phone. Do note that you need to have an adapter to connect your phone to a USB.

Follow these steps on an Android:

  • Download the app named EtchDroid
  • Open the app and choose the first option — “Write a raw image or ISO”
How to install Arch Linux and set up a Graphical Environment (Guide) (2)
  • Choose the ISO file.
  • Select your USB drive.
How to install Arch Linux and set up a Graphical Environment (Guide) (3)
  • Click on the flash button.
  • You now have a bootable Arch USB.

Booting from the Live USB

  • Shut down your computer and plug in your USB.
  • Boot up your system again. While booting keep pressing F2, F10 or F12 depending on your motherboard.
  • Note: in some cases the boot is unable to occur because of secure boot. If this is the case for you, you need to disable secure boot in your BIOS.
  • You should see something like this.
How to install Arch Linux and set up a Graphical Environment (Guide) (4)
  • Choose the first option — “Boot Arch Linux (x86_64) and wait for it to boot.
  • The steps following this step are all command-line based and are very crucial for your install. Read these steps carefully.

Disk Partitioning

We are going to use a utility called fdisk which allows us to partition the hard drive. Follow these commands step by step:

List the disks

fdisk -l

Note: Your disk might be labeled as /dev/sda or /dev/nvme0n1. Follow these steps very carefully and replace /dev/sda with /dev/nvme0n1 if required.

Select the disk which we will install Arch on:

fdisk /dev/sda

Creating an EFI Partition (only for UEFI)

Enter ’n’ in fdisk and choose the disk number as 1. Press enter on First Sector and type +512M on Last Sector.

How to install Arch Linux and set up a Graphical Environment (Guide) (5)

Press ‘t’ to change type. Press ‘L’ to see all partition types and choose “EFI System” by its corresponding number.

Creating the root partition

While you are in fdisk, press ’n’ to create a new partition. It is automatically going to give it partition number 2. Keep pressing enter for the default options and the remaining space will automatically be allocated to the root partition.

How to install Arch Linux and set up a Graphical Environment (Guide) (7)

Enter ‘w’ to write the changes to disk. Note: your disk is now blank and all your data has been erased.

Creating filesystem

Like the default filesystem for Windows is NTFS, the default for macOS is APFS, similarly for Linux it is ext4.

For UEFI Systems: Creating two partitions, for EFI and for Root.

Create a FAT32 filesystem for the EFI Partition:

mkfs.fat -F32 /dev/sda1

Create an ext4 filesystem for the root partition: (This may take some time depending upon the size of your partition)

mkfs.ext4 /dev/sda2

For Legacy (BIOS) Systems: Creating only 1 Root Partition:

Create an ext4 filesystem for the root partition:

mkfs.ext4 /dev/sda1

Connecting to Internet

All the steps before this did not require internet access. But the upcoming steps do.

Ethernet

Ethernet users do not need to worry, as they are already connected and Arch has recognized their card.

WiFi

For WiFi, enter the command:

wifi-menu

You should see the connections in range and should be able to connect using a password.

Verify your connecting by:

ping google.com

If you get an output saying that it is sending bytes to google, you are successfully connected to WiFi.

Alternative method

Some WiFi cards are not recognized by Arch because they are proprietary. In that case, you can connect an Android to your computer via USB and choose USB tethering on your phone, and Arch should recognize it as an Ethernet connection. Verification:

ping google.com

Selecting a good mirror

Mirrors are different servers throughout the world from which packages are downloaded. Usually the automatic mirror selection is not very fast, and hence your download speed might be in bytes.

Thankfully, there is a fix for that.

First, update the pacman repositories:

pacman -Syy

Install reflector:

pacman -S reflector

Make a backup of your existing mirrorlist (just in case):

cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak

Get a good mirrorlist with reflector and save it:

reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist

(Note: Replace “US” with your country.)

Good to go.

Installing to disk

Everything is ready, and therefore, we are ready to finally install Arch on disk.

Mount the root partition:

mount /dev/sda2 /mnt

(Note: Replace /dev/sda2 with /dev/sda1 for Legacy systems.)

With the root partition mounted, its time to use a pacstrap script to install all the packages:

pacstrap /mnt base linux linux-firmware nano# base: the packages in every linux distro, which are essential
# linux: the Linux kernel
# linux-firmware: the firmware (drivers, etc.) for the kernel
# nano: a useful text editor for later

Configuring the system

Generating an fstab file:

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

Using arch-chroot to enter the mounted disk as root:

arch-chroot /mnt

Setting timezone:

timedatectl list-timezones # lists the timezones
timedatectl set-timezone Region/City
# Replace Region with your continent
# Replace City with your city

Setting locale:

locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG = en_US.UTF-8
# Replace en_US with your preferred locale, eg. en_GB

(Note: these can be changed later as well.)

Network configuration:

Setting a hostname (i.e. computer name):

echo arch-pc > /etc/hostname
# Replace arch-pc with your desired hostname
touch /etc/hosts
nano /etc/hosts
# Add this and replace arch-pc with your hostname
127.0.0.1 localhost
::1 localhost
127.0.1.1 arch-pc

Setting up a password for the root account:

passwd

Installing a bootloader

A bootloader is essential for making your Arch system bootable. In this case, we will be using grub, which is a very popular bootloader.

(Note: Make sure you are still using arch-chroot)

For UEFI Systems:

pacman -S grub efibootmgr
mkdir /boot/efi
mount /dev/sda1 /boot/efi
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg

For Legacy (BIOS) Systems:

pacman -S grub
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Adding a user

You need to have a user, as using the computer as root is not ideal and it is not safe. To add a user with administrative priveleges, execute the command:

pacman -S sudo
useradd -G wheel -m username

(Replace username with the name of your user).

Put a password for your account:

passwd username # Replace username with your username

Put a password for the root account:

passwd

Then, use nano or any other text editor, I will use nano in this case.

EDITOR=nano visudo

Scroll down and look for this line:

## %wheel ALL=(ALL) ALL

Remove the two hashtags in the front to uncomment the line. Save the file by pressing Ctrl + X .

Installing a desktop environment

Technically, Arch is installed and configured. But, this guide also includes how to set up a graphical user interface as we are still on the command line. There are a lot of officially supported desktop environments by Arch:

  • Budgie — Modern and lightweight
  • Cinnamon — Windows style and modern
  • Deepin — Modern and eye-candy
  • Enlightenment — Lightweight on system resources
  • GNOME — Modern but heavy
  • GNOME Flashback — Older version of GNOME
  • KDE Plasma — Modern, customizable and moderate on resources
  • LXDE — Lightweight and fast
  • LXQt — Qt port of LXDE
  • MATE — Intuitive and attractive
  • Sugar — Learning and educational
  • UKUI — Lightweight and default of Ubuntu Kylin
  • Xfce — Lightweight, modern and reusable

Depending on these characteristics, you should have chosen which one to install. Although you can install multiple desktops, it is not recommended.

Installing a display server (X Display Server or xorg):

pacman -S xorg

Installing the desktop environment (use any one command for your choice):

pacman -S budgie-desktop # For Budgie
pacman -S cinnamon # For Cinnamon
pacman -S deepin # For Deepin
pacman -S enlightenment # For Enlightenment
pacman -S gnome # For GNOME
pacman -S gnome-flashback # For GNOME Flashback
pacman -S plasma # For Plasma
pacman -S lxde-gtk3 # For LXDE
pacman -S lxqt # For LXQt
pacman -S mate # For MATE
pacman -S sugar sugar-fructose # For Sugar
pacman -S ukui # For UKUI
pacman -S xfce4 # For Xfce

Installing a display manager (login screen):

In this case, we will use GNOME Display Manager (gdm)

pacman -S gdm
systemctl start gdm.service
systemctl enable gdm.service
systemctl enable NetworkManager.service

Configuring network postinstall

Enter this command to install some of the common network tools:

pacman -Syu iwd netctl dialog dhcpcd wpa_supplicant ifplugd
exit
reboot

After booting back up, select Arch Linux in the GRUB menu and press enter. Enter your username and password and hit enter.

Enter these commands for the setup:

sudo su
systemctl enable iwd.service
systemctl start iwd.service
systemctl enable systemd-resolved.service
systemctl start systemd-resolved.service

And set up WiFi.

Shutdown:

shutdown now

And that’s it.

Congratulations, you have now installed Arch Linux and successfully set up a desktop for daily use. Now you can tell people “I use arch btw”.

Thank you for reading this article and if you liked it, follow me for more articles like this.

Credits:

How to install Arch Linux and set up a Graphical Environment (Guide) (2024)

FAQs

How to install Arch Linux and set up a Graphical Environment (Guide)? ›

Using ALG or Arch Linux GUI to install Arch Linux

A diversity of desktops and Tiling Window Managers. Choose and install with a graphical installer Calamares.

How to install Arch Linux using GUI? ›

  1. Step 1 Acquiring the Installation Image. ...
  2. Step 2 Verify the Signature (Optional) ...
  3. Step 3 Downloading BalenaEtcher & Preparing your USB Drive. ...
  4. Step 4 Booting into the Arch Linux Live System. ...
  5. Step 5 Setting up Arch Linux. ...
  6. Step 6 Installing the Base System. ...
  7. Step 7 Configure the System. ...
  8. Step 8 Reboot your System.
Feb 21, 2024

Does Arch have a graphical installer? ›

Using ALG or Arch Linux GUI to install Arch Linux

A diversity of desktops and Tiling Window Managers. Choose and install with a graphical installer Calamares.

What are the system requirements for Arch Linux GUI? ›

Arch Linux requires a x86_64 (i.e. 64 bit) compatible machine with a minimum of 512 MB RAM and 800 MB disk space for a minimal installation. However, it is recommended to have 2 GB of RAM and at least 20 GB of storage for a GUI to work without hassle.

Is Arch Linux hard to set up? ›

Although using Arch Linux isn't all that difficult, installing it is another issue altogether. Unlike most Linux distributions, Arch Linux doesn't have a user-friendly GUI installer. It's all text-based and installation can be a challenge, even for people with plenty of experience using Linux.

How to install Arch Linux properly? ›

Follow the steps outlined below to install Arch Linux.
  1. Step 1: Download the Arch Linux ISO. ...
  2. Step 2: Create a Live USB or DVD. ...
  3. Step 3: Boot up Arch Linux. ...
  4. Step 4: Set the Keyboard Layout. ...
  5. Step 5: Check Your Internet Connection. ...
  6. Step 6: Enable Network Time Protocols (NTP) ...
  7. Step 7: Partition the Disks. ...
  8. Step 8: Create Filesystem.
Jun 11, 2024

What is the first step after installing Arch Linux? ›

The first thing to do after installing arch linux is to update the system by running a command in the terminal, which fetches the latest package information and upgrades all packages. Next, it is recommended to install core package tools like nano, git, and other necessary packages for a smooth experience.

What desktop environment do you use with Arch? ›

Desktop Environment ​

For beginners coming from Windows I recommend KDE Plasma or Cinnmaon.

Does Arch Linux have an installer? ›

archinstall is a helper library which automates the installation of Arch Linux.

Can I use Arch Linux as a beginner? ›

Arch comes with a splendid documentation and installing actually teaches you about some fundamental things about Linux if don't already know them. So even if you don't end up using arch as your daily driver it's worthwhile to go through the install guide on the wiki.

How much RAM is needed for an arch? ›

Your computer should have at least 512 MB of RAM and 1 GB of memory. For streamlined use, 2 GB of RAM and 20 GB of storage are recommended. The computer should also be x86-64 compatible.

What code does Arch Linux use? ›

Package Management

It was written in the C programming language by Judd Vinet. The package manager handles all the packages on the system, and does installation, removal, upgrades, and more. As a rolling release system, Arch Linux's repositories are being constantly updated.

What to know before installing Arch Linux? ›

Pre-installation
  • Acquire an installation image. ...
  • Verify signature. ...
  • Prepare an installation medium. ...
  • Boot the live environment. ...
  • Set the console keyboard layout and font. ...
  • Verify the boot mode. ...
  • Connect to the internet. ...
  • Update the system clock.
May 24, 2024

Why not to use Arch Linux? ›

You may not want to use Arch, if: you do not have the ability/time/desire for a 'do-it-yourself' GNU/Linux distribution. you require support for an architecture other than x86_64. you take a strong stance on using a distribution which only provides free software as defined by GNU.

Can I use Arch Linux for daily use? ›

I use Arch as a daily driver as well. I started using Linux in general a year or so ago, and started using Arch as a daily driver three months ago. Arch in school is awesome, I can do everything I did with Windows, just... faster and better, even the screenreader is snappier!

Can you install Arch Linux on a virtual machine? ›

Enabling EFI for Arch as guest is optional. If you want to install Arch Linux in EFI mode inside VirtualBox, you must change the firmware mode for the virtual machine. This must be done before installing Arch as guest, changing the option afterwards will result in an unbootable machine unless the setting is reverted.

How to install Arch Linux from flash drive? ›

To create an Arch Linux installer, download the ISO image file on your Android device. Plug the USB drive to your device, using a USB-OTG adapter if needed. Open EtchDroid, select Flash raw image, select your Arch ISO, then select your USB drive. Grant the USB API permission and confirm.

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Tuan Roob DDS

Last Updated:

Views: 5309

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Tuan Roob DDS

Birthday: 1999-11-20

Address: Suite 592 642 Pfannerstill Island, South Keila, LA 74970-3076

Phone: +9617721773649

Job: Marketing Producer

Hobby: Skydiving, Flag Football, Knitting, Running, Lego building, Hunting, Juggling

Introduction: My name is Tuan Roob DDS, I am a friendly, good, energetic, faithful, fantastic, gentle, enchanting person who loves writing and wants to share my knowledge and understanding with you.