Arch Linux Setup

Learn how to set up Arch Linux on your system.

Arch Linux Installation Guide

Step 1: Prepare Installation Media

Prepare Installation Media

Download the Arch Linux ISO and create a bootable USB drive.

  • Download the Arch Linux ISO from the official website.
  • Use a tool like Balena Etcher to create a bootable USB drive.
  • Ensure the USB drive is properly formatted and the ISO is correctly written.
  • Ensure to resize your disk to allocate the desired amount of GB for your system.

Step 2: Boot and Initial Setup

Boot and Initial Setup

Boot from the USB drive and start the Arch Linux installation process.

  1. Before you boot, ensure that secure boot is disabled.
  2. Insert the USB drive into your computer and boot from it.
  3. Select the Arch Linux installation option from the boot menu.
  4. Set the keyboard layout and verify network connectivity. In my case loadkeys no
  5. Also up the font with setfont ter-132b

Step 3: Connecting to the internet

Connecting to the internet

Connect to the Internet.

  1. Ping a site, e.g. ping vicx.no.
  2. If you have an Ethernet connection, you'll get a response. Otherwise, you'll have to set up a WLAN connection.
  3. Connect via the iwctl command.
  4. Now run device list from iwd.
  5. Scan the networks with station your_wlan scan #Note this command will not output anything.

Step 4: Partition the Disks

Partition the Disks

Use tools like cfdisk to partition your disk, normally referred to as sda.

  • Create the necessary partitions (EFI system partition, Linux x86-64 root, Linux swap).
  • Enter cfdisk and allocate at least the following: 1GB for boot, 4GB for swap and the rest to your root (32GB is the minimal recommendation).
  • Lets confirm the disks with the command lsblk to list your disks.
  • To proceed, we are going to format our disks manually like this:
  • For the root partition: mkfs.ext4 /dev/root_partition
  • For the swap partition: mkswap /dev/swap_partition
  • For the EFI partition: mkfs.fat -F 32 /dev/efi_system_partition
  • To mount the file system, we will do the following:
  • For the root partition: mount /dev/root_partition /mnt
  • For the EFI partition: mount --mkdir /dev/efi_system_partition /mnt/boot
  • For the swap partition: swapon /dev/swap_partition
  • We are now done with the hard part so the fun can begin!

Step 5: Install the Base System and Configure Chroot

Install the Base System

Install the base packages for Arch Linux.

  • Use the pacstrap command to install base packages: pacstrap -K /mnt base linux linux-firmware nano.
  • Generate an fstab file: genfstab -U /mnt >> /mnt/etc/fstab.
  • Chroot into the new system: arch-chroot /mnt.
  • Note that in this tutorial, I won't go over any time or localization configs.

Step 6: Users and hosts

Configure the System

Lets make a user.

  • Create /etc/hostname and add your hostname.
  • Now we can write passwd to create the root password.
  • Make sure to add a user if you want to be able to log in on your desktop later on: useradd -m -G wheel -s /bin/bash your_user_name
  • Lets make a password for the user just added: passwd your_user_name
  • If you're in your profile, go out with the following command: exit.
  • Update your system: pacman -Syu, then download sudo: pacman -S sudo.
  • Now that we have sudo installed, it's time to give privileges to our user: EDITOR=nano visudo.
  • Here we will uncomment the line %wheel ALL=(ALL) NOPASSWD: ALL by removing the #, and leaving by pressing ctrl + x, hitting y for yes and pressing enter.

Step 7: Install Bootloader

Install Bootloader

Install and configure the GRUB bootloader.

  • Install GRUB and related packages: pacman -S grub.
  • Install GRUB to the disk: grub-install /dev/your_disk_without_any_numbers.
  • Generate the GRUB configuration file: grub-mkconfig -o /boot/grub/grub.cfg.
  • Now exit with exit and unmount everything with umount -a.
  • You can now reboot your system with the following command: reboot.
  • Remove the stick and let the machine boot into GRUB where you launch into Arch Linux.
  • Login to your user and confirm your internet connection by pinging, for example: ping vicx.no

Step 8: Desktop Environment Setup

Reboot and Post-Installation

In this instance we will be using KDE plasma.

  • Download the necessary packages as well as SDDM: sudo pacman -S plasma sddm.
  • Press enter and y for yes on everything, as you need all the packages.
  • Grab the packages you need with Pacman, but make sure to add Konsole and Kate. Spaces between means a new package: sudo pacman -S konsole kate firefox.
  • Let's enable SDDM: sudo systemctl enable sddm, and launch into it: sudo systemctl enable --now sddm.
  • Log in and press "Ctrl + Alt + T" to open the terminal, then write: sudo pacman -S neofetch neofetch.
  • Congrats on using Arch! You are now an Arch elitist. Any questions? Read the manual.