Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ArchLinux Installation Guide

Arch Install Guide


  • Partition a drive on Windows and delete it so that it's free space. Note the size since we'll need it later.

  • Boot into Arch

  • Run fdisk -l to see the partitions.

  • Run parted.

  • Run print free to see the free space and note the Start and End points.

  • Create the following partitions, keeping in mind to replace the start and end values with the appropriate numbers:

    • Boot: No need for this since we are dual booting and will use the Windows EFI System Partition (ESP) directly.
    • /root: mkpart primary ext4 {Start}GiB {Start+20}GiB
    • Swap Space: mkpart primary linux-swap {Start+20}GiB {Start+21}GiB
    • /home: mkpart primary ext4 {Start+21}GiB {End}GiB
  • Check your newly created partitions with fdisk -l and note down their names (e.g. /dev/sda8).

    • Mine are /dev/sda8 for root, /dev/sda9 for swap and /dev/sda10 for home.
  • Time to create the filesystems. You have only created the parititions, you still need to tell Linux how to lay out your filesystem:

    • mkfs.ext4 /dev/sda8
    • mkswap /dev/sda9
    • mkfs.ext4 /dev/sda10
    • Turn on the swap with swapon /dev/sda9
  • Mount the root directory mount /dev/sda8 /mnt

  • Important Mount the ESP:

    • mkdir -p /mnt/boot/
    • With fdisk -l get the device name with type EFI System. Mine is /dev/sda1 (it's usually the first device/sector).
    • mount /dev/sda1 /mnt/boot
  • Mount the home directory:

    • mkdir -p /mnt/home
    • mount /dev/sda10 /mnt/home
  • Set up Wifi to download all the needed packages.

    • Let's use netctl since it is easy and generally works.
    • I previously used wpa_supplicant. Keeping instructions here for future reference.
      • Create a temporary config: /etc/wpa_supplicant/temp.conf
      • Add a network config to it. You may want to google for the config that makes sense for your network. Check notes.
      • Get the network interface with ifconfig. My case was wlp2s0
      • Run wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/temp.conf.
      • Get an IP address with dhcpcd wlp2s0.
      • Check connectivity with ping
  • Set up pacman GPG keys so that the packages download without issues:

    • pacman-key --init && pacman-key --populate archlinux
    • Edit /etc/pacman.d/gnupg/gpg.conf and change the keyserver line to keyserver hkp://
  • Install the base system with pacstrap -i /mnt base base-devel. Choose the defaults and hit Y to proceed with installation when prompted. Go grab a coffee while it downloads.

  • Generate the fstab file with genfstab -U /mnt > /mnt/etc/fstab

  • Go to your drive arch-chroot /mnt /bin/bash.

  • IMPORTANT Pick a language else your system may not bootup:

    • Open /etc/locale.gen (nano is a good choice).
    • Uncomment en_US.UTF-8 UTF-8 and en_US ISO-8859-1.
    • Save and exit
    • Run locale-gen.
    • Save the env variable: echo LANG=en_US.UTF-8 > /etc/locale.conf
  • Set the timezone.

    • Mine is EST: ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime
    • Read the system time in UTC but return in local time: hwclock --systohc --utc
  • Let's setup our bootloader. I highly recommend reading this first.

    • Create an initial environment to boot in: mkinitcpio -p linux
    • Get grub since it works for both MBR and EFI boot systems: pacman -S grub efibootmgr os-prober
    • Run grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
    • Create a grub config file: grub-mkconfig -o /boot/grub/grub.cfg. You can ignore any warnings that might come up.
  • Install a Boot Manager (systemd-boot) which will take care of the task of starting bootloaders such as GRUB as well as make it super easy to discover and generate the boot menu.

    • Run bootctl --path=/boot install to install systemd-boot. If it gives an error that loader.conf already exists, then delete the file at /boot/loader/loader.conf.
    • Configure the loader.conf by setting the following values:
      default  arch
      timeout  5
      editor   0
    • If you don't see a boot menu on startup, see the Notes.
  • Time to add a hostname:

    • echo <whatever you like> > /etc/hostname
    • Edit the file /etc/hosts and in the line with append the hostname after localhost.
    • Install packages to configure Wifi on reboot: pacman -S dialog iw wpa_supplicant
  • Set the root password with passwd. We initially run as root to make sure things worked as expected.

  • Exit chroot and unmount filesystems: umount -R /mnt

  • Reboot!

NOTE In case Windows does not show in GRUB, you can manually edit the GRUB entry by creating a /boot/grub/custom.cfg custom configuration. See the notes for more details.

If you encounter an error that a PARTUUID could not be found, then do the following:

  1. Get the PARTUUID of your /root partition blkid -s PARTUUID -o value /dev/sdxY. Write the PARTUUDI down as you will need it later.
  2. Open the arch.conf with nano /boot/loader/entries/arch.conf.
  3. Replace the existing PARTUUID with the one you wrote down on the line that says: options root=PARTUUID=the-id-you-just-copied rw.


  • We create different partitions for root and home since that means our user data is separated from the system files, making it easier to organize, recover and even change OSes without affecting our data (which crappy Ubuntu does not do).

  • Wifi Interface Config for GTwifi

  • The fstab (pronounced "F S Tab") file tells your system what your filesystems are and what they should be called.

  • I have a weird issue where when I boot my machine I need to press the Spacebar in order to see the boot menu. From my research this seems to be a firmware issue in my laptop. Need to investigate more.

  • The Arch Wiki has a great page on how to create a GRUB entry for Windows. Personally tried it and it worked beautifully. You most probably want to look at the section Windows installed in UEFI-GPT Mode menu entry. Placing a copy of my GRUB entry here for reference:

    grub-probe --target=hints_string /boot/EFI/Microsoft/Boot/bootmgfw.efi  # to get $hints_string
    grub-probe --target=fs_uuid /boot/EFI/Microsoft/Boot/bootmgfw.efi  # to get $fs_uuid
    if [ "${grub_platform}" == "efi" ]; then
        menuentry "Microsoft Windows Vista/7/8/8.1 UEFI-GPT" {
            insmod part_gpt
            insmod fat
            insmod search_fs_uuid
            insmod chain
            search --fs-uuid --set=root $hints_string $fs_uuid
            chainloader /EFI/Microsoft/Boot/bootmgfw.efi

Desktop Environment


  • We're in root so let's create a user useradd -m -G wheel -s /bin/bash <username>
  • Set the user password passwd <username>
  • Install sudo so we can run with elevated privileges pacman -S sudo
  • Open up the sudoers list nano /etc/sudoers and uncomment the line near the end that allows the wheel group to use sudo.
  • Login as user su - <username>
  • Update all packages in preparation sudo pacman -Syu
  • Install a nicer terminal sudo pacman -S terminator

Display Manager and Desktop

  • Install XOrg Server sudo pacman -S xorg-server xorg-apps
  • Install your environment and display manager. I prefer using KDE with lightdm. We need kio-extras to ensure thumbnails show up. sudo pacman -S plasma-meta plasma kio-extras lightdm
  • Logout of your user account and switch into root (Ctrl+Alt+F2) and run systemctl enable lightgdm.service and systemctl start lightgdm.service

Alternatively if you prefer GNOME

  • Install your environment and display manager sudo pacman -S gnome gdm gnome-extra

  • Logout of your user account into root with logout and run systemctl enable gdm.service and systemctl start gdm.service

  • Login to your account and open a terminal.

  • Install the essentials sudo pacman -S firefox vlc inkscape gimp

Package Manager

For ease of use with AUR packages, I prefer using yay.

Wifi Configuration

  • If the wifi does not show anything, then you can use the previously used netctl method to get a working connection.
  • We need to install NetworkManager. Note the camel case, this is important since Arch makes a distinction about this. sudo pacman -S networkmanager.
  • Enable and run the NetworkManager: sudo systemctl enable NetworkManager && sudo systemctl start NetworkManager.
  • Check if it the network manager is up with sudo nmcli g.

If the internet is incredibly slow, this could be because of the DNS being set to a bad one (such as the default for Xfinity). Update the DNS to in /etc/resolv.conf and prevent the file from being overwritten by following the instructions for the appropriate network manager here.



  • pavucontrol
  • pulseaudio
  • alsa-utils

HDMI Sound with KDE

For setting up HDMI output (especially with KDE Plasma) do the following:

  1. Right click the Audio Icon on the bottom bar and select Configure Audio Volume
  2. From Left list select Audio
  3. Go to Advanced tab
  4. There will be two "Build-in Audio" drop down menu > Switch first one to "Digital Stereo (HDMI) output" and select the 2 checkboxes.
  5. Go to Devices tab and select "Built-in Audio Digital stereo (HDMI)" as default.

Note: If it doesn't work the first time try switching between default output and disable auto switching.


You'll want to install fonts packages to ensure your fonts are being rendered correctly:

sudo pacman -S xorg-fonts-misc ttf-dejavu ttf-ancient-fonts ttf-freefont ttf-liberation ttf-droid noto-fonts-emoji ttf-emojione

This article may be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.