How to Install WineHQ on Ubuntu 22.04

How to Install WineHQ on Ubuntu 22.04

The WineHQ is an open source software that is used to install Windows software on Ubuntu 22.04. As an open-source software, WineHQ does not act as an emulator, but as a compatibility layer. Microsoft Windows applications can run under Unix-like operating systems by using this compatibility layer.

Here is the guide to install WineHQ on Ubuntu 22.04. Here are the two methods:

  • Using official repository.
  • By adding manual repository.

Method 1: Installing WineHQ via Official Repository

The first method to install WineHQ on Ubuntu 22.04 is by using the official repository method. Official repository is a server which contains sets of packages. We have compiled the installation steps below for your better understanding.

Step 1: Update System Packages

Before moving towards installation, first of all update system packages:

sudo apt update

The above command has updated all the system packages.

Step 2: Check Systems Architecture

Use the command below to check the systems architecture:

Lscpu

The output showed the systems architecture.

To read more Ubuntu articles, click here.

Step 3: Enable Architecture of 32-bit

To turn on architecture of 32-bit, execute the code below in the Terminal:

sudo dpkg –add-architecture i386

Enabled for 32-bit architecture.

Step 4: Install Wine

Run the following code in the Terminal to install Wine on Ubuntu 22.04:

sudo apt install wine64 wine32 -y

The Wine has been installed.

Step 5: Check Wine Version

You can check Wine’s version by using the following command in Terminal:

wine –version

The output shows the version of Wine.

Method 2: Manually Add WineHQ Repository

The second method to install WineHQ on Ubuntu 22.04 is by manually adding the WineHQ repository to Ubuntu 22.04. This method of adding a repository manually has been explained in the form of steps below.

Step 1: Update System Packages

Before moving towards installation, we need to update system packages. To do execute the below code:

sudo apt update

System packages are updated successfully.

Step 2: Enable 32-bit Architecture

Now, turn on 32-bit architecture by executing the following the below code in the Terminal:

sudo dpkg –add-architecture i386

32-bit architecture has been enabled.

Step 3: Download Repository Key

The repository key can now be downloaded by executing the following command:

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

Repository key has been downloaded successfully.

Step 4: Add Wine Repository

After installing repository key, now add Wine repository by using the code below:

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

Wine repository is now added.

Step 5: Download Wine

Download Wine on Ubuntu using “wget” command and by executing the following code in Terminal:

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

Wine has been downloaded.

Step 6: Add Wine to the Repository

Now, add the Wine to the repository by executing the following command:

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

Wine has been added to the repository.

Step 7: Install Wine

Execute the code below to install Wine on Ubuntu 22.04:

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

The installation of Wine has been completed.

How to Uninstall WineHQ from Ubuntu 22.04?

To install WineHQ on Ubuntu 22.04 we have used two methods, similarly we will explain the same two methods to uninstall WineHQ from Ubuntu 22.04. We have listed two methods below by which we are going to uninstall:

  • Official Repository.
  • Manual Method.

How to Uninstall WineHQ via Official Repository?

To remove WineHQ from Ubuntu 22.04, execute the below command:

sudo apt autoremove wine64 wine32 *purge –y

The WineHQ has been removed from Ubuntu.

How to Uninstall WineHQ Using the Manual Method of Adding WineHQ Repository?

To remove WineHQ from Ubuntu 22.04, execute the below command:

sudo apt autoremove wine winehq-devel *purge –y

The WineHQ has been removed from Ubuntu.

Conclusion

We have used two methods to install WineHQ on Ubuntu 22.04. These methods include the installation by official repository and by manually adding the repository to Ubuntu. Open-source software called WineHQ makes it possible to install Microsoft Windows applications on Unix-like operating systems, such as Ubuntu.

 

admin Avatar

Liyana Parker

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.