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)
Top Articles
Furniture Store in Charlotte, NC
Guide to visiting IKEA Charlotte - Charlotte On The Cheap
Spasa Parish
Rentals for rent in Maastricht
159R Bus Schedule Pdf
Sallisaw Bin Store
Black Adam Showtimes Near Maya Cinemas Delano
Espn Transfer Portal Basketball
Pollen Levels Richmond
11 Best Sites Like The Chive For Funny Pictures and Memes
Things to do in Wichita Falls on weekends 12-15 September
Craigslist Pets Huntsville Alabama
Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
What's the Difference Between Halal and Haram Meat & Food?
R/Skinwalker
Rugged Gentleman Barber Shop Martinsburg Wv
Jennifer Lenzini Leaving Ktiv
Justified - Streams, Episodenguide und News zur Serie
Epay. Medstarhealth.org
Olde Kegg Bar & Grill Portage Menu
Cubilabras
Half Inning In Which The Home Team Bats Crossword
Amazing Lash Bay Colony
Juego Friv Poki
Dirt Devil Ud70181 Parts Diagram
Truist Bank Open Saturday
Water Leaks in Your Car When It Rains? Common Causes & Fixes
What’s Closing at Disney World? A Complete Guide
New from Simply So Good - Cherry Apricot Slab Pie
Fungal Symbiote Terraria
modelo julia - PLAYBOARD
Abby's Caribbean Cafe
Joanna Gaines Reveals Who Bought the 'Fixer Upper' Lake House and Her Favorite Features of the Milestone Project
Tri-State Dog Racing Results
Trade Chart Dave Richard
Lincoln Financial Field Section 110
Free Stuff Craigslist Roanoke Va
Stellaris Resolution
Wi Dept Of Regulation & Licensing
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Crystal Westbrooks Nipple
Ice Hockey Dboard
Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
Craigslist Pets Inland Empire
Infinity Pool Showtimes Near Maya Cinemas Bakersfield
Hooda Math—Games, Features, and Benefits — Mashup Math
Dermpathdiagnostics Com Pay Invoice
How To Use Price Chopper Points At Quiktrip
Maria Butina Bikini
Busted Newspaper Zapata Tx
Latest Posts
Article information

Author: Tish Haag

Last Updated:

Views: 5998

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Tish Haag

Birthday: 1999-11-18

Address: 30256 Tara Expressway, Kutchburgh, VT 92892-0078

Phone: +4215847628708

Job: Internal Consulting Engineer

Hobby: Roller skating, Roller skating, Kayaking, Flying, Graffiti, Ghost hunting, scrapbook

Introduction: My name is Tish Haag, I am a excited, delightful, curious, beautiful, agreeable, enchanting, fancy person who loves writing and wants to share my knowledge and understanding with you.