Linux laptop setup

The basic steps to getting a Linux laptop running Ubuntu setup for developers are:

Laptop specification

We generally buy Dell XPS laptops for developers, but any laptop with Linux support (which is most laptops these days) and that meets the spec will do.

For development the laptop should have a reasonably fast processor, 32+ GB of memory and at least a 1 TB disk. The monitor size is dependant on user preference, but larger screens are often better for development.

BIOS setup

To get into the BIOS setup, hit the key the setup key while the laptop is booting. For Dell laptops this is F12. If this doesn't work try the delete key.

Secure boot

While Ubuntu claims to work with secure boot, there are often issues with this. It's often easiest to turn this off.

Storage mode

Set the disk storage mode to AHCI.

Many laptops come with the storage mode set to RAID. Ubuntu doesn't support the Intel RAID controller and as it's not proper RAID there's no reason to use it.

Virtualization support

This should be on by default, but worth checking that virtualization is enabled as this is required for running Docker and virtual machines.

Touch screen

Touch screens can be problematic with Linux. If it's not required it can be disabled in the BIOS.

Install Ubuntu Linux

For security reasons it is important that the system is installed with full disk encryption. You will be holding Agile Collective and client data and this needs to be encrypted when stored on a laptop.

We recommend installing the latest LTS release of Ubuntu. At the time of writing this is Ubuntu 24.04.

To install Ubuntu you'll need a memory stick that has been formatted as a bootable Ubuntu installer. For help with this see:

Insert the USB into the laptop, restart it, hit the setup key until the laptop enters the start up options screen. Select the USB disk from the boot device options and once it starts select 'Try or install Ubuntu'.

Once Ubuntu starts, select 'Install Ubuntu'. Go through the install process selecting the appropriate options for you. This would generally include a normal installation with third-party software.

When you're asked for the installation type, select 'Erase disk and install Ubuntu'. Under 'Advanced features...' select 'Use LVM' and 'Encrypt the new Ubuntu installation'. Choose a secure password to encrypt the disk with. This will be required every time you start the laptop.

When the laptop is installing you'll be asked to create a user account. This should also have a secure password as it will be an admin account and you'll need this to install software.

Adjust the disk partitions

Issues with the default partitions

When installing Ubuntu with LVM and full disk encryption you're not able to set the partition layout. The install is setup with a small swap partition and everything else is put in a single partition. This can be problematic as reinstalling Ubuntu will wipe out your files, so if you ever need to reinstall the operating system you'll need to copy all your files off first. Also, hibernation won't work because the swap partition is too small to store everything in memory.

I currently recommend the following LVM disk partitions:

Modifying the partitions

To change the partitions you'll need to boot the laptop from the USB installer, but this time select 'Try Ubuntu'. This will take you to a Ubuntu desktop environment.

The following disk and LVM names are correct for Ubuntu 24.04 installed on a Dell XPS laptop bought in January 2025. If you're using a different OS or laptop model you'll likely need to change the disk names.

1. Mount encrypted LUKS partition

First need to decrypt the disk. You'll be asked for the disk encryption password.

sudo cryptsetup luksOpen /dev/nvme0n1p3 ubuntu-vg

2. Resize root partition

Now resize the root partition to 80GB.

sudo e2fsck -f /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv 70G
sudo lvreduce -L 80G /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

3. Create a LVM partition for Docker

The partition hosting Docker storage will fill up as Docker caches everything. As the root partition is quite small, Docker will fill this up quite quickly. This will cause problems and can force you to have to fix the installation by deleting files from a recovery console.

One option to fix this is to create a partition specifically for Docker stuff. An alternative is to skip this step and move Docker storage to another location once you've installed Docker; which should be somewhere on the /home partition.

To create new Docker partition of 100GB run:

sudo lvcreate -n docker -L 100G ubuntu-vg
sudo mkfs.ext4 /dev/mapper/ubuntu--vg-docker

4. Create a home LVM partition

Now create a new home partition using all the remaining free disk space

sudo lvcreate -n home -l 100%FREE ubuntu-vg
sudo mkfs.ext4 /dev/mapper/ubuntu--vg-home

5. Move home to new the partition

Copy everything off the home directory on the root partition into the new home partition.

mkdir root
sudo mount /dev/mapper/ubuntu--vg-ubuntu--lv root
mkdir home
sudo mount /dev/mapper/ubuntu--vg-home home
rsync -av root/home/ home/

6. Ensure the new partitions are mounted at boot time

Edit the root/etc/fstab file and add the following:

/dev/mapper/ubuntu--vg-home   /home            ext4    defaults        0       2
/dev/mapper/ubuntu--vg-docker /var/lib/docker  ext4    defaults        0       2

7. Unmount the drives and reboot

sudo umount root
sudo umount home
sudo reboot

If all went well the laptop will reboot cleanly and the partitions will have been resized (check with df -h).

Install software

For development you'll need the following:

We also recommend:

Last updated: