Arch Linux is one of the best rolling-release distributions around, but sometimes it can be a challenge to install. In this video, Jay will walk you through not one but TWO methods of installing Arch Linux. The first method will feature arch-install, which is geared more toward beginners. During the second half of the video, Jay will walk you through the manual method – which is perfect for control freaks (you know who you are).
If you’re now running Arch, consider buying an “I run Arch” shirt to help support Learn Linux TV!
Video Notes
Connecting to WiFi
The following commands were used to connect to WiFi from within the Arch installer (basically, the command line method).
Find your WiFi device name
If you’re planning on using WiFI, you can set it up with the iwctl command. But first, we’ll need to know the device name of our WiFi adapter so we can refer to it later:
ip addr showYou should see your wireless device name in the output.
Scan for available WiFi Networks
Next, we’ll see if we can detect any nearby WiFi networks:
iwctlAfter running that command, you’ll be inside of a different shell with a unique prompt. This is expected. The next thing we’ll do is scan for networks:
station wlan0 get-networksIf your WiFi adapter is functioning properly, a list of nearby WiFi networks should appear. Make note of the one you want to connect to. We can exit the iwctl shell now:
exitFinally, we can run the following command to connect to the desired network:
iwctl --passphrase <passphrase> station <interface> connect NetworkNameManual Installation Notes
In this section, I’ll list some of the commands that were used during the video.
Display current partition info:
lsblkBeginning the partitioning process:
fdisk nvme0n1Note: Replace nvme0n1 with the appropriate device name.
fdisk: Print current partition layout:
pFdisk: Create Partitions:
The following commands (within the fdisk shell) will help you create our first partition:
- g(to create an empty GPT partition table)
- n
- 1
- enter
- +1G
We’ll run through the process again for the second partition:
- 2
- enter
- +1G
And again, for the third partition:
- n
- 3
- enter
- enter
- t
- 3
- 44
- w
Format the EFI partition (the first partition we created):
mkfs.fat -F32 /dev/nvme0n1p1Format the Boot partition:
mkfs.ext4 /dev/nvme0n1p2Set up encryption
Encrypting our third partition would be a good idea, since that’s where our data will ultimately go. The following command will encrypt partition nvme0n1p3: 
cryptsetup luksFormat /dev/nvme0n1p3After that’s done, let’s unlock that volume so we can set it up:
cryptsetup open --type luks /dev/nvme0n1p3 lvmSet up lvm
Logical Volume Manager (LVM) gives us additional storage flexibility, including (but not limited to) online resizing and snapshots. I’ve covered LVM in the past, if you want to learn more about it. Anyway, let’s set up LVM.
pvcreate /dev/mapper/lvmNext, we’ll create a volume group and name it volgroup0:
vgcreate volgroup0 /dev/mapper/lvmAfter that, we’ll create a logical volume named lv_root:
lvcreate -L 30GB volgroup0 -n lv_rootWe’ll then create a second logical volume, this time named lv_home:
lvcreate -L 250GB volgroup0 -n lv_homeThen, we’ll activate our volume group by running the following commands:
modprobe dm_modvgscanvgchange -ayFormat and mount the partitions
When it comes to formatting and mounting our partitions, we’ll focus on lv_root and lv_home for now. There is another partition we haven’t touched yet, but we don’t need to do anything with that yet. The following commands will format our two logical volumes:
mkfs.ext4 /dev/volgroup0/lv_rootmkfs.ext4 /dev/volgroup0/lv_homeNext, we’ll mount lv_root:
mount /dev/volgroup0/lv_root /mntContinuing, we’ll create a directory that will ultimately become our boot directory:
mkdir /mnt/bootThen we’ll mount our second partition there:
mount /dev/nvme0n1p2 /mnt/bootOur next goal is to set up and mount our home volume. Let’s create a directory for it:
mkdir /mnt/homeAnd then mount it:
mount /dev/volgroup0/lv_home /mnt/homePreparing the Arch installation environment
Now that we have our partitions mounted, let’s install the set of base packages for Arch:
pacstrap -i /mnt baseAfter that’s done, we can generate an fstab file to ensure our installation knows where to find its partitions:
genfstab -U -p /mnt >> /mnt/etc/fstabThen, we’ll access our in-progress installation so we can fine-tune it:
arch-chroot /mntUser accounts
To protect the root account, we can set a password for it:
passwdIt would also be a good idea to create a user for yourself.
useradd -m -g users -G wheel jayThen, set a password for your account:
passwd jayInstall basic packages
The following command will install the majority of the packages that we’ll need:
pacman -S base-devel dosfstools grub efibootmgr gnome gnome-tweaks lvm2 mtools nano networkmanager openssh os-prober sudoIf you want to use SSH, add: openssh
If you did choose to install openssh, enable it: systemctl enable sshd
Install at least one kernel:
pacman -S linux linux-headers linux-lts linux-lts-headersInstall firmware files:
pacman -S linux-firmwareInspect GPU:
The following command will list PCI devices on your system, which may help if you’re not sure what kind of GPU you have. The output may offer clues.
lspciIf you have an Intel or AMD GPU, install mesa:
pacman -S mesaIf you have an Nvidia GPU:
pacman -S nvidia nvidia-utilsIf you have an Nvidia GPU and you installed the LTS kernel earlier:
pacman -S nvidia-ltsIf you need support for accelerated video decoding, consider installing these packages.
Intel (Broadwell and newer): intel-media-driver
Intel GMA 4500 up to Coffee Lake: libva-mesa-driver
AMD: libva-mesa-driver
Nvidia: Already taken care of with nvida-utils, which was installed earlier
Edit /etc/mkinitcpio.conf:
nano /etc/mkinitcpio.confAdd encrypt lvm2 in between block and filesystems
Generate kernel ramdisks
If you installed the linux package:
mkinitcpio -p linuxIf you installed the linux-lts package:
mkinitcpio -p linux-ltsEdit /etc/locale.gen and uncomment en_US.UTF-8:
nano /etc/locale.genlocale-genSet up GRUB:
Edit the /etc/default/grub file.
vim /etc/default/grubWithin that file, look for a line containing GRUB_CMDLINE_LINUX_DEFAULT and add  cryptdevice=/dev/<device-name>:<volume-group> to the end of it. For example, a typical configuration line of this type might look like this:
cryptdevice=/dev/nvme0n1p3:volgroup0Next, create the /boot/EFI directory and mount our first partition to it:
mkdir /boot/EFImount /dev/nvme0n1p1 /boot/EFINow we can install GRUB:
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheckThe next command will copy locale files for GRUB’s messaging to our boot directory:
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.moGenerate a config file for GRUB:
grub-mkconfig -o /boot/grub/grub.cfgEnable GDM to start when you reboot:
systemctl enable gdmEnable NetworkManager so networking will function when you reboot:
systemctl enable NetworkManagerWrapping Up
Exit our chroot environment:
exitUnmount all partitions:
umount -aReboot the system:
reboot

