Head picture is the art work ζ»ζηArch by Glowing Bric@Pixiv.
Why Use ArchLinux
Just make a joke π€£.
Errata
Before delving into the text, itβs important to note that there may be some grammar or syntax errors present. This could be due to translation errors, typing mistakes, or the authorβs unique writing style ( Iβm a Chinese native speaker π ).
Requirements
Target
Requirement
Computer
UEFI booted
You
Knowledge of vim
Background
Having experienced multiple system crashes and reinstallations, itβs time to record the steps of installation, this guide may include my custom configurations.
My computer: Asus Rog Strix G16
Create a Boot Disk
Download Boot Disk Maker
Download or install Ventoy, Rufus ( Windows only ), balenaEtcher or any other boot disk maker.
I prefer using Ventoy due to its multiple iso support.
Flash ArchLinux Installation Image
Download ArchLinux iso from Official or tuna ( Recommended for Chinese users ).
Follow the guide of the specific tool, and make the disk ( Usually USB disk ) a boot disk with ArchLinux image.
If you are using Ventoy, make your disk a Ventoy disk, and add the iso to boot disk.
Set Hard Disk as ESP Partition
Before installation, be sure that the hard disk of computer is ESP partition.
Waiting the boot progress, then get a shell from ArchLinux installation image.
Tips: Make use of tab completion from shell.
Check Environment
1
ls /sys/firmware/efi/efivars
If no error occurs, it means the computer is UEFI booted.
Be sure the computer is UEFI booted, then continue.
Connect to Network
If your computer has connected to the network cable, skip the step.
Use iwd to connect wireless network.
1 2 3 4 5 6
iwctl station wlan0 scan station wlan0 get-networks station wlan0 connect <wifi_ssid> # specific Wifi SSID # input password of Wifi exit
Test the network.
1
ping archlinux.org -c 4
Pacman Source
Stop reflector.service, which will choose the fastest source.
1
systemctl stop reflector
Change pacman source ( Optional ).
1
vim /etc/pacman.d/mirrorlist
Add the following lines at the very top:
1 2
# tuna source Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
Note: Remove sources from China after installation finished.
Info: the source provider from China has the ability to upload the IP and other information of users who installed qv2ray ( For example ) to the government server.
Sync Time
1
timedatectl set-ntp true
Check status
1
timedatectl status
Partitioning
Check partitions
1
lsblk
Start partitioning.
Common Mounting Points
/
/boot ( Less than 1G )
/home
swapfile ( Usually 5 GB )
Some partition related tools:
1 2 3 4 5 6
fdisk # CLI partition tool gdisk # CLI partition tool mkfs.ext4 # create an ext4 file system on a disk or partition # example: mkfs.ext4 /dev/sda1 mkswap # create a swap file system on a disk or partition # example: mkswap /dev/sda2
mount /dev/sda2 /mnt mkdir /mnt/boot mount /dev/sda3 /mnt/boot mkdir /mnt/boot/efi mount /dev/sda1 /mnt/boot/efi mkdir /mnt/home mount /dev/sda4 /mnt/home mkdir /mnt/opt mount /dev/sda5 /mnt/opt swapon /dev/sda6
If you accidentally mount the wrong partition:
1 2 3
umount /dev/sda<number> # or umount -R /mnt
Check the partition.
1
lsblk -f
Install Basic System
Install Basic Packages
You may need to wait for a while.
1
pacstrap /mnt linux linux-headers linux-firmware base base-devel vim bash-completion iwd dhcpcd
Or use my custom configuration:
1
pacstrap /mnt linux-zen linux-zen-headers linux-firmware base base-devel neovim fish iwd dhcpcd
Install Keyring ( Optional )
1
pacstrap /mnt archlinux-keyring
Generate Fstab
Generate /etc/fstab.
1
genfstab -U /mnt >> /mnt/etc/fstab
Check file.
1
cat /mnt/etc/fstab
If you have made mistakes, return to the step Partitioning.
Chroot
1
arch-chroot /mnt
Tips: Use fish shell to enjoy the powerful auto-completion.
1 2
pacman -S fish # install if not exits fish && exit