2024-03-15

Arch Linux Setup Guide: From Minimal to Functional

A comprehensive guide on setting up Arch Linux with a focus on developer productivity and system minimalism.

Arch Linux Setup Guide

Setting up Arch Linux is a rite of passage for many Linux enthusiasts. It teaches you how the system works from the ground up.

Pre-installation

Before we begin, ensure you have:

  1. A bootable USB drive with the latest Arch Linux ISO.
  2. A stable internet connection (Ethernet recommended).

Base Installation

disk Partitioning

We'll use cfdisk for a simple partitioning scheme:

cfdisk /dev/nvme0n1

Create the following partitions:

  • EFI System Partition: 512M (Type: EFI System)
  • Swap: 4G (Type: Linux Swap)
  • Root: Remaining space (Type: Linux Filesystem)

Formatting

mkfs.fat -F32 /dev/nvme0n1p1
mkswap /dev/nvme0n1p2
swapon /dev/nvme0n1p2
mkfs.ext4 /dev/nvme0n1p3

Installation

Mount the root partition and install the base system:

mount /dev/nvme0n1p3 /mnt
pacstrap /mnt base linux linux-firmware vim git networkmanager

Configuration

Generate fstab:

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

Chroot into the new system:

arch-chroot /mnt

Set the timezone:

ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
hwclock --systohc

Post-Installation

User Setup

Create a new user and add to wheel group:

useradd -m -G wheel -s /bin/bash adha
passwd adha

Enable sudo for wheel group by editing /etc/sudoers.

Desktop Environment (Optional)

For a minimal setup, I recommend a Window Manager like i3 or Sway.

pacman -S i3-gaps i3status dmenu kitty

Conclusion

You now have a minimal, functional Arch Linux system. From here, you can customize it to your heart's content.

Happy hacking!

// End of file: arch-linux-setup.mdx