Install MINIMAL Arch Linux from the very beginning…

Installation Medium

  1. Download the latest iso file: Arch Linux Downloads

  2. Download Rufus.

  3. Prepare an USB memory stick (> 8GB) and flash the iso file into it.

Boot the Live Env

Enter BIOS and change the startup device to the USB you just made. Then reboot the computer.

Internet and Timezone

Unblock all software and hardware locks.

SHELL
rfkill unblock all
Click to expand and view more

Use iwctl to connect to the internet.

SHELL
iwctl
[iwd] station wlan0 scan  # Scan
[iwd] station wlan0 get-networks  # List all available networks
[iwd] station wlan0 connect SSID  # Connect to the WIFI
[iwd] exit
Click to expand and view more

Set timezone

SHELL
timedatectl set-timezone Asia/Shanghai
Click to expand and view more

Partition the Disk

Check current disk partition.

SHELL
lsblk
Click to expand and view more

Find the main disk of the computer. Normally the name is nvme0n1. Then partition this disk.

SHELL
cfdisk /dev/nvme0n1
Click to expand and view more

My partition layout:

Mount PointTypeSize
/bootEFI System1G
[SWAP]Linux Swap8G
/Linux filesystemAll left spaces

Format the partitions.

SHELL
mkfs.fat -F 32 /dev/nvme0n1p1
mkswap /dev/nvme0n1p2
mkfs.btrfs -f /dev/nvme0n1p3
Click to expand and view more

Mount partitions.

SHELL
mount /dev/nvme0n1p3 /mnt
mount --mkdir /dev/nvme0n1p1 /mnt/boot
swapon /dev/nvme0n1p2
Click to expand and view more

Installation

Get mirrorlist. For me, it’s chinese.

SHELL
curl -L 'https://archlinux.org/mirrorlist/?country=CN&protocol=https' -o /etc/pacman.d/mirrorlist
Click to expand and view more

Then uncomment one line in /et/pacman.d/mirrorlist

Install basic packages. Mine is amd cpu, so I install the amd-ucode. If yours is intel cpu, you should install intel-ucode.

SHELL
pacstrap -K /mnt base base-devel linux linux-firmware amd-ucode vi neovim fish grub efibootmgr networkmanager sddm cliphist brightnessctl pipewire pipewire-audio pipewire-pulse pipewire-jack pipewire-alsa bluez bluez-utils blueman pavucontrol
Click to expand and view more

Configure System

Generate fatab file.

SHELL
genfstab -U /mnt > /mnt/etc/fstab
cat /mnt/etc/fstab  # Check
Click to expand and view more

Enter the new system.

SHELL
arch-chroot /mnt
Click to expand and view more

Set timezone and localization.

SHELL
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
Click to expand and view more

Edit /etc/locale.gen, uncomment the line of en_US.UTF-8 UTF-8.

SHELL
loclae-gen
Click to expand and view more

Create /etc/locale.conf file and add the following.

SHELL
LANG=en_US.UTF-8
Click to expand and view more

Add the hostname to /etc/hostname.

GRUB Configuration

We already installed grub and efibootmgr packages before. So now we need to install grub and genarate the configuration file.

SHELL
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
Click to expand and view more

Set password for root.

SHELL
passwd
Click to expand and view more

Exit and reboot system. Login as root.

Edit /etc/pacman.conf and uncomment the [multilib] part. At the bottom of the file, add the following text.

SHELL
[archlinuxcn]
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
Click to expand and view more

Then

SHELL
pacman -S archlinuxcn-keyring
pacman -S yay
Click to expand and view more

Start services.

SHELL
systemctl enable --now NetworkManager
systemctl enable --now sddm.service
systemctl enable --now bluetooth.service
Click to expand and view more

Install the graphic driver. For me, it’s amd gpu.

SHELL
pacman -S mesa lib32-mesa xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon
Click to expand and view more

Add a normal user.

SHELL
useradd -G wheel -m shane
passwd shane
visudo  # uncomment #%wheel ALL=(ALL:ALL) ALL
su - shane  # switch to the normal user
Click to expand and view more

Next Step

So far you have installed the basic Arch Linux system. For next, you can choose your prefered window manager or the desktop environment.

Copyright Notice

Author: Shane Anderson

Link: https://shaneworld.github.io/en/posts/arch-linux-installation-guide/

License: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

Comments

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut