Some Windows apps still arrive as .exe installers, and Wine remains the quickest way to run them on Ubuntu without setting up a full virtual machine. To install Wine on Ubuntu, use the Ubuntu repository package for the simplest LTS-wide setup, or add WineHQ when you want the current upstream stable branch.
Ubuntu 26.04 (resolute), 24.04 (noble), and 22.04 (jammy) are covered here. Ubuntu’s package includes the traditional wine64 and wine32 split from Universe, while WineHQ currently publishes Wine 11.0 packages for all three releases. Wine installs from the terminal on desktop and minimal images alike, but winecfg and most Windows apps still need an active graphical session.
Install Wine on Ubuntu
Two install paths matter here. Start with Ubuntu’s package if you want the lowest-maintenance route. If you are looking for an official WineHQ download, the supported upstream path is the WineHQ APT repository rather than a standalone Ubuntu .deb package.
| Method | Ubuntu 26.04 | Ubuntu 24.04 | Ubuntu 22.04 | Best For |
|---|---|---|---|---|
| Ubuntu default repository | Wine 10.0 | Wine 9.0 | Wine 6.0.3 | Ubuntu-managed packages with the traditional wine64 and wine32 split |
| WineHQ repository | Wine 11.0 | Wine 11.0 | Wine 11.0 | Current upstream stable branch, plus staging and devel package options |
For most readers, the Ubuntu package is the right starting point because it works on every supported LTS release and stays inside normal Ubuntu archive maintenance. Use WineHQ when you need the newer upstream stable branch or want to choose winehq-staging or winehq-devel.
Prepare Ubuntu for Wine
Refresh package metadata before you install anything.
sudo apt update && sudo apt upgrade
These commands use
sudofor package management tasks. If your account does not have sudo access yet, follow the guide on how to add a new user to sudoers on Ubuntu or run the commands as root.
Many older Windows apps still need 32-bit compatibility. Enable the i386 architecture before installing Ubuntu’s wine32 package, or before using WineHQ on Ubuntu 24.04 and 22.04. WineHQ’s 26.04 source currently uses Wine’s newer WoW64 layout and does not fetch a separate WineHQ i386 package, but leaving i386 enabled lets Ubuntu’s wine32 package resolve if you switch methods later.
sudo dpkg --add-architecture i386
Check that Ubuntu now tracks the extra architecture.
dpkg --print-foreign-architectures
Expected output:
i386
Refresh APT again so Ubuntu can see the new 32-bit package lists.
sudo apt update
Install Wine from Ubuntu’s repositories
Ubuntu’s own package works on 26.04, 24.04, and 22.04, and it remains the simplest path when you want predictable distro integration.
Wine and Winetricks come from Ubuntu’s Universe component. On standard desktop installs Universe is usually enabled already, but custom images can disable it. If
aptcannot find the packages, use the guide to Enable Universe and Multiverse on Ubuntu. Only Universe is required for this workflow.
sudo apt install wine wine64 wine32
Verify the installed Wine version.
wine --version
Relevant output includes:
wine-10.0 (Ubuntu 10.0~repack-12ubuntu1)
Ubuntu 24.04 reports wine-9.0 (Ubuntu 9.0~repack-4build3), and Ubuntu 22.04 reports wine-6.0.3 (Ubuntu 6.0.3~repack-1).
Install Wine from WineHQ on Ubuntu
Use WineHQ when you need the current upstream stable branch on Ubuntu 26.04, 24.04, or 22.04. WineHQ also publishes staging and devel packages from the same repository.
Install the small tools used to fetch and store the WineHQ repository files.
sudo apt install wget gpg ca-certificates
Import the WineHQ signing key as a dearmored keyring. This keeps APT from rejecting the ASCII key file on Ubuntu 26.04 while still using WineHQ’s current key. If you want more background on the download command, the wget command examples guide explains common wget options.
sudo install -d -m 0755 /etc/apt/keyrings
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor --yes -o /etc/apt/keyrings/winehq-archive.gpg
Create the WineHQ source file for your Ubuntu codename. The command downloads WineHQ’s own DEB822 source file, then changes only the Signed-By path so it points to the dearmored keyring created above. Keeping WineHQ’s source file matters because the architecture line differs by release.
. /etc/os-release
source_url="https://dl.winehq.org/wine-builds/ubuntu/dists/${VERSION_CODENAME}/winehq-${VERSION_CODENAME}.sources"
tmp_sources="$(mktemp)"
wget -O "$tmp_sources" "$source_url" && sed 's#/etc/apt/keyrings/winehq-archive.key#/etc/apt/keyrings/winehq-archive.gpg#' "$tmp_sources" | sudo tee /etc/apt/sources.list.d/winehq.sources > /dev/null
rm -f "$tmp_sources"
Update APT after adding the new repository.
sudo apt update
Confirm that Ubuntu can see the WineHQ stable package.
apt-cache policy winehq-stable
Relevant output includes:
winehq-stable:
Installed: (none)
Candidate: 11.0.0.0~resolute-1
Version table:
11.0.0.0~resolute-1 500
500 https://dl.winehq.org/wine-builds/ubuntu resolute/main amd64 Packages
On Ubuntu 24.04, the same check reports 11.0.0.0~noble-1; on Ubuntu 22.04, it reports 11.0.0.0~jammy-1. If APT reports Unable to locate package winehq-stable, recheck that sudo apt update completed without a signature error and that /etc/apt/sources.list.d/winehq.sources matches your release codename.
Install one WineHQ branch. The stable branch is the default choice for most systems, while winehq-staging and winehq-devel are there if you need extra patch sets or the newest upstream snapshots.
winehq-stableis the best fit for most Ubuntu desktops.winehq-stagingcarries extra experimental patches for games and edge cases.winehq-develtracks the newest upstream development snapshots.
sudo apt install --install-recommends winehq-stable
For another WineHQ branch, install the matching package name instead: winehq-staging or winehq-devel.
Verify the installed WineHQ version.
wine --version
Relevant output includes:
wine-11.0
Install Winetricks on Ubuntu
Winetricks is separate from core Wine. Install it when you need Microsoft core fonts, Visual C++ runtimes, DirectX helpers, or other common Windows components inside a Wine prefix.
sudo apt install winetricks
Check the installed helper version.
winetricks --version
Relevant output includes:
20250102 - sha256sum: 9df4af038f04c753f3b0b02817cf60a51d8eac32357d070c45dfd139b93bd3f5
Ubuntu 26.04 currently reports Winetricks 20250102. Ubuntu 24.04 currently packages Winetricks 20240105, while Ubuntu 22.04 keeps the older 20210206 build. After installation, a quick example is winetricks allfonts, which installs the Microsoft core fonts many Windows programs still expect.

Start using Wine on Ubuntu
Wine installs from a regular terminal session, but the first real configuration step still belongs in a desktop session. A headless shell can initialize part of a prefix, yet winecfg and Windows GUI apps do not launch cleanly without a graphical display.
Run Wine configuration from a graphical session
Start the first Wine prefix from your Ubuntu desktop session.
winecfg
The first launch may prompt you to install Wine Mono for .NET-compatible applications. Wine can also prompt for Wine Gecko when an application needs embedded browser components. Accept those first-run prompts unless you manage those components separately.
After that, the Wine configuration window lets you adjust the Windows version, drives, audio, and graphics settings for the prefix.


Launch a Windows installer with Wine
Use the wine command with the path to a Windows installer or executable.
wine /path/to/program.exe
Run Wine as your normal user, not with sudo. Wine prefixes belong in your home directory, and running installers as root can leave files that your normal desktop session cannot manage cleanly.
Programs installed into the default prefix usually land under ~/.wine/drive_c/Program Files/. You can launch one directly from the terminal if you know its path.
wine "$HOME/.wine/drive_c/Program Files/Notepad++/notepad++.exe"

Installed applications can also create menu entries through Wine, which is why launcher cleanup belongs in the removal section if you later wipe the prefix.


Create a separate 32-bit Wine prefix
Older software can behave better in its own 32-bit prefix, but use this only when your Wine install includes traditional 32-bit Wine support. If Wine returns WINEARCH is set to 'win32' but this is not supported in wow64 mode, keep the default 64-bit prefix instead. Wine’s newer WoW64 mode runs 32-bit Windows programs inside that default prefix.
For Ubuntu’s wine32 package, or WineHQ installs that include the i386 Wine package, create a separate prefix at ~/.wine32 like this.
WINEARCH=win32 WINEPREFIX="$HOME/.wine32" winecfg
Update Wine on Ubuntu
Wine updates through APT no matter which package source you chose. A full sudo apt update && sudo apt upgrade also updates Wine; the Ubuntu package update command guide covers the wider update workflow. Use the targeted commands here when you only want to refresh Wine-related packages.
Update the Ubuntu repository build of Wine
Upgrade the Ubuntu package and the optional Winetricks helper together.
sudo apt install --only-upgrade wine wine64 wine32 winetricks
Update a WineHQ branch on Ubuntu
WineHQ keeps you on the branch you installed. Replace winehq-stable with winehq-staging or winehq-devel if you use one of those branches instead.
sudo apt install --only-upgrade winehq-stable
When the package is already current, APT reports that winehq-stable is already the newest version.
Remove Wine from Ubuntu
Package removal and user-data cleanup are separate jobs. Remove the packages first, then decide whether you also want to delete Wine prefixes and any desktop launchers created for installed Windows apps. For broader APT cleanup behavior, see the guide to remove packages from the Ubuntu command line.
Remove Ubuntu’s Wine packages
This removes the default Ubuntu Wine packages and Winetricks without guessing at which automatically installed dependencies your system still needs.
sudo apt remove wine wine64 wine32 winetricks
Remove WineHQ packages and the WineHQ repository
WineHQ installs both the branch metapackage and branch-specific packages, so remove the stable branch packages before you delete the repository definition.
sudo apt remove winehq-stable wine-stable wine-stable-amd64
On Ubuntu 24.04 or 22.04, WineHQ stable also installs an i386 package when the i386 architecture is enabled. Remove it separately if it exists.
sudo apt remove wine-stable-i386:i386
If you installed staging or devel instead, swap stable for staging or devel in those package names.
After package removal, delete the WineHQ source file and keyring, then refresh APT. The extra key paths cover older WineHQ setup snippets and earlier versions of this article.
sudo rm -f /etc/apt/sources.list.d/winehq.sources
sudo rm -f /etc/apt/keyrings/winehq-archive.gpg /etc/apt/keyrings/winehq-archive.key
sudo rm -f /usr/share/keyrings/winehq-archive.gpg
sudo apt update
Preview automatic dependency cleanup
Preview automatically installed dependencies before removing them. Continue only if the preview lists Wine-related packages you no longer need.
sudo apt autoremove --dry-run
sudo apt autoremove
Remove Wine prefixes and launcher files
Deleting a Wine prefix also removes any Windows programs, settings, and saved data stored inside it. Back up anything you want to keep before you remove the prefix directories.
Check which Wine paths exist for your account before deleting anything.
find "$HOME" -maxdepth 1 -name '.wine*' -print
find "$HOME/.local/share/applications" -maxdepth 1 \( -type d -name wine -o -type f -name 'wine-extension-*.desktop' \) -print 2>/dev/null
find "$HOME/.local/share/desktop-directories" -maxdepth 1 -type f -name 'wine*.directory' -print 2>/dev/null
The default first-run prefix usually appears as $HOME/.wine, and a second prefix such as $HOME/.wine32 only appears if you created one yourself. If the commands print a Wine launcher directory, Wine file-association launchers, or wine*.directory files, inspect them first and delete only the Wine entries you no longer need.
rm -rf "$HOME/.wine" "$HOME/.wine32"
rm -rf "$HOME/.local/share/applications/wine"
rm -f "$HOME/.local/share/applications"/wine-extension-*.desktop
rm -f "$HOME/.local/share/desktop-directories"/wine*.directory
Verify Wine removal
Confirm that no Wine packages remain installed, the wine command is gone, and no WineHQ repository still appears in APT.
dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package}\n' wine wine64 wine32 wine32:i386 winehq-stable wine-stable wine-stable-amd64 wine-stable-i386:i386 2>/dev/null | grep '^ii'
hash -r
command -v wine
apt-cache policy | grep -F "dl.winehq.org"
After a complete package and repository cleanup, these commands return to the prompt with no output.
Troubleshoot Wine on Ubuntu
Fix WineHQ Signed-By conflicts
The error Conflicting values set for option Signed-By means APT found more than one WineHQ source entry for the same Ubuntu codename, but the entries point to different keyring files. This can happen after mixing WineHQ’s downloaded winehq-resolute.sources, winehq-noble.sources, or winehq-jammy.sources file with the dearmored winehq.sources file used here.
Check which WineHQ source entries APT can see.
grep -RIn "dl.winehq.org/wine-builds/ubuntu" /etc/apt/sources.list /etc/apt/sources.list.d 2>/dev/null
Remove the WineHQ source files and keyrings, then refresh APT. This cleanup removes only WineHQ repository definitions and trust files; it does not remove installed Wine packages or Wine prefixes.
sudo rm -f /etc/apt/sources.list.d/winehq.sources
sudo rm -f /etc/apt/sources.list.d/winehq-*.sources
sudo rm -f /etc/apt/sources.list.d/winehq.list
sudo rm -f /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu*.sources
sudo rm -f /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu*.list
sudo rm -f /etc/apt/keyrings/winehq-archive.gpg /etc/apt/keyrings/winehq-archive.key
sudo rm -f /usr/share/keyrings/winehq-archive.gpg /usr/share/keyrings/winehq-archive.key
sudo apt update
If the diagnostic still prints a WineHQ line from /etc/apt/sources.list, open that file with sudoedit /etc/apt/sources.list and remove only the line that contains the WineHQ URL. Keep the normal Ubuntu archive lines intact.
Recreate one clean WineHQ source after sudo apt update runs without the conflict.
sudo install -d -m 0755 /etc/apt/keyrings
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor --yes -o /etc/apt/keyrings/winehq-archive.gpg
. /etc/os-release
source_url="https://dl.winehq.org/wine-builds/ubuntu/dists/${VERSION_CODENAME}/winehq-${VERSION_CODENAME}.sources"
tmp_sources="$(mktemp)"
wget -O "$tmp_sources" "$source_url" && sed 's#/etc/apt/keyrings/winehq-archive.key#/etc/apt/keyrings/winehq-archive.gpg#' "$tmp_sources" | sudo tee /etc/apt/sources.list.d/winehq.sources > /dev/null
rm -f "$tmp_sources"
sudo apt update
Retest the WineHQ package candidate after APT refreshes cleanly.
apt-cache policy winehq-stable
Conclusion
Wine is ready on Ubuntu whether you stay with Ubuntu’s archive packages or use WineHQ for the current upstream branch. Once the base prefix is working, Install Bottles on Ubuntu if you want separate environments for games, launchers, and older Windows apps.


I attempted to follow this guide for 26.04 but at the step of creating the WineHQ source file for my Ubuntu codename, it threw up an error. I realized I had not read the instructions thoroughly, and tried again with the proper codename, but now every command I attempt in the terminal is met with the same error: Conflicting values set for option Signed-By regarding source https://dl.winehq.org/wine-builds/ubuntu/ resolute: /etc/apt/keyrings/winehq-archive.key != /etc/apt/keyrings/winehq-archive.gpg
Error: The list of sources could not be read.
I am not a well-versed coder or programmer by any means, so would you be able to help me resolve this? It is beginning to make it so I cannot enter any commands in my terminal and I’m not sure how to fix this issue
Jpw, this looks like duplicate WineHQ source files, not a broken terminal. APT is finding the same WineHQ repository twice: one entry points to
/etc/apt/keyrings/winehq-archive.key, and another points to/etc/apt/keyrings/winehq-archive.gpg.Remove the WineHQ source entries and keyrings, then refresh APT:
After
sudo apt updateworks again, rerun the WineHQ key and source steps from the article because the cleanup removes the keyring too. I also added a troubleshooting section for this exact error.That took care of it! Thank you so much for your help and fast reply
pooky you’re an idiot and probably should stay away from linux and stick with windows
the tee command outputs to BOTH your terminal AND to the listed winehq.list
Thanks for explaining how
teeworks. You are correct that it writes to both the terminal and the specified file simultaneously. That said, pooky’s observation was valid for their situation. If the pipe character was not copied correctly, theechocommand alone would only print to the terminal without creating the file.Everyone starts somewhere with Linux. Questions and reports like pooky’s help identify where documentation can be clearer. The article has since been updated to use a heredoc format that is less prone to copy-paste issues.
Hi, thanks for this tutorial!!!!
I finally have the installation clear and it works with Total Commander.
AGAIN, the echo command does NOTHING
Next, import the WineHQ repository using the following command:
echo deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main | sudo tee /etc/apt/sources.list.d/winehq.list.
It just ECHOES back exactly what you typed.
It does NOT import ANYTHING
Thanks for the feedback. The command you referenced was from an older version of the guide. It used a pipe (
|) to send the output tosudo tee, which writes the repository entry to the file. If you copied only theechoportion without the| sudo tee /etc/apt/sources.list.d/winehq.listpart, the command would just print the text to your terminal instead of creating the file.The article has since been rewritten to use the modern DEB822 format, which is clearer and less prone to copy-paste errors. The current method uses a heredoc block that creates the repository configuration in one step:
This format is now standard for Ubuntu 22.04 and newer. After running the command, you can verify the file was created with
cat /etc/apt/sources.list.d/winehq.sources.