How to Install WineHQ on Ubuntu 22.04

WineHQ is a program that allows Ubuntu 22.04 users to utilize the Microsoft Windows application efficiently. It is a Linux-developed compatibility layer that permits you to operate the Windows software on different operating systems such as macOS, BSD, and Linux. WineHQ executes different Windows applications without any difficulty due to the embedded software libraries such as “winlib”.

In this guide, you will learn about how to install WineHQ on Ubuntu 22.04 via

  • Built-in Ubuntu repository
  • Official Wine repository

So, let’s start!

Method 1: WineHQ Installation using built-in Ubuntu repository

The installation of WineHQ on Ubuntu 22.04 using built-in Ubuntu repository is the simplest and easiest option however it may not provide the latest version.

Step 1: Update system packages

Open the terminal by pressing “Ctrl+Alt+T” and execute the provided below command on Ubuntu 22.04 terminal to update the system packages:

$ sudo apt update

Step 2: Check Ubuntu Architecture

After updating the system packages, check your Ubuntu system architecture by utilizing the provided command:

$ lscpu

Step 3: Enable 32-bit Architecture

Next, enable the 32-bit Architecture through the following command:

$ sudo dpkg --add-architecture i386  

Step 4: Install WineHQ

Then, type the given-below command to install the WineHQ using the Ubuntu built-in repository:

$ sudo apt install wine64 wine32

The above-given output indicates that “WineHQ” is installed successfully on our Ubuntu 22.04 system.

Step 5: Check version

Now, check the version through the “wine” command with the “–version” option to ensure that the “WineHQ” is installed or not:

$ wine --version

Here, the below output indicates that the “WineHQ” is installed successfully on Ubuntu 22.04 with the latest available version “6.0.3”.

Remove WineHQ from Ubuntu 22.04 repository

You can remove the WineHQ from your Ubuntu system 22.04 with the help of provided command:

$ sudo apt remove --autoremove wine64 wine32

Now, let’s check out the other method to install WineHQ on Ubuntu 22.04 through the “official Wine repository”.

Method 2: installation of WineHQ through official Wine repository

Wine official repository provides the latest version of WineHQ. To install it follow the given below step-by-step procedure:

Step 1: Enable 32-bit Architecture

First you have to enable the 32-bit Architecture through the following command:

$ sudo dpkg --add-architecture i386

Step 2: Wine key installation

Now add the Wine repository key on Ubuntu 22.04 system using the given below command:

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key

After adding the key, move it to “/usr/share/keyring” directory utilizing the provided command:

$ sudo mv winehq.key /usr/share/keyrings/winehq-archive.key

Step 3: Adding Wine repository on Ubuntu 22.04

Next, to download the Wine repository setup file on Ubuntu 22.04, write out the following command in terminal:

$ wget -nc https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -sc)/winehq-$(lsb_release -sc).sources

The setup file is download, now move this file into “/etc/apt/sources.list.d:

$ sudo mv winehq-$(lsb_release -sc).sources /etc/apt/sources.list.d/

Now, move to the next instruction.

Step 4: Update system repository

Once the repository file is downloaded and moved to the desired location, you need to update the system packages:

$ sudo apt update 

The system packages are updated. Now move to the installation process of WineHQ.

Step 5: Install WineHQ on Ubuntu 22.04

After updating the system packages, you can install WineHQ on Ubuntu 22.04. Three versions are available in the repository:

  • WineHQ developer version
  • WineHQ stable version
  • WineHQ Staging version

WineHQ developer version

WineHQ developer version is an ideal choice for developers that can be easily installed using the below command:

$ sudo apt install --install-recommends winehq-devel

WineHQ stable version

To install the WineHQ stable version, use the given-below command

$ sudo apt install --install-recommends winehq-stable

WineHQ Staging Version

WineHQ staging version have the latest features that are not embedded in the other versions. You can install the WineHQ Staging version by executing the below-provided command:

$ sudo apt install --install-recommends winehq-staging

Now, move to the next instruction, and check the installed WineHQ version.

Step 6: Check WineHQ version

Ensure the installation of WineHQ by checking the version using the “wine” command with the “–version” option:

$ wine --version

Now, let’s move towards the configuration of the WineHQ on Ubuntu 22.04.

WineHQ Configuration on Ubuntu 22.04

For configuring the Wine environment for Windows application, you can set system architecture according to your software requirements which can be either 64-bit or 32-bit. Here, we are setting it to 32-bit. To do the same, execute the below commands one by one:

$ export WINEARCH=win32
$ export WINEPREFIX=~/.wine32

Now our WineHQ environment is set for 32-bit system architecture.

Next, type the below-provided command to open the Wine configuration window:

$ winecfg

When the configuration begins, a “Wine Mono Installer” dialog box will be shown on the screen. Then hit the “Install” button to start the installation of required packages for .NET framework-based applications:

When the “Wine Mono” installation is completed, the Wine configuration window will appear on your screen. Select the “Windows Version” which you want to set to work with the installed application through WineHQ:

Then select the “Graphics” option from the menu to set the “Screen resolution”. After doing so, click on the “Apply” button:

Remove WineHQ from Ubuntu 22.04

If you want to remove the WineHQ developer version from your system Ubuntu 22.04, type the following command in the terminal:

$ sudo apt remove wine winehq-devel

Similarly, to remove the WineHQ stable version, execute the below-given command:

$ sudo apt remove wine winehq-stable 

Or utilize the provided command for removing the WineHQ staging version:

$ sudo apt remove wine winehq-staging 

We have provided the useful information about the installation of WineHQ on Ubuntu 22.04.

Conclusion

To install the WineHQ on Ubuntu 22.04, there are two methods; installation of WineHQ through built-in Ubuntu repository by executing the “$ sudo apt install wine64 wine32” and the installation of WineHQ through the official Wine repository which has three versions: WineHQ Developer, WineHQ Staging and WineHQ Stable. In this guide, we have discussed two methods related to the “WineHQ” installation on Ubuntu 22.04.

Over 500 Million Views on Our Blogs and YouTube! We’re inviting 10 businesses to partner with us and grow together. Click here to join us! ×