How to Install WineHQ on Ubuntu 22.04 LTS

Wine is the open-source compatibility layer that allows you to run Windows applications on various operating systems, including macOS and Linux. It translates each system call made by your application into an equivalent POSIX function used across all three platforms – something which can be very helpful if one doesn’t have access or need for specific features available only in Microsoft’s OSs!

Another feature of using Wine is the Wine AppDB is a database containing lists of tested and confirmed applications that can be run under Wine. This program saves the trouble for Linux users who want to use Windows-based programs on their UNIX systems, but not all programs will work in this way; some may have strange bugs or crashes when they’re run with no errors beforehand (even though it’s possible).

In the following tutorial, you will learn how to install and configure Wine on Ubuntu 22.04 LTS Jammy Jellyfish using the command line terminal by importing the official WineHQ repository and installing the latest stable or next release titled development for those eager to try the latest bleeding-edge version of Wine for your windows compatibility needs.

Update Ubuntu

Before you begin, run a quick update to ensure your system is up-to-date to avoid any conflicts during the installation of Wine.

sudo apt update && sudo apt upgrade -y

Install Required Packages

The following packages must be installed to assist in installing the software.

sudo apt install software-properties-common apt-transport-https wget -y

If you are unsure, run the command; it will not harm you.

These are the most common software packages found on nearly all Linux distributions.

Enable 32-bit Support

Ideally, you should enable 32-bit architecture support, as many games and especially Windows applications may come in this form. Without it, you may be limited in what you can use with Wine.

sudo dpkg --add-architecture i386

Most users should enable this for lower-end systems that can only play lower-end games that come in 32bit format more often than not, and high-powered systems will not notice any impact having the packages installed.

Import WineHQ GPG Key & Repository

The step before installing any versions of Wine from WineHQ, import the GPG key and the WineHQ Jammy Jellyfish repository branch using the following steps outlined.

First, import the GPG key required to verify the authenticity of the Wine packages from WineHQ.

wget -O- | sudo gpg --dearmor | sudo tee /usr/share/keyrings/winehq.gpg

Using the following command, import the WineHQ repository for Ubuntu 22.04 LTS Jammy Jellyfish.

echo deb [signed-by=/usr/share/keyrings/winehq.gpg] $(lsb_release -cs) main | sudo tee /etc/apt/sources.list.d/winehq.list

Now, run an APT update to reflect the new packages that have been imported.

sudo apt update

Install Wine – WineHQ Stable Release

Due to Ubuntu 22.04 LTS being released, only STAGING AND DEVELOPMENT RELEASES are currently available from WineHQ for Jammy Jellyfish, which are outlined in the tutorial next two methods after the stable method.

The first method is to install the latest Wine version from the stable branch. This is often the best solution as it is more updated than the Ubuntu repository version while not bleeding-edge, such as the development release from WineHQ.

Run the following command to install the stable Wine release.

Example only for now:

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

Once completed, verify the version you have installed by typing the following command:

wine --version

Alternative – Install Wine from Ubuntu Repository

Until WineHQ releases a stable version, you can install the Ubuntu version, given it’s a recent version as Jammy Jellyfish has just been released. In time I will update this tutorial once the above is available.

Install Wine with Ubuntu repository 64-bit version only.

sudo apt install wine64 -y

For users that have enabled 32-bit support, install both architectures as follows.

sudo apt install wine64 wine32 -y

Install Wine – WineHQ Staging Release

The second method is to install the latest Wine version from the staging branch. This ideally is the beta version or testing version just before release. For users who would prefer a newer version rather than stable without risking the instability risks of bleeding-edge, such as the development version, I recommend the staging branch.

Run the following command to install the Wine staging release.

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

Once completed, verify the version you have installed by typing the following command:

wine --version

Example output:

How to Install WineHQ on Ubuntu 22.04 LTS

Install Wine – WineHQ Development Release

The third method is to install the latest Wine version from the development branch. This is bleeding-edge software and can sometimes be unstable or cause your system instabilities. This is recommended for more experienced users or developers that want a taste of what is to come.

With stable, run the following command to install the Wine development release.

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

Once completed, verify the version you have installed by typing the following command.

wine --version

Example output:

How to Install WineHQ on Ubuntu 22.04 LTS

How to Finalize Wine Installation

Once WineHQ is installed, run the command winecfg” from your Ubuntu terminal, which will install the required environments for Wine to operate.


Example output:

How to Install WineHQ on Ubuntu 22.04 LTS

Press Install to proceed

How to Configure Wine

Once you have finished the installation, the Wine configuration dialogue will be shown. In this section of the software, you can configure various Wine settings.

The default settings should be sufficient in most cases. However, if you change anything, it will be the Windows version that defaults from Windows 7 to something more recently, such as Windows 10. Still, as of the moment, Windows 11 is not supported, given it has also just been released.

How to Install WineHQ on Ubuntu 22.04 LTS

Once finished, close the dialogue box.

Now, downloading any .exe Windows binary file that suites your configuration, you can run it by right-clicking and selecting “Open With Other Application” and selecting Wine to run.


How to Install WineHQ on Ubuntu 22.04 LTS

How to Run Wine From Terminal

While you can right-click applications downloaded and select open with Wine, as most users know, you can use the following command for strictly terminal terms.

wine PROGRAM [ARGUMENTS...]   Run the specified program


wine <application name>.exe

How to Update/Upgrade Wine

For future updates from WineHQ, this can be done using the APT update and APT upgrade command as follows.

sudo apt upgrade && sudo apt update

How to Remove (Uninstall) Wine

Depending on your needs, you may need to remove a particular version of Wine to install another or remove it in full. Use one of the corresponding commands to match your version.

Remove WineHQ Stable Release

sudo apt autoremove winehq-stable -y

Remove WineHQ Staging Release

sudo apt autoremove winehq-staging -y

Remove WineHQ Development Release

sudo apt autoremove winehq-devel -y

For complete removal, delete the repository file.

sudo rm /etc/apt/sources.list.d/winehq*

If you have removed the WineHQ repository, it is recommended to remove the GPG key.

sudo rm /usr/share/keyrings/winehq*

Remove Wine (Ubuntu Repository Versions)

The users that installed Wine from the Ubuntu default repository use the following command.

sudo apt autoremove wine32 wine64 -y

Comments and Conclusion

In the tutorial, you have now learned how to install Wine, including a demonstration of installing a Windows .exe application using Wine on your Ubuntu-based Jammy Jellyfish system.

Wine is an excellent program that can benefit users who need to run Windows applications on Linux systems. With Wine, you can have the best of both worlds by enjoying the stability and security of Linux while still having access to your favorite Windows applications.


Like to get automatic updates? Follow us on one of our social media accounts!