Arch Linux's wiki has a great installation guide, but some find it very daunting and hard-to-read. This article is a summary of all the commands in that wiki page, as of time of writing.
This photo isn't related to Arch Linux in any way.
This is not a replacement for the the official Installation Guide. Consider this more like a refresher course!
(Skip this step if you're not dual-booting Windows or MacOS.) Before you create your ext4 (Linux) partition, you'll need make space for it. Resize your current OS's partition down at least 60GB less to give you some space to create your Linux partition.
Windows users, Follow this guide to resize your partition in Windows using the built-in Disk Management.
MacOS users, Follow this guide in using Disk Utility.app to resize your partition.
You can download the latest ArchLinux ISO from the Arch Linux Downloads page. To create these USB disks, you can use dd in Linux, RUFUS in Windows, or dd in MacOS.
Boot into your USB disk. It should land you onto a bash prompt. When you see this, it's time to get started!
Next: Let's type in a few commands.
If you're using different keyboard layout, change it now using loadkeys. See kbd for a list of available layouts.
Check if the /sys/firmware/efi/efivars path exists. If it is, you're using UEFI mode. If not, you're using Legacy mode. Most modern devices are using UEFI mode, and this guide assumes you're in UEFI mode.
Next: Let's connect to the Internet.
You will be installing packages from the Arch package repository over the Internet. For that, you'll need to be online.
After all that, ensure that you're finally online.
Next: Update your system clock.
This will update your system clock through the Internet via NTP (Network Time Protocol).
You'll need 2 partitions on your computer. You'll need an EFI partition, which you already have (and can be reused) if you already have another OS installed. You'll also need an ext4 partition for Arch Linux to be installed to.
I recommend using cfdisk for this. See Partition the disks (wiki.archlinux.org) for more info.
You'll need to create an ext4 partition. You'll also need an efi partition, but you probably have that already if you have an OS installed before all this.
Unlike other guides, I recommend not setting up a swap partition, and using systemd-swap instead (we'll set that up later on).
Format any ext4 partitions you made using mkfs.ext4. Be sure to replace sda1 with the actual partition.
Next: Let's mount the partitions you just made.
After creating your partitions, you'll now need to mount it so we can write to it.
Mount the root partition to /mnt. This is the ext4 partition that'll be installing Linux into.
Mount the EFI partition to /mnt/boot. This is where the bootloader will be installed.
Next: Time to actually install Arch Linux.
Edit your mirror list, and move the geographically-closest location to you up the list. Don't skip this step! It'll likely be the difference between a 45-minute install and a 5-minute install.
Install packages using pacstrap. This will take a while!
Generate the list of partitions (/etc/fstab) to be mounted at boot time. This will be based on what partitions are already mounted right now.
Next: Let's enter the system.
We're going to "enter" the new system you just mounted using chroot! Use arch-chroot to "enter" the new file system. This will make root path (/) be what's in the new partition (until you exit).
Next: Let's configure the rest of the stuff.
See tzdata for a list of available timezones.
Set your default locale. For most of us, that would be en_US.UTF-8, but feel free to change that.
(Optional) If you use a different keyboard layout, make it persist on boot.
# an alternate keyboard layout.
It's time to pick a name for your machine. Pick a hostname and update /etc/hostname.
Change your password using passwd. This is not your main user's password.
Next: Let's install a boot loader.
You'll need a boot loader in your EFI partition. Think of this as a small program whose sole purpose is to kickstart your Linux session. There are many different boot loaders, but GRUB would be a good one to start with.
Let's install grub into /boot. Be sure to read the Arch wiki, instructions may be different for your system!
Next: Let's create the user you'll be logging in with.
Set a password using passwd.
You'll want to add them to some other groups too.
Add and configure the sudo package to grant your user some superuser rights.
Next: Your mostly done! Lets do a few more things.
Congratulations, you now have a working Arch Linux installation. At this point, exit out of the chroot, and reboot. Be sure to remove the USB drive as you're rebooting, and you may need to go to your BIOS's boot order menu.
From here, I recommend proceeding to the After Installing Arch Linux guide. A basic Arch Linux installation doesn't have a user, swap, a desktop environment, sudo, and many other facilities we may be taking for granted.
You have just read Demystifying Arch Linux installation, written on December 12, 2018. This is Today I Learned, a collection of random tidbits I've learned through my day-to-day web development work. I'm Rico Sta. Cruz, @rstacruz on GitHub (and Twitter!).