Guides 11792 Published by

This guide walks you through adding the official WineHQ APT repository on Ubuntu 22.04, importing its GPG key into /etc/apt/keyrings, and creating a signed winehq.list entry for the Jammy release. After updating the package index you choose one of three branches—stable, staging, or development—and install it with sudo apt install -y --install-recommends winehq-<branch> (which also pulls in optional tools like winetricks). It then shows how to verify the installation (wine --version), run a simple Windows executable as a test, and resolve common issues such as missing libfaudio0, kernel ABI changes, or performance quirks. Finally, it suggests cleaning up the hidden ~/.wine directory periodically and notes that you can switch branches later if a particular build misbehaves.



How to Install WineHQ on Ubuntu 22.04 LTS

You’ll get the official Wine packages set up so Windows programs can run on your Jammy machine. The guide covers adding the repo, picking stable, staging or development builds, and getting everything working without a mess.

Add the official repository

Ubuntu’s default repos ship an old Wine version that crashes with newer games. Pulling the WineHQ repo gives you the current binaries.

  1. Open a terminal and make sure your system is fully updated – this prevents dependency headaches later.

    sudo apt update && sudo apt upgrade -y
  2. Install the required certificates and tools that let APT talk over HTTPS. Without them the repo download will fail.

    sudo apt install -y ca-certificates gnupg
  3. Import Wine’s signing key directly from the upstream server. I once tried to copy‑paste a key from an old blog post and got “NO_PUBKEY” errors – using the official URL avoids that.

    sudo mkdir -pm755 /etc/apt/keyrings
    curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.gpg
  4. Add the repository entry for Jammy. The deb [signed-by=…] line tells APT which key to trust, keeping the system tidy.

    echo "deb [signed-by=/etc/apt/keyrings/winehq-archive.gpg] https://dl.winehq.org/wine-builds/ubuntu/ jammy main" | sudo tee /etc/apt/sources.list.d/winehq.list
  5. Refresh the package index so APT sees the new packages.

    sudo apt update

Choose your preferred Wine branch

WineHQ offers three flavors:

  • stable – safest, changes only when a new version is vetted. Good for most everyday apps.
  • staging – includes experimental patches that fix bugs faster but might be a little rough around the edges.
  • development – bleeding‑edge builds; you’ll get the newest features before anyone else, but expect occasional crashes.

I tend to start with stable because I don’t want my daily office suite blowing up after a kernel tweak. If a game refuses to launch, I switch to staging and see if the extra patches help.

To install one of them, run the corresponding meta‑package:

# Stable
sudo apt install -y --install-recommends winehq-stable

# Staging
sudo apt install -y --install-recommends winehq-staging

# Development
sudo apt install -y --install-recommends winehq-devel

The --install-recommends flag pulls in optional components like winetricks, which saves you a separate download later.

Verify the installation

After the packages settle, check that Wine reports the expected version:

wine --version

You should see something like wine-8.0 (Ubuntu 8.0-1) for the stable branch. If you get “command not found”, double‑check that /usr/bin is in your $PATH and that the repo entry didn’t get corrupted.

Quick test: run a Windows executable

Grab any small .exe – I usually use notepad.exe from a fresh Windows ISO because it’s tiny and guaranteed to work. Place it in your home folder, then:

wine ~/notepad.exe &

A window should pop up that looks exactly like the classic Notepad. If you see an error about missing DLLs, run winetricks corefonts to install basic Windows fonts; that alone solves most UI glitches.

Common hiccups and how I fixed them

  • “Missing dependency libfaudio0” – The 22.04 repos don’t ship this library yet. Adding the Ubuntu‑Multiverse repo usually does the trick:

    sudo add-apt-repository multiverse
    sudo apt update
    sudo apt install -y libfaudio0
  • Wine crashes after a kernel upgrade – I’ve seen this happen when the kernel’s ABI changes but the Wine binaries were still linked against the old one. Re‑installing the chosen branch (the apt reinstall command) forces the linker to pick up the new libraries.

  • Performance feels sluggish – Turn off “debug” output in winecfg under the “Graphics” tab, and consider enabling a virtual desktop with a modest resolution; it reduces the amount of window‑manager chatter on low‑end hardware.

Keep Wine tidy

Wine stores its “C:” drive under ~/.wine. Over time that folder can balloon with leftover installers and logs. I like to prune it once in a while:

rm -rf ~/.wine/drive_c/users/*/Temp/*

Just make sure you’ve backed up any saved game files before wiping the whole directory.

That’s all you need to get WineHQ running on Ubuntu 22.04 LTS. Play around, break things, and feel free to roll back to a different branch if one version misbehaves.