by Swapnil Bhartiya

How to install Arch Linux on Dell XPS 13 (2016) in 7 steps

Jul 20, 2016
LaptopsLinuxOpen Source

The easiest, step-by-step tutorial for installing Arch Linux on a Dell XPS 13 laptop.

A tutorial for installing Arch Linux on Dell XPS 13 (2016)

I love the Dell XPS 13 (2016) that Dell gave me on loan. But installing Arch Linux with UEFI enabled can be challenging for new users — especially since ‘grub’ doesn’t work on this system with Arch Linux. I talked to a lot of people in the Arch community and resorted to using systemd-boot for successful install.

Here’s how I got Arch Linux running on the Dell XPS 13 laptop.

Step 1: Prepare your system

1 prepare your system

Image by Dell

Go to BIOS settings by hitting the F2 key when the system restarts and enable UEFI boot. Under the secure boot setting, disable secure boot.

In this tutorial we are creating a brand new single boot Arch Linux system with 8GB of swap, 40GB of root and the remaining space for storage. I am allocating 40GB for root because I won’t be creating a separate /home partition and will be installing a lot of desktop environments later for testing so, for me, more space is better.

Now download Arch Linux and create a bootable USB flash drive. Once the drive is ready, plug it into your Dell XPS 13, hit F12 when the system boots up and choose this USB Flash drive in the boot menu. You will see the Arch Linux command prompt. Get connected to the internet over wireless, as this laptop doesn’t come with an ethernet port. Then run the following command and follow the instructions on the dialog box to get connected:

# wifi_menu

Use the arrow key to select the network, hit enter (you can ignore profile renaming) and then type the password for the network.

Now check if you are connected by pinging Google:

# ping -c 3

If you get positive ping, you are all set.

Step 2: Prepare your hard drive

2 prepare your hard drive

Image by Dell

We will be using the parted tool to create a partition table and format the SSD. We will create four partitions: ESP (EFI System Partition), swap, root and storage. First, check the name of your storage device (in my case it was ‘nvme0n1’):

# lsblk

Now open this drive with the parted tool:

# parted /dev/nvme0n1

Create GPT partition table

(parted) mklabel gpt

And now create ESP partition and set it as boot drive:

(parted) mkpart ESP fat32 1MiB 513MiB

(parted) set 1 boot on

Then create root partition of 30GB:

(parted) mkpart primary ext4 513MiB 30GiB

Now create swap partition of 8GB

(parted) mkpart primary linux-swap 30GiB 38GiB

And now create a partition for remaining storage for files

(parted) mkpart primary ext4 38GiB 100%

Exit parted

(parted) quit

Now check the new partitions and take note of their numbers:

# lsblk

We will now format these partitions and mount them in this order: nvme0n1p1 for /boot, nvme0n1p2 for /root, nvme0n1p3 for swap, and nvme0n1p4 for storage

# mkfs.ext4 /dev/nvme0n1p2

# mkfs.ext4 /dev/nvme0n1p4

Now format boot partition:

# mkfs.fat -F32 /dev/nvme0n1p1

And then swap:

# mkswap /dev/nvme0n1p3

# swapon /dev/nvme0n1p3

Now it’s time to mount these partitions.

First mount root:

# mount /dev/nvme0n1p2 /mnt

Then create boot directory:

# mkdir -p /mnt/boot

And mount the boot partition:

# mount /dev/nvme0n1p1 /mnt/boot

(You can mount the remaining space for storage, after the installation is complete.)

Step 3: Install base packages

3 install base packages

Image by Dell

We will now be downloading and installing base packages. If you wish, you can edit the mirrorlist file so that you have the closest mirror set for the fastest download speed.

Edit the mirrorlist file:

# nano /etc/pacman.d/mirrorlist

Now use the arrow key and select the mirror closest to you, I chose the US server. Then use Alt+6 to copy that URL and move the cursor on the very top of the list and paste it there (Ctrl+U). Then save and close the file (Ctrl+x).

Install the base packages:

# pacstrap -i /mnt base base-devel

We now have to create fstab on the new system. The following command will create the file and populate it.

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

We now have to configure different components. To do that we have to chroot into the new system:

# arch-chroot /mnt /bin/bash

Step 4: Set up boot loader

4 set up boot loader

Image by Dell

Grub is not working on this laptop so after much hunting around, I resorted to using systemd-boot in UEFI mode.

Install the bootloader:

# bootctl --path=/boot install

Open the loader.conf file:

# nano /boot/loader/loader.conf

And make sure only these lines are there:

default arch timeout 1 editor 0

Now find the UUID of root partition:

# blkid -s PARTUUID -o value /dev/nvme0n1p2

Take note of the long UUID number, and create arch.conf file:

# nano /boot/loader/entries/arch.conf

And add these lines to the arch.conf file (exchange the PARTUUID number with the UUID number on your machine):

title Arch Linux linux /vmlinuz-linux initrd /initramfs-linux.img options root=PARTUUID=66e3f67d-f59a-4086-acdd-a6e248a3ee80 rw

It’s now time to update the bootloader:

bootctl update

Since Dell XPS 13 uses PCIe for storage, we need to add nvme module. Edit the mkinitcpio configuration file:

nano /etc/mkinitcpio.conf

And add nvme in the MODULES line:


Now update the bootloader:

# mkinitcpio -p linux

You are all set to boot into your Arch system. But we still have more work to do.

Step 5: Set languages and time zone

5 set languages and time zone

Image by Dell

I am setting up my system for US English, and choosing EDT as the time zone.

Open the locale.gen file:

# nano /etc/locale.gen

Here you will see the list of languages. I have a trick that will save you a lot of scrolling: US English is listed on top of the list as an example, just uncomment it there: “en_US.UTF-8”

Save (Ctrl+O) and close (Ctrl+X) the file and then run the following commands:

# locale-gen

# echo LANG=en_US.UTF-8 > /etc/locale.conf

# export LANG=en_US.UTF-8

Set-up the time zone with this command and follow the instructions:

# tzselect

Once done, just create a symlink to set it as localtime:

# ln -s /usr/share/zoneinfo/America/New_York  /etc/localtime

However, we will be using UTC for hardware clock:

# hwclock --systohc --utc

Step 6: Create user and password

6 create user and password

Image by Dell

First we need to create the root password for the system so that we can perform administrative tasks as root. Run the following command and then enter a password when asked:

# passwd

Now create a user for this system. I’m using my own name in this example:

# useradd -m -G wheel,users -s /bin/bash swapnil

And now give this user a password:

# passwd swapnil

If you want, you can give this user sudo powers. Install sudo package:

# pacman -S sudo

And then run the following command:

# EDITOR=nano visudo

Find this line and uncomment it:

%wheel ALL=(ALL) ALL

Now let’s give this system a decent hostname (that’s the name that will appear on the network)

# echo swapnil > /etc/hostname

We now have a fully working system. But we still need GUI tools and a desktop environment.

Step 7: Install GNOME and complete installation

7 install gnome

Image by Dell

GNOME works best on the HiDPI display of this system, but you can install any DE you like. (I also like Cinnamon on it.)

# pacman -S gnome gnome-extra

To be able to manage the network from the GUI (we have been using command line tools so far), we need to install some packages that are not part of GNOME:

# pacman -S iw wpa_supplicant dialog network-manager-applet networkmanager

We will also install support for the touchpad:

# pacman -S xf86-input-libinput

Now tell systemd to start GNOME Display Manager and networking at the boot time:

# systemctl enable NetworkManager.service

# systemctl enable gdm.service

Before you reboot into your new system, exit the chroot environment and then unmount the partitions that we mounted during installation:

# exit

# umount -R /mnt

And now reboot the system:

# reboot

You now have brand new Arch Linux on your Dell XPS 13.