Archlinux fast minimal Installation Guide [UEFI]
At Devforth, we primarily use Dell XPS 15 laptops. Since several our developers prefer Arch Linux and we installed it occasionally, I decided to prepare a simplified & fast guide to install Arch Linux with minimal steps. The guide will work for most modern notebooks with enabled UEFI mode (Steps for legacy MBR mode would differ).
Our setup will include installation of KDE Desktop Environment.
1. Prepare
ISO file could be downloaded from official website, we used Torrent way to download.
Write ISO file to flash drive. You can use UUI tool if you are on Windows or UNetbootin for Linux
2. Connect to Internet
Run iwctl
tool to connect WiFi
iwctl
List adapters:
device list
For us it is generally called wlan0
Scan networks and connect to your's:
station wlan0 scan
station wlan0 get-networks
# here we connect to our WiFi network
station wlan0 connect devforth_5G
# exit to terminal
exit
Check internet:
ping 8.8.8.8
You should see a packets exchange.
Also enable automatic time sync
timedatectl set-ntp true
3. Partition disk partitions and format them
First check your disks and partitions list using:
lsblk
For empty fresh SSD NVMe M2 disk it looks like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 8:0 0 931.5G 0 disk
Anyway even if you have some partitions, we will delete them and recreate partition table.
To work with partitions open gdisk:
gdisk /dev/nvme0n1
Delete all existing partitions:
Command (? for help): o
Confirm questions like a "Do you want to proceed?" with Y.
We have to create 2 partitions: EFI 512M and a root partition for rest of the space.
# type in gdiskCommand (? for help): n
Partition number (1-128, default 1):<keep empty, press ENTER>
First sector (34-20971486, default = 2048) or {+-}size{KMGTP}:<keep empty, press ENTER>
Last sector (2048-20971486, default = 20971486) or {+-}size{KMGTP}: +512M
Hex code or GUID (L to show codes, Enter = 8300): ef00
Then create root partition:
# type in gdisk
Command (? for help): n
Partition number (1-128, default 1):<keep empty, press ENTER>
First sector (34-20971486, default = 2048) or {+-}size{KMGTP}:<keep empty, press ENTER>
Last sector (2048-20971486, default = 20971486) or {+-}size{KMGTP}: <keep empty, press ENTER>
Hex code or GUID (L to show codes, Enter = 8300): <keep empty, press ENTER>
Write changes:
Command (? for help): w
Now you should be returned to terminal. Check how partitions look now using
lsblk
Format created partitions:
mkfs.fat -F32 /dev/nvme0n1p1 # Format the EFI System Partition
mkfs.ext4 /dev/nvme0n1p2 # Format the root partition
4. Mount partitions and install base packages
mount /dev/nvme0n1p2 /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
Update the package index:
pacman -Syy
Install base packages:
pacstrap /mnt base linux linux-firmware
5. Mandatory system configs
Generate fstab
genfstab -U /mnt >> /mnt/etc/fstab
Chroot into a new system
arch-chroot /mnt
Set timezone
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
Sync system and hardware clocks:
hwclock --systohc
Install required packages:
pacman -S nano vim sudo networkmanager network-manager-applet grub mtools dosfstools git linux-headers bluez-utils bluez pulseaudio reflector xdg-utils xdg-user-dirs cups
Enable network manager:
systemctl enable NetworkManager
Config locale:
nano /etc/locale.gen
Save file using Ctrl+X.
Search for:
en_US.UTF-8 UTF-8
Uncomment it and save file using Ctrl+X.
Generate locale:
locale-gen
Edit locale:
nano /etc/locale.conf
Write line:
en_US.UTF-8 UTF-8
Save file using Ctrl+X.
Edit hostname:
nano /etc/hostname
Write the name of the host, which will be used to identify your pc in the network e.g. myhost, and save using Ctrl+X.
Edit hosts file:
nano /etc/hosts
Write next content:
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhost.localdomain myhost
Save file.
6. Install Grub and bootloader
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
bootctl install
7. Create a user
Use your preferred username instead of username:
useradd -m -G wheel username
passwd username
Allow sudoers in system who belong to wheel group. Open visudo editor:
nano /etc/sudoers
Uncomment the line %wheel ALL=(ALL) ALL by removing the # character and save file
8. Install KDE:
pacman -S plasma-meta kde-applications sddm
Enable loading of sddm on system load
systemctl enable sddm
9. Finalize and boot into system
exit
umount -R /mnt
reboot
Don't forget to eject flash during reboot.
Useful links
- Arch quick installation gist from Mattias Lundberg. We did not use it as a base, but we see several exciting commands and aliases that you might find better.
- Official arch installation guide, pretty complex but sometimes it has a lot of details and explanations that will help you to understand Linux software world