https://github.com/pumukydev/arch-installation
Step-by-step guide to install Arch Linux on an UEFI system.
https://github.com/pumukydev/arch-installation
arch-linux grub paru pulseaudio qtile refind uefi x11 xorg
Last synced: 3 months ago
JSON representation
Step-by-step guide to install Arch Linux on an UEFI system.
- Host: GitHub
- URL: https://github.com/pumukydev/arch-installation
- Owner: PumukyDev
- Created: 2024-12-26T10:12:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-14T09:27:15.000Z (6 months ago)
- Last Synced: 2025-09-18T18:14:51.379Z (4 months ago)
- Topics: arch-linux, grub, paru, pulseaudio, qtile, refind, uefi, x11, xorg
- Homepage:
- Size: 186 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Arch Linux Installation Guide
A minimal Arch setup using Qtile on X11 in UEFI
## Getting Started
Download the latest Arch Linux ISO from the [official website](https://archlinux.org/download/), or get the latest version via torrent from [this link](https://archlinux.org/releng/releases/2025.05.01/torrent/).
Virtualization
To install Arch Linux in a virtual machine, simply open your preferred virtualization software (e.g., VirtualBox, VMware, QEMU/KVM, etc.) and select the downloaded `.iso` image as the boot medium.
Bare Metal Installation
To install Arch Linux on a physical machine, create a bootable USB drive using a tool like [Rufus](https://rufus.ie) on Windows or `dd` on Linux. Make sure to select the downloaded `.iso` file when creating the bootable media.
Once the USB is ready, reboot your system and enter the BIOS/UEFI setup to ensure that **Secure Boot** is **disabled** and that you're booting in UEFI mode. Then, boot from the USB drive.
## Set the keyboard layout
By default, the keyboard layout is set to **US**. You can see available layouts with:
-
root@archiso ~ # localectl list-keymaps
If you require a different layout, you can change it using the following command:
-
root@archiso ~ # loadkeys keymap
Examples
For example, to set the layout to Spanish:
-
root@archiso ~ # loadkeys es
## Verify the boot mode
The installation is quite different if you are using UEFI o BIOS Legacy, check the mode with the following command:
-
root@archiso ~ # cat /sys/firmware/efi/fw_platform_size
If it returns `64` or `32`, the system is booted in UEFI mode, and you can proceed with the tutorial. Otherwise, if the file does not exists, the system is booted in BIOS (Legacy) mode.
## Connect to the internet
To install Arch Linux, you will need an internet connection. Let's begin by checking the available network interfaces:
-
root@archiso ~ # ip link
You should see something like this:
```
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0f3u3c2: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether ab:cd:ef:gh:ij:kl brd ff:ff:ff:ff:ff:ff
4: wlan0: mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
link/ether ab:cd:ef:gh:ij:kl brd ff:ff:ff:ff:ff:ff
```
The first interface is the **loopback interface**, which is essential and should always be present. After that, you may have **more or fewer interfaces depending on your computer hardware**.
If you have an interface named **enpX or ethX**, it is an **Ethernet** interface. If you have one named **wlanX or wloX**, it is a **Wi-Fi** network card.
In order to establish a connection, you need to configure one of the following options. **Choose one based on your needs**.
Wired Connection - ethX or enpX
To establish a connection with a physical network interface, simply connect the Ethernet cable to the Ethernet port, no additional configuration is needed.
Wireless Connection - wlan0 or wlo0
To establish a connection with a Wi-Fi card, you need to **start the [iwd (iNet Wireless Daemon)](https://wiki.archlinux.org/title/Iwd) service**:
-
root@archiso ~ # systemctl start --now iwd.service
Then, you can connect to your **router** with the following command:
-
root@archiso ~ # iwctl --passphrase 'Your_Router_Password' station wlan0 connect 'Your_Router_Name'
> [!TIP]
> If you don't know the exact name of your router, run the following command:
>
-
>
>root@archiso ~ # iwlist wlan0 scan | more
>
>
Verify the connection by pinging Google or archlinux.org. One of them is enough.
-
root@archiso ~ # ping google.com
root@archiso ~ # ping 8.8.8.8
root@archiso ~ # ping archlinux.org
## Partition the disks
Disks are assigned to a **block device** such as `/dev/sdX`, `/dev/nvmeXnY`. To identify these devices use the following command:
-
root@archiso ~ # lsblk
You will see an output similar to this:
```
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 795.7M 1 loop /run/archiso/airootfs
sda 8:0 1 29GB 0 disk
|-sda1 8:1 1 954M 0 part
|-sda2 8:2 1 165M 0 part
nvme0n1 259:0 0 1.8T 0 disk
```
In the example you can see `sda`, which is the flash device. The other device is a 2TB NVMe where I will install Arch Linux, that's why it's called `nvme0n1`. If you have more devices they can be called sdb, sdc, etc or nvme1n1, nvme2n1, and so on.
Results ending in rom, loop or airootfs may be ignored. mmcblk* devices ending in rpbm, boot0 and boot1 can be ignored.
> [!NOTE]
> Here is a short explanation of each column:
> - NAME: Name of the block device (e.g., sda, nvme0n1, loop0).
> - MAJ:MIN: Major and minor device numbers identifying the device.
> - RM: Removable (1 for removable, 0 for fixed).
> - SIZE: Size of the device or partition.
> - RO: Read-only status (1 for read-only, 0 for read/write).
> - TYPE: Type of device (disk, part, or loop).
> - MOUNTPOINT: Where the device is mounted, if applicable.
Now that we know the name of the disk where we want to install Arch Linux, we can partition it:
-
root@archiso ~ # cfdisk /dev/disk_to_partition
Examples
Here is an example if your disk is called `sdb`:
-
root@archiso ~ # cfdisk /dev/sdb
Or if you have an `nvme` as me:
-
root@archiso ~ # cfdisk /dev/nvme0n1
A semigraphical tool will appear.
It will ask you to select a partition type. Press Return on `gpt`
| Select lable type |
|-------------------|
| gpt |
| dos |
| sgi |
| sun |
cfdisk provides the following options:
* `New`: to create partitions
* `Quit`: to quit cfdisk without saving changes
* `Help`: to display help
* `Write`: to write the partition table to disk
* `Dump`: to dump the partition table to a sfdisk-compatible script file
You are free to make the partitions as you wish. The [official wiki](https://wiki.archlinux.org/title/Partitioning#Example_layouts) provides a table like this:
| Mount point on the installed system | Partition | Partition type | Suggested size |
|-------------------------------------|---------------------------|-----------------------|----------------|
| /boot | /dev/efi_system_partition | Efi system partition | 1GiB |
| [SWAP] | /dev/swap_partition | Linux swap | At least 4 GiB |
| / | /dev/root_partition | Linux x86-64 root (/) | Remainder of the device. At least 23-32 GiB|
In addition of the partitions in the table above, I'm going to make a home partition for my user.
> [!TIP]
> To navigate between partitions and options, use the arrow keys: ← ↑ ↓ →
### 1. /boot
Press Return on `New` and type `1G`, then press Return again.
Navigate to the newly created partition, press Return on `Type`, and select `EFI System`.
### 2. [swap]
Press Return on `New` and type double the amount of your RAM in GB. For example, if you have 6GB of RAM, type `12G`, then press Return again.
Navigate to the newly created partition, press Return on `Type`, and select `Linux swap`.
### 3. /
Press Return on `New` and enter the amount of GB you want for your root partition, for example, `250G`, then press Return again.
Navigate to the newly created partition, press Return on `Type`, and select `Linux root (x86-64)`.
### 4. /home
Press Return on `New`, and to use the entire disk, press Return again.
Navigate to the newly created partition, press Return on `Type`, and select `Linux home`.
### 5. Write changes
Press Return on `Write` and type `yes`
### 6. Check partitions
To check the partitions, simply run the following command:
-
root@archiso ~ # fdisk -l /dev/partitioned_disk
Examples
-
root@archiso ~ # fdisk -l /dev/sdb
-
root@archiso ~ # fdisk -l /dev/nvme0n1
## Format the partitions
Once the partitions have been created, each newly created partition must be formatted with an appropriate file system.
### 1. /boot
-
root@archiso ~ # mkfs.fat -F 32 /dev/efi_system_partition
Examples
-
root@archiso ~ # mkfs.fat -F 32 /dev/sdb1
-
root@archiso ~ # mkfs.fat -F 32 /dev/nvme0n1p1
### [swap]
-
root@archiso ~ # mkswap /dev/swap_partition
Examples
-
root@archiso ~ # mkswap /dev/sdb2
-
root@archiso ~ # mkswap /dev/nvme0n1p2
### /
-
root@archiso ~ # mkfs.ext4 /dev/root_partition
Examples
-
root@archiso ~ # mkfs.ext4 /dev/sdb3
-
root@archiso ~ # mkfs.ext4 /dev/nvme0n1p3
### /home
-
root@archiso ~ # mkfs.ext4 /dev/home_partition
Examples
-
root@archiso ~ # mkfs.ext4 /dev/sdb4
-
root@archiso ~ # mkfs.ext4 /dev/nvme0n1p4
## Mount the file systems
### 1. /boot
-
root@archiso ~ # mount --mkdir /dev/efi_system_partition /mnt/efi
Examples
-
root@archiso ~ # mount --mkdir /dev/sdb1 /mnt/efi
-
root@archiso ~ # mount --mkdir /dev/nvme0n1p1 /mnt/efi
### [swap]
-
root@archiso ~ # swapon /dev/swap_partition
Examples
-
root@archiso ~ # swapon /dev/sdb2
-
root@archiso ~ # swapon /dev/nvme0n1p2
### /
-
root@archiso ~ # mount /dev/root_partition /mnt
Examples
-
root@archiso ~ # mount /dev/sdb3 /mnt
-
root@archiso ~ # mount /dev/nvme0n1p3 /mnt
### /home
-
root@archiso ~ # mount --mkdir /dev/home_partition /mnt/home
Examples
-
root@archiso ~ # mount --mkdir /dev/sdb4 /mnt/home
-
root@archiso ~ # mount --mkdir /dev/nvme0n1p4 /mnt/home
## Installation
Packages are downloaded from mirrors listed in `/etc/pacman.d/mirrorlist`. After connecting to the internet, the reflector tool updates the list by selecting the 20 most recent HTTPS mirrors and sorting them by download speed.
## Install essential packages
Use the `pacstrap` script to install the base package
-
root@archiso ~ # pacstrap -K /mnt base linux linux-firmware nano networkmanager
If you plan to use Wi-Fi later, you will need to install three additional packages:
-
root@archiso ~ # pacstrap -K /mnt netctl wpa_supplicant dialog
> [!IMPORTANT]
> I recommend installing `amd-ucode` or `intel-ucode` as well. These packages provide CPU microcode updates for hardware bugs and security fixes. Just add `amd-ucode` or `intel-ucode` to the `pacstrap` installation.
## Generate fstab
We have to generate `fstab`, which is used to define how disk partitions are mounted during **system startup**. The genfstab tool automatically detects the partitions mounted on /mnt and writes them to /mnt/etc/fstab, allowing the system to mount them correctly on **boot**.
-
root@archiso ~ # genfstab -U /mnt > /mnt/etc/fstab
## Chroot
Change root into the new system:
-
root@archiso ~ # arch-chroot /mnt
## Time
To set the time zone, you first need to list the available time zones. Run the following command to see the available options:
-
[root@archiso /]# timedatectl list-timezones | more
Then, create a symbolic link to the correct time zone for your region and city:
-
[root@archiso /]# ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
Examples
For example, to set the time zone to Europe/Madrid:
-
[root@archiso /]# ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime
Run the following command to generate the `/etc/adjtime` file, which is used to store hardware clock settings:
-
[root@archiso /]# hwclock -w
## Locale and Keymap
To set the system locale, edit the `/etc/locale.gen` file with nano and **uncomment** `en_US.UTF-8` and any other necessary UTF-8 locales. For example, I'll uncomment `es_ES.UTF-8`.
-
[root@archiso /]# nano /etc/locale.gen
> [!TIP]
> You can find them easily with CTRL + W
After uncommenting the needed locales, generate them by running:
-
[root@archiso /]# locale-gen
You should see an output similar to:
```
Generation locales...
en_US.UTF-8 ... done
xx_XX.UTF-8 ... done
Generation complete.
```
Next, set your preferred system language by saving it in `etc/locale.conf`:
-
[root@archiso /]# echo LANG=language_COUNTRY.UTF-8 > /etc/locale.conf
> [!WARNING]
> I strongly recommend using English because some system messages or translations in other languages may be incomplete or incorrect.
Examples
-
[root@archiso /]# echo LANG=en_US.UTF-8 > /etc/locale.conf
-
[root@archiso /]# echo LANG=es_ES.UTF-8 > /etc/locale.conf
Then, set the console keymap according to your preference by saving it in `/etc/vconsole.conf`.
-
[root@archiso /]# echo KEYMAP=keymap > /etc/vconsole.conf
Examples
For **English (US)** keymap:
-
[root@archiso /]# echo KEYMAP=en > /etc/vconsole.conf
For **Spanish** keymap:
-
[root@archiso /]# echo KEYMAP=es > /etc/vconsole.conf
## Set Hostname
To set the hostname of your system, use the following command:
-
[root@archiso /]# echo hostname > /etc/hostname
Examples
For example, to set the hostname to HP:
-
[root@archiso /]# echo HP > /etc/hostname
## Root password
To set the root password, run the following command:
-
[root@archiso /]# passwd
## Create a User
To create a new user, run the following command
-
[root@archiso /]# useradd -m user
Examples
For example, to create a user named pumukydev:
-
[root@archiso /]# useradd -m pumukydev
To set a password for that user, run:
-
[root@archiso /]# passwd user
Examples
For example, to set a password for user pumukydev
-
[root@archiso /]# passwd pumukydev
## bootloader
In order for your Arch system to boot properly after powering off, you'll need a bootloader. There are plenty of options available. In this tutorial, I’ll explain how to install GRUB or rEFInd, **choose one of them**:
Grub
-
[root@archiso /]# pacman -S grub efibootmgr
To install it, run the following command:
-
[root@archiso /]# grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
If the installation finishes without any issues, generate the GRUB configuration file with:
-
[root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg
rEFInd
-
[root@archiso /]# pacman -S refind
Then, install it to your EFI system:
-
[root@archiso /]# refind-install --esp /efi
You should see output indicating that rEFInd was installed successfully. You can check that rEFInd was copied correctly by listing the contents of the EFI directory:
-
[root@archiso /]# ls /efi/EFI/refind
You should see files like:
```
refind.conf refind_x64.efi drivers_x64/
```
## Exit
If you followed the steps correctly, congratulations! You have finished installing Arch Linux. To check if everything is working, follow these steps:
1. Exit from chroot
-
[root@archiso /]# exit
2. Turn off the computer or virtual machine
-
root@archiso ~ # poweroff
3. Remove the USB installation media.
4. Turn on your computer.
Upon rebooting, you should see the GRUB menu. After selecting Arch Linux, you will be taken to the tty1 terminal, where we will finish the final configuration of your system.
Log in as `root` and check that you can execute commands as `whoami`or `ls` for example
## Connect to the internet
After rebooting we have to configure the network for a last time. If you try pinging google for example you can see that you can't even if you have a wired connection:
-
root@hostname ~ # ping 8.8.8.8
ping: connect: Network is unreachable
-
root@hostname ~ # ip link
```
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0f3u3c2: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether ab:cd:ef:gh:ij:kl brd ff:ff:ff:ff:ff:ff
3: wlo1: mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
link/ether ab:cd:ef:gh:ij:kl brd ff:ff:ff:ff:ff:ff
```
Wired Connection
-
root@hostname ~ # systemctl start NetworkManager
root@hostname ~ # systemctl enable NetworkManager
Wireless Connection
-
root@hostname ~ # systemctl start NetworkManager
root@hostname ~ # systemctl enable NetworkManager
-
root@hostname ~ # ip link set wlo1 up
-
root@hostname ~ # nmcli dev wifi connect 'Your_Router_Name' password 'Your_Router_Password'
## Installing graphics drivers
First, install some generic controllers:
-
root@hostname ~ # pacman -S xf86-video-vesa
Then you can install a more specific controller, if you have, if you don't know your gpu model, you can run:
-
root@hostname ~ # lspci | grep VGA
This is my output for example, so I will have to install ati amd/ati controllers:
```
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Barcelo (rev c4)
```
These are the possible options:
* `amd` -> xf86-video-ati vulkan-radeon
* `nvidia` -> xf86-video-nouveau intel-ucode
* `intel` -> xf86-video-intel intel-ucode
Examples
-
root@hostname ~ # pacman -S xf86-video-ati vulkan-radeon
-
root@hostname ~ # pacman -S xf86-video-nouveau intel-ucode
-
root@hostname ~ # pacman -S xf86-video-intel intel-ucode
## Installing Xorg
-
root@hostname ~ # pacman -S xorg-server xorg-xinit mesa mesa-demos
## Installing lightdm
-
root@hostname ~ # pacman -S lightdm lightdm-gtk-greeter
-
root@hostname ~ # systemctl enable lightdm
## Installing qtile
-
root@hostname ~ # pacman -S qtile
## Export nano as your default editor
-
root@hostname ~ # echo "export EDITOR=nano" >> ~/.bashrc
-
root@hostname ~ # source ~/.bashrc
## Add your user to the sudoers file
First, install `sudo` package
-
root@hostname ~ # pacman -S sudo
Then
-
root@hostname ~ # usermod -aG wheel user
-
root@hostname ~ # sudo visudo
Scroll down and search
```bash
# %wheel ALL=(ALL:ALL) ALL
```
Uncomment it and save
```
%wheel ALL=(ALL:ALL) ALL
```
## Paru
-
root@hostname ~ # su -l user
-
user@hostname ~ # sudo pacman -S base-devel git rust
-
user@hostname ~ # mkdir -p ~/desktop/repos
-
user@hostname ~ # cd ~/desktop/repos
-
user@hostname ~ # git clone https://aur.archlinux.org/paru.git
-
user@hostname ~ # cd paru
-
user@hostname ~ # makepkg -si
> [!NOTE]
> This process might take a while!
> [!CAUTION]
> This section is still in development.
alacritty wireless_tools
pulseaudio pulseaudio-alsa pulseaudio-jack
## Install packages to make compatible with my dotfiles
https://github.com/PumukyDev/PumuArch
sudo pacman -S feh xclip fastfetch openssh picom code stow python-psutils python-iwlib rofi kitty fish bat dunst arandr alsa-utils pamixer lsd python-psutil 7zip linux-lts linux-headers alsa-firmware sof-firmware firefox
mand-db man-pages texinfo
paru -S python-pulsectl-asyncio
paru -S qtile-extras
systemctl --user enable pulseaudio
> [!WARNING]
> the line above must be run without sudo!
if it doesn't work make sure everything inside your user folder belongs to you, if not:
sudo chown -R user:user /home/user
copy the fonts
download dotfiles
stow *
you can now change the wallpaper by clicking on the arch icon in the top left corner of the screen