Installing Arch Linux can be challenging if it’s your first time and you’re not sure what you’re doing. This guide is for people who know the basics and are willing to install it manually.
1. Pre-Installation Setup
Download and Verify the ISO
- Visit the Arch Linux download page and download the ISO file.
- Verify the downloaded ISO using the
.sig
file with:
Create a Bootable Medium
- Use a tool like Rufus or Etcher to create a boot-able drive.
- I had some issues with Ventoy, so i prefer just creating a boot-able drive.
Boot the Live Environment
- Disable secure boot from your bios setting
- Boot into the temporary boot screen and select your USB drive you formatted with arch.
- Refer to your motherboard to find the button to get into these screen. For me I had to press Delete.
2. Preparing Your System
Verify Boot Mode
- Ensure you booted in UEFI mode:
ls /sys/firmware/efi
If the folder exists, you’re in UEFI mode.
Connect to the Internet
- For Wi-Fi, use
iwctl
to connect:iwctl
- I’m going to send you to the arch wiki if you have to use WiFi. https://wiki.archlinux.org/title/Iwd
- For Ethernet, it should be plug and play (Preferred)
- Test the connection:
ping archlinux.org
Update the System Clock
timedatectl set-ntp true
Identify Your Disk
Lsblk
- Write down the drive you wanna use.
- If you need more information to find the drive you wanna format use this command.
lsblk --output NAME,SERIAL,MODEL,TRAN,TYPE,SIZE,FSTYPE,MOUNTPOINT
Partition Scheme
Use gdisk
to clear out drive:
- I’m using sdX as a example but use the drive you wrote down earlier because this will wipe the drive completely.
gdisk /dev/sdX
- Press x for advance
- press z to zap to wipe out the selected drive
Partition Scheme
Were going to use grub for this guide and we going to create a swap partition. You should at least always have at least 4 GiB, some program will needs it and you will need more if you want to hibernate like equal to your current ram.
Use cgdisk
to partition:
- Select new to create a new partition, after creating a partition scroll down and create another. We’re going to create four partitions.
- Going forward, always “Leave First Sector Empty.”
- EFI System Partition (512MiB, EF00, boot).
- swap System Partition (4GiB, 8200, swap).
- root System Partition (40GiB, Default, root).
- home System Partition (remaining space, Default, home).
Format Partitions
For this example, I formatted sdX1 for efi, sdX2 for swap, sdX3 for root, sdX4 for home.
- Format EFI partition:
mkfs.fat -F 32 /dev/sdX1
- Initialize swap (if created, you should):
1. mkswap /dev/sdX2
2. swapon /dev/sdX2
- Format root & home:
1. mkfs.ext4 /dev/sdX3
2. mkfs.ext4 /dev/sdX4
Mount Partitions
ALWAYS mount root first, besides that this step is pretty simple.
- Mount Root
mount /dev/sdX3 /mnt
- Mount Home
mount --mkdir /dev/sdX4 /mnt/home
- Mount Boot
mount --mkdir /dev/sdX1 /mnt/boot
4. Installing Arch Linux
Set Up Mirrors
- Backup mirror list:
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
- Installing the package to rank mirrors:
sudo pacman -Sy pacman-contrib
- Rank the fastest mirrors:
rankmirrors -n 6 /etc/pacman.d/mirrorlistbackup > /etc/pacman.d/mirrorlist
Install Base System
- Use
pacstrap
to install essential packages:
pacstrap -K /mnt base linux linux-firmware
- Not essential packages you should install these. So add these to the end of the last string.
base-devel grub efibootmgr nano networkmanager
Generate fstab
- Lets make sure you mounted all the partition correct.
genfstab -U /mnt
- If you see the three drives you mounted earlier then you should be good to do
genfstab
for real this time.
genfstab -U /mnt > /mnt/etc/fstab
Chroot Into the New System
arch-chroot /mnt
5. Configure the System
Set Timezone
- Replace the Region with your region same with your city. After /zoneinfo/ press tab to see all the regions, then link your timezone:
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
- Sync clock after linking timezone:
hwclock –-systohc
- Check clock
date
Localization
- Edit the
locale.gen
file to uncomment (remove the#
before the location) your desired locale. For example, mine wasen_US.UTF-8
also write this down you will need it later. Then, generate the locales:
1. nano /etc/locale.gen
2. #en_US.UTF-8 UTF-8
3. en_US.UTF-8
- Press Ctrl + O then Ctrl + X to save and exit from nano.
- Generate locales
locale-gen
- Create
/etc/locale.conf
using the information I told you to write down earlier. SO replaceen_US.UTF-8
with your region:
echo LANG=en_US.UTF-8 > /etc/locale.conf
Set Hostname
echo "myhostname" > /etc/hostname
Create Root Password
Passwd
Configure Grub
- When grub installing make sure to select the whole drive not just the boot partition and if you made your mounted your efi partition to your /boot then this command should be mostly the same.
1. grub-install --efi-directory=/boot /dev/sdX
2. grub-mkconfig -o /boot/grub/grub.cfg
+ Keep in mind its common to get errors here, if you do refer to the arch wiki or leave a comment.
6. Add a User and Enable sudo
Adding a user and configuring sudo
is impotent if you care about security.
Add a User
- Create a new user with
wheel
group access. Replace<username>
with your desired username:
useradd -m -G wheel -s /bin/bash <username>
- Set a password for the new user:
passwd <username>
Configure sudo
for the wheel
Group
- Edit the
sudoers
file to enable thewheel
group:
EDITOR=nano visudo
- Find the line:
# %wheel ALL=(ALL:ALL) ALL
- Uncomment it by removing the
#
:
%wheel ALL=(ALL:ALL) ALL
Test the User
- Switch to the new user:
su - <username>
- Verify
sudo
privileges:
sudo echo "User setup complete!"
- If successful, the system will display “User setup complete!” without errors after you enter your user password.
7. Post-Installation
Enable Essential Services
- Enable NetworkManager:
systemctl enable NetworkManager
Reboot
- Exit the chroot environment:
exit
- Unmount all partitions:
umount -R /mnt
- Reboot into your new system:
reboot
- After reboot you will be prompted to login, use the user you created earlier.
8. Setting up a desktop interface
Install KDE Plasma and Essential Applications
You install a different desktop interface. Here’s the wiki page for it. https://wiki.archlinux.org/title/Desktop_environment
- Update the package database:
sudo pacman -Syu
- Install KDE Plasma and essential components:
sudo pacman plasma sddm konsole neofetch
plasma
: Installs the KDE Plasma desktop.sddm
: Simple Desktop Display Manager for graphical login.konsole
: Basic console.neofetch
: For tradition.
Enable the Display Manager
- Enable and start
sddm
:
sudo systemctl enable --now sddm
- You should see the
sddm
graphical login screen. Log in to your KDE Plasma session.
Final Thoughts
- Refer to the Arch Wiki if you have any questions.
- If you mess something up, you can always restart or simply use the
archinstall
command to make the process easier. - This guide presumes you have some basic knowledge of Linux. If you get confused, I recommend using Linux Mint or the
archinstall
command. - I switched to Linux a month ago for my home system and a year ago for my laptop, but I had never attempted to install Arch manually. It was easier than I expected—I only had to restart once.
- I hope this helps you.
Leave a Reply