5.5 KiB
5.5 KiB
Install Arch Linux
Install Arch Linux is thing I always want to do for my laptop/PC since I had my laptop in ninth grade.
This is not a guide for everyone, this is just save for myself in a future and for anyone who want to taste a bit.
Assume your laptop/PC is UEFI-capable.
Installation guide
Pre-installation
Check disks carefully:
lsblk
Verify the boot mode
Check UEFI mode:
ls /sys/firmware/efi/efivars
Connect to the internet
Use iwd.
Update the system clock
timedatectl set-ntp true
Partition the disks
Partition:
# For convert GPT
cgdisk
# For easy partition
cfdisk
Mount point | Partition type | Suggested size |
---|---|---|
/mnt/efi |
EFI system partition | 512 MiB |
/mnt/boot |
Linux extended boot | 1 GiB |
/mnt |
Linux | |
/mnt/var |
Linux | >= 16 GiB |
/mnt/home |
Linux | |
Linux swap | RAM x 2 |
Format:
# efi
mkfs.fat -F32 /dev/efi_system_partition
# boot
mkfs.fat -F32 /dev/boot_system_partition
# root
mkfs.ext4 -L ROOT /dev/root_partition
mkfs.btrfs -L ROOT /dev/root_partition
# var
mkfs.ext4 -L VAR /dev/var_partition
mkfs.btrfs -L VAR /dev/var_partition
# home
mkfs.ext4 -L HOME /dev/home_partition
mkfs.btrfs -L HOME /dev/home_partition
# swap
mkswap /dev/sdxY
Mount:
# root
mount /dev/root_partition /mnt
# efi
mkdir /mnt/efi
mount /dev/efi_system_partition /mnt/efi
# boot
mkdir /mnt/boot
mount /dev/boot_system_partition /mnt/boot
# var
mkdir /mnt/var
mount /de/var_partition /mnt/var
# home
mkdir /mnt/home
mount /dev/home_partition /mnt/home
# swap
swapon /dev/swap_partition
Installation
pacstrap /mnt base linux linux-firmware
# LTS
pacstrap /mnt linux-lts
# Performance
pacstrap /mnt linux-zen
# AMD
pacstrap /mnt amd-ucode
# Intel
pacstrap /mnt intel-ucode
# Btrfs
pacstrap /mnt btrfs-progs
# Text editor
pacstrap /mnt neovim
Configure
Fstab
genfstab -U /mnt >> /mnt/etc/fstab
Chroot
arch-chroot /mnt
Time zone
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
Localization:
Edit /etc/locale.gen
:
# Uncomment en_US.UTF-8 UTF-8
Generate locales:
locale-gen
Edit /etc/locale.conf
:
LANG=en_US.UTF-8
Network configuration
Edit /etc/hostname
:
myhostname
Edit /etc/hosts
:
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
Root password
passwd
Boot loader
General recommendations
Always remember to check dependencies when install packages.
System administration
Add user:
useradd -m -G wheel -s /bin/bash -c "The Joker" joker
Set password:
passwd username
Enable sudo:
pacman -Syu sudo
EDITOR=nvim visudo
# Uncomment group wheel
Desktop Environment
Install Xorg:
pacman -Syu xorg-server
# AMD
pacman -Syu xf86-video-amdgpu mesa
# Intel
pacman -Syu xf86-video-intel mesa
# NVIDIA
pacman -Syu xf86-video-nouveau mesa
GNOME
pacman -Syu gnome-shell \
gdm \
networkmanager \
gnome-control-center \
gnome-terminal gnome-backgrounds gnome-screenshot \
gnome-system-monitor gnome-keyring \
nautilus xdg-user-dirs-gtk file-roller p7zip unrar \
evince eog gedit
# Login manager
systemctl enable gdm.service
# Network
systemctl enable NetworkManager.service
# Bluetooth
systemctl enable bluetooth.service
# Clock
timedatectl set-ntp true
List of applications
pacman
Uncomment in /etc/pacman.conf
:
# Misc options
Color
Improving performance
Disabling automatic core dumps
Improving system responsiveness under low-memory conditions
Turn off CPU exploit mitigations
In the end
This guide is updated regularly I promise.