·8 min read

How to Install Ubuntu (Including Dual Boot With Windows)

The Ubuntu installer itself is easy. What trips people up is everything around it: BitLocker, Fast Startup, Secure Boot and the boot menu key. Here's the whole process, including those.

Ram profile

Ram

Ubuntu installation guide with terminal and desktop screenshot
Share

The Ubuntu installer is friendly. Most of the trouble happens before and after it: a Windows laptop that won't boot from USB, a BitLocker prompt you didn't expect, Wi-Fi or NVIDIA drivers that don't work on first boot.

This guide covers the install, with extra attention on those parts. It's written for the current LTS release. That's 26.04 at the time of writing, and 24.04 is still fully supported if that's what you have. The steps are almost identical for both.

Before you start

You need:

  • A USB stick of 8 GB or more. It will be wiped.
  • 25 GB of free disk space at the bare minimum. 50 GB or more is comfortable if you'll install dev tools.
  • A backup of anything you care about, especially if you're dual-booting. Resizing partitions is usually fine, but "usually" isn't a backup.

Pick LTS (Long Term Support) unless you have a reason not to. You get five years of security updates, and you can extend that with Ubuntu Pro, which is free for personal use on a few machines. Interim releases are only supported for nine months.

If you're keeping Windows (dual boot), do this first

These three steps prevent most dual-boot disasters:

  1. Find your BitLocker recovery key, or turn BitLocker off. Many Windows 11 laptops encrypt the drive by default ("Device encryption"). The Ubuntu installer can't resize an encrypted Windows partition, and changes to the boot setup can make Windows ask for the 48-digit recovery key on its next start. Get the key from account.microsoft.com/devices/recoverykey and keep it somewhere other than that laptop. Or turn encryption off in Settings → Privacy & security → Device encryption and wait for it to finish decrypting.
  2. Turn off Fast Startup. Control Panel → Power Options → "Choose what the power buttons do" → untick Turn on fast startup. With it on, Windows doesn't fully shut down. It leaves its partition locked, which causes problems for the installer and for reading your Windows files from Ubuntu later.
  3. Make space from Windows itself. Disk Management → right-click C: → Shrink Volume. Windows is better at safely shrinking its own partition than any other tool. Leave the freed space unallocated.

Step 1: Make a bootable USB

Download the ISO (around 6 GB) from ubuntu.com/download/desktop. Then write it to the USB stick:

  • Windows: Rufus. Pick the USB device and the ISO, leave the defaults, and click Start. If it asks about ISO or DD mode, choose ISO.

  • macOS, Windows or Linux: balenaEtcher. Choose the ISO, then the drive, then Flash.

  • Linux, from the terminal:

    lsblk                         # find the USB device, e.g. /dev/sdb (NOT a partition like /dev/sdb1)
    sudo dd if=ubuntu-*.iso of=/dev/sdX bs=4M status=progress conv=fsync
    

    Triple-check the device name. dd will overwrite whatever disk you point it at, and it won't ask first.

Step 2: Boot from the USB

Plug it in, restart, and tap the one-time boot menu key while the maker's logo shows:

Brand Boot menu key
Dell F12
HP F9 (or Esc, then F9)
Lenovo F12, or the small Novo button on some models
ASUS F8 or Esc
Acer F12 (may need enabling in BIOS)

Pick the USB entry (it may be listed as "UEFI:" followed by the stick's name), then choose Try or Install Ubuntu.

If the key does nothing because Windows boots too fast, hold Shift while clicking Restart in Windows, then go to Troubleshoot → Advanced options → UEFI Firmware Settings.

Secure Boot can usually stay on. Ubuntu boots with it enabled.

Step 3: Try it before installing

The live session runs entirely from the USB, so it's a free compatibility test. Before you click Install, check that:

  • Wi-Fi connects
  • Sound plays
  • Your display looks right, and the touchpad and keyboard work

If something's broken here, it'll probably be broken after the install too. It's much better to find that out now.

Step 4: Run the installer

Open Install Ubuntu from the desktop. Choose your language, accessibility options, keyboard and network. Then:

Interactive or automated: choose Interactive.

Default or extended selection: Default gives you a lean desktop; Extended adds office apps and utilities. You can install either set later, so this choice doesn't matter much.

Third-party software: tick both boxes: graphics/Wi-Fi drivers and media formats. If you have an NVIDIA card and Secure Boot is on, the installer asks you to set a password here. Remember it. See "NVIDIA after install" below.

Disk setup. This is the step that matters:

  • Install Ubuntu alongside Windows Boot Manager. Shown when Windows is detected. If you made unallocated space in Windows, Ubuntu uses it, and you'll get a boot menu to choose between the two on every start.

  • Erase disk and install Ubuntu. Ubuntu becomes the only OS. Everything on that disk is deleted.

  • Manual installation. For full control. A sensible layout on a UEFI machine is just:

    Mount point Size Format
    /boot/efi Reuse Windows' existing EFI partition, or ~1 GB if none FAT32, don't format if Windows uses it
    / Everything else (or 50 GB+, with the rest as /home) ext4

    You don't need a swap partition. Ubuntu creates a swap file automatically. A separate /home is optional; its main benefit is being able to reinstall without touching your files.

Then set your time zone and user account, and wait. It takes about 10 to 20 minutes. Remove the USB stick when it tells you to, and reboot.

Step 5: First boot checklist

Open a terminal (Ctrl + Alt + T):

sudo apt update && sudo apt full-upgrade -y

Missing drivers (Wi-Fi, NVIDIA and so on):

ubuntu-drivers list           # see what's recommended for your hardware
sudo ubuntu-drivers install   # install it

You can also use the Additional Drivers app, which does the same thing with buttons.

NVIDIA after install, with Secure Boot on: on the first reboot after installing the driver, you'll see a blue screen titled "Perform MOK management". Choose Enroll MOK → Continue → enter the password you set in the installer. If you skip this, the NVIDIA driver won't load, and you'll be stuck at a low resolution.

Firewall: sudo ufw enable blocks unsolicited incoming connections. It's a sensible default on a laptop.

Dev basics:

sudo apt install -y build-essential git curl
sudo snap install code --classic     # VS Code

Then, if you need it, install Docker Engine.

Backups: install Déjà Dup (search for "Backups" in the App Center) and point it at an external drive or cloud storage. Do it now, while you remember.

Fixing the usual problems

It boots straight into Windows, with no menu. Go into the firmware settings and move "ubuntu" above "Windows Boot Manager" in the boot order. Some laptops reset this after Windows updates. In that case, run sudo update-grub from Ubuntu, and check that Windows hasn't re-enabled Fast Startup.

No Windows entry in the boot menu. From Ubuntu, run sudo apt install os-prober, then add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub and run sudo update-grub.

Windows suddenly asks for a BitLocker recovery key. This is the warning from earlier. Enter the key from your Microsoft account. It only asks once after the change.

Wi-Fi isn't detected. Check what card you have with lspci -nnk | grep -iA3 net, then try sudo ubuntu-drivers install. Some Broadcom cards need bcmwl-kernel-source. Tethering your phone over USB gets you online to download drivers.

No sound. Ubuntu uses PipeWire, not PulseAudio. Restart it with:

systemctl --user restart pipewire pipewire-pulse wireplumber

Then check that the right output device is selected in Settings → Sound.

Wrong resolution or scaling. Use Settings → Displays. Ubuntu's default session is Wayland, where old xrandr commands from forum posts often don't apply. If you have an NVIDIA card, install the recommended driver first (above). Most resolution problems turn out to be driver problems.

Removing Ubuntu later

If you dual-booted and change your mind: delete the Ubuntu partitions in Windows' Disk Management and extend C: into the space. Then remove the "ubuntu" boot entry. bcdedit or the firmware menu can do it. Otherwise the PC may still try to boot GRUB first and drop you at a grub rescue> prompt.

Share

Related Articles

Stay in the loop

Get the latest articles delivered straight to your inbox. No spam, ever.