Logo
Overview
Arch Linux Install

Arch Linux Install

October 24, 2023
3 min read

Personalized Arch Linux Install

The choices made in this guide are based on my personal preferences. The Arch Wiki is a great resource for comprehensive information on the installation process.

Pre-Install

  • Download Arch Linux ISO
  • Create VM with 2 cores, 2GB RAM, 20GB HDD
  • Mount ISO to VM
  • Change .vmx file to boot from EFI append the following line
Terminal window
firmware = "efi"
  • Boot VM

Boot and Prepare Installation Media

Check boot mode

Terminal window
cat /sys/firmware/efi/fw_platform_size
# Expected response is 64, if 32 then vm not booted in UEFI mode.

Check Network

Terminal window
ping archlinux.org

Update System Clock

Terminal window
timedatectl

Partition the disk

Identify connected Disks

Terminal window
fdisk -l
# In this instance /dev/sda is the disk we will be installing to.

Partition Disk with fdisk

Terminal window
fdisk /dev/sda

Fdisk commands to create 500MiB EFI partition, and create another partition with the remainder.

Terminal window
g # Sets GPT partition table
n -> +500M # partition 500MiB
t -> 1 # Set 500MiB partition to EFI
n -> defaults # Default options partition the remained as linux FS
w # Write Changes

Format Root partition

Terminal window
mkfs.ext4 /dev/sda2

Format EFI partition

Terminal window
mkfs.fat -F 32 /dev/sda1

Mount the file systems

Terminal window
mount /dev/sda2 /mnt
mount --mkdir /dev/sda1 /mnt/boot

Install to disk & Basic setup

Install essential packages

Terminal window
pacstrap -K /mnt base linux linux-firmware networkmanager vim man-db man-pages texinfo

Generate fstab

Terminal window
genfstab -L /mnt >> /mnt/etc/fstab
# I used -L to use labels instead of UUIDs

Chroot into the new filesystem

Terminal window
arch-chroot /mnt

Link Timezone

Terminal window
ln -sf /usr/share/zoneinfo/America/North_Dakota/Center /etc/localtime
Terminal window
hwclock --systohc

Localization

Here we set language and locale. I am using en_US.UTF-8 UTF-8.

Terminal window
vim /etc/locale.gen
# Uncomment en_US.UTF-8 UTF-8
Tip (Vim Search)

Tip:In vim you can type /en_US , then press Enter, to search for the line

Terminal window
echo 'LANG=en_US.UTF-8' > /etc/locale.conf

Set Hostname

Terminal window
echo 'homewrecker-arch' > /etc/hostname

Change Root password

Terminal window
passwd

Install bootloader

Terminal window
pacman -Sy grub efibootmgr
Terminal window
grub-install --target=x86_64-efi --efi-directory=boot --bootloader-id=GRUB
Terminal window
grub-mkconfig -o /boot/grub/grub.cfg
Danger

Point of no return. Ensure all steps above are completed before exiting chroot.

Exit Chroot & Reboot…

Start NetworkManager service

Terminal window
systemctl enable NetworkManager
Terminal window
systemctl start NetworkManager

Post Install customization

The following sections are requirements for a systems administration class I am taking.

Add Desktop Environment

Terminal window
pacman -Sy xorg-server
Terminal window
pacman -Sy open-vm-tools xf86-input-vmmouse xf86-video-vmware
Terminal window
pacman -Sy nvidia
Terminal window
pacman -Sy plasma-desktop
Terminal window
pacman -Sy sddm sddm-kcm
Important (Terminal Emulator Reminder)

It’s wise to install a terminal emulator prior to starting the display manager. Or you will be unable to access the terminal to install one at that point.

Terminal window
pacman -Sy konsole
Terminal window
systemctl enable sddm
systemctl start sddm

Add users

Terminal window
useradd -m codi
useradd -m ladas
Terminal window
passwd codi
passwd -e codi
passwd ladas
Terminal window
pacman -S sudo vi
Terminal window
visudo /etc/sudoers
# uncomment %sudo ALL=(ALL) ALL
Terminal window
group add sudo
usermod -aG sudo ladas
usermod -aG sudo codi

Customize Terminal

Terminal window
pacman -Sy zsh
zsh
# run through setup
Terminal window
usermod --shell /bin/zsh ladas
Terminal window
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Step through installer

Add ssh

Terminal window
sudo pacman -Sy openssh

Misc Customization

Terminal window
pacman -Sy firefox