Skip to content

Instantly share code, notes, and snippets.

@hammerill
Last active February 5, 2025 08:30
Show Gist options
  • Save hammerill/3371f2080231b0b6c673f4a01e83c74d to your computer and use it in GitHub Desktop.
Save hammerill/3371f2080231b0b6c673f4a01e83c74d to your computer and use it in GitHub Desktop.
Arch Linux installation cheatsheet for an experienced user. You clearly see there's a problem with a distro if it has to exist.

How to Install Arch Linux

Arch Linux installation cheatsheet for an experienced user. You clearly see there's a problem with a distro if it has to exist. But I love doing this.

Not all the steps are viably required, but that's a proper installation.

Won't take more than a hour even if you experience problems with understanding whether it's BIOS or UEFI.

Prerequisites (to Modify)

  • Your username is hammerill
  • Your email is kyrylo@hammerill.com
  • You wish to set this hostname: kirill-arch
  • You wish to set this time zone: Europe/Paris
  • You wish to have these locales: en_US and fr_FR
  • And set this as the system language: en_US

Installation

Imagine you've just booted into Arch installer ISO...

First, if one has to connect via WiFi:

iwctl
device list
station wlanX scan # If doesn't work run "rfkill unblock wifi"
station wlanX get-networks
station wlanX connect NetworkName

Check time:

timedatectl
# OK!
# It shows the correct date, but time might be delayed since it's shown in UTC

Format disk (one has to master fdisk util):

fdisk -l
# Choose a disk...

fdisk /dev/sda
# I chose /dev/sda!

# Create only when UEFI
BOOT=/dev/sda1 # 1GB minimum
#

SWAP=/dev/sda2 # 4GB minimum
ROOT=/dev/sda3 # Remain of the disk

mkswap $SWAP
swapon $SWAP

mkfs.ext4 $ROOT
mount $ROOT /mnt

# Only when UEFI
mkfs.fat -F 32 $BOOT
mkdir /mnt/boot
mount $BOOT /mnt/boot

Install required packages (you can modify these. Time to do some music with ya keyboard. Don't waste time with \-s, write in one line):

pacstrap -K /mnt \
  base base-devel linux-lts linux-firmware \
  networkmanager zsh sudo git wget curl vim python cmake \
  ntfs-3g gvfs-mtp firefox \
  noto-fonts noto-fonts-emoji noto-fonts-cjk

# Chill for a moment...

Configure the container (you gain some Linux admin skills if you master this part):

genfstab -U /mnt >> /mnt/etc/fstab

arch-chroot /mnt

# Moving into container...

systemctl enable NetworkManager

echo "kirill-arch" > /etc/hostname

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
# Europe/Paris etc... instead of Region/City

hwclock --systohc

vim /etc/locale.gen
# /en_US -> uncomment line
# /fr_FR -> uncomment line

locale-gen

echo "LANG=en_US.UTF-8" > /etc/locale.conf

# If UEFI then
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot
# Else
pacman -S grub
grub-install --target=i386-pc /dev/sda # You do remember disk path right?
#

grub-mkconfig -o /boot/grub/grub.cfg

passwd
# SUPER_HARD_PASSWORD
# SUPER_HARD_PASSWORD

useradd -mG wheel hammerill

passwd hammerill
# weakpassword
# weakpassword

visudo
# /NOPASSWD -> uncomment line

exit

# Quitting the container...

umount -R /mnt

shutdown now

# Power off...

Eject installation media (USB right?) and configure BIOS to boot fresh install of Arch.

Power on... and login.

If one has to connect via WiFi (again, last time I swear):

nmcli dev status
nmcli radio wifi on
nmcli dev wifi list
sudo nmcli dev wifi connect NetworkName --ask

Install a DE:

# If you like Gnome then
sudo pacman -S gnome file-roller
sudo systemctl enable gdm
# Else if you like KDE with SDDM login screen then
sudo pacman -S plasma konsole dolphin ark gwenview spectacle
sudo systemctl enable sddm
# Else if you like KDE with bare TTY login screen then
sudo pacman -S plasma konsole dolphin ark gwenview spectacle
startplasma-wayland # Make your alias later, e.g. alias x='startplasma-wayland'
# Else something other that you like, idk

reboot

# Reboot...
# And enjoy your env!

VirtualBox Guest

If this installation is done within VirtualBox, you could install guest utils:

sudo pacman -S virtualbox-guest-utils
sudo systemctl enable vboxservice

reboot

Little required tinkeries

Install OhMyZsh:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Configure Git:

git config --global init.defaultBranch main
git config --global credential.helper store
git config --global user.name hammerill
git config --global user.email kyrylo@hammerill.com

Disable PC speaker in TTY:

sudo -i

echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf
echo "blacklist snd_pcsp" >> /etc/modprobe.d/nobeep.conf

(Gnome/Wayland only) Enable experimental fractional scaling:

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
@hammerill
Copy link
Author

It's based on my own cheatsheet in Google Keep that was written on December 18th, 2021. It'll be 3 years next week. Cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment